summaryrefslogtreecommitdiff
path: root/recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch')
-rw-r--r--recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch b/recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch
new file mode 100644
index 0000000000..5f1227d30a
--- /dev/null
+++ b/recipes/mc/mc-4.6.2/00-75-utf8-cmdline-help.patch
@@ -0,0 +1,63 @@
+Fix formatting the output of "mc --help".
+
+================================================================================
+--- mc-4.6.2/src/main.c
++++ mc-4.6.2/src/main.c
+@@ -1865,7 +1865,7 @@
+
+ /* print help for options */
+ leftColWidth = poptPrintHelp (ctx, stream, 0);
+- fprintf (stream, " %-*s %s\n", leftColWidth, _("+number"),
++ fprintf (stream, " %-*s %s\n", leftColWidth + strlen(_("+number")) - mbstrlen(_("+number")), _("+number"),
+ _("Set initial line number for the internal editor"));
+ fputs (_
+ ("\n"
+--- mc-4.6.2/src/popthelp.c
++++ mc-4.6.2/src/popthelp.c
+@@ -101,7 +101,7 @@
+ goto out;
+ }
+
+- helpLength = strlen(help);
++ helpLength = mbstrlen(help);
+ while (helpLength > lineLength) {
+ ch = help + lineLength - 1;
+ while (ch > help && !isspace((unsigned char) *ch)) ch--;
+@@ -112,7 +112,7 @@
+ fprintf(f, "%.*s\n%*s", (int) (ch - help), help, indentLength, " ");
+ help = ch;
+ while (isspace((unsigned char) *help) && *help) help++;
+- helpLength = strlen(help);
++ helpLength = mbstrlen(help);
+ }
+
+ if (helpLength) fprintf(f, "%s\n", help);
+@@ -233,7 +233,7 @@
+ if (len == 3) return cursor;
+
+ if (argDescrip)
+- len += strlen(argDescrip) + 1;
++ len += mbstrlen(argDescrip) + 1;
+
+ if ((cursor + len) > 79) {
+ fprintf(f, "\n ");
+@@ -304,7 +304,7 @@
+ singleTableUsage(f, cursor, con->options, NULL);
+
+ if (con->otherHelp) {
+- cursor += strlen(con->otherHelp) + 1;
++ cursor += mbstrlen(con->otherHelp) + 1;
+ if (cursor > 79) fprintf(f, "\n ");
+ fprintf(f, " %s", con->otherHelp);
+ }
+--- mc-4.6.2/src/util.c
++++ mc-4.6.2/src/util.c
+@@ -152,7 +152,7 @@
+ int columns = 0;
+ int i;
+ #ifdef UTF8
+- if (SLsmg_Is_Unicode) {
++ if (1) {
+ static mbstate_t s;
+ while (columns < col) {
+ memset (&s, 0, sizeof (s));