recipes: tools/pmount: added version 0.9.23
[dragora.git] / patches / man-db / man-db-2.8.5-iconv.patch
blob8c006fd9c7e9ab531a604742723748f57138edb0
1 --- man-db-2.8.5/src/man.c 2018-06-18 22:44:35.672743065 -0500
2 +++ man-db-2.8.5/src/man.c 2018-06-18 22:46:35.032624890 -0500
3 @@ -1569,15 +1569,13 @@
5 debug ("add_output_iconv: source %s, target %s\n", source, target);
6 if (source && target && !STREQ (source, target)) {
7 - char *target_translit = xasprintf ("%s//TRANSLIT", target);
8 pipecmd *iconv_cmd;
9 iconv_cmd = pipecmd_new_args
10 - ("iconv", "-c", "-f", source, "-t", target_translit,
11 + ("iconv", "-c", "-f", source, "-t", target,
12 (void *) 0);
13 pipecmd_pre_exec (iconv_cmd, sandbox_load, sandbox_free,
14 sandbox);
15 pipeline_command (p, iconv_cmd);
16 - free (target_translit);
20 --- man-db-2.8.5/src/manconv.c
21 +++ man-db-2.8.5/src/manconv.c
22 @@ -106,10 +106,9 @@ static int try_iconv (pipeline *p, const char *try_from_code, const char *to,
23 static char *utf8 = NULL, *output = NULL;
24 size_t utf8left = 0;
25 iconv_t cd_utf8, cd = NULL;
26 - int to_utf8 = STREQ (try_to_code, "UTF-8") ||
27 - STRNEQ (try_to_code, "UTF-8//", 7);
28 - const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
29 - int ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);;
30 + int to_utf8 = STREQ (try_to_code, "UTF-8");
31 + const char *utf8_target = "UTF-8";
32 + int ignore_errors = 0;
33 int ret = 0;
35 debug ("trying encoding %s -> %s\n", try_from_code, try_to_code);
36 --- man-db-2.8.5/src/manconv_client.c
37 +++ man-db-2.8.5/src/manconv_client.c
38 @@ -105,7 +105,7 @@ void add_manconv (pipeline *p, const char *source, const char *target)
39 codes->from[2] = NULL;
40 name = appendstr (name, "UTF-8:", source, (void *) 0);
42 - codes->to = xasprintf ("%s//IGNORE", target);
43 + codes->to = xstrdup (target);
44 /* informational only; no shell quoting concerns */
45 name = appendstr (name, " -t ", codes->to, (void *) 0);
46 if (quiet >= 2)
47 --- man-db-2.8.5/src/manconv_main.c
48 +++ man-db-2.8.5/src/manconv_main.c
49 @@ -106,9 +106,6 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
50 return 0;
51 case 't':
52 to_code = xstrdup (arg);
53 - if (!strstr (to_code, "//"))
54 - to_code = appendstr (to_code, "//TRANSLIT",
55 - (void *) 0);
56 return 0;
57 case 'd':
58 debug_level = 1;
59 --- man-db-2.8.5/src/whatis.c
60 +++ man-db-2.8.5/src/whatis.c
61 @@ -974,7 +974,7 @@ int main (int argc, char *argv[])
62 display_seen = hashtable_create (&null_hashtable_free);
64 #ifdef HAVE_ICONV
65 - locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ());
66 + locale_charset = xstrdup (get_locale_charset ());
67 conv_to_locale = iconv_open (locale_charset, "UTF-8");
68 free (locale_charset);
69 #endif /* HAVE_ICONV */