summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-04-08 08:42:48 +0200
committerSam Ravnborg <sam@ravnborg.org>2009-04-11 08:18:07 +0200
commit612c280ef2400c70ea2fd8f2e17549c95002368c (patch)
treef4c3ad90864f58aa8098c313d21d6638907058f5
parent79ff807cf23ffb527f3f35bdececf56cabcdee07 (diff)
kconfig: fix update-po-config to accect backslash in input
Massimo Maiurana reported (slightly edited): ===== In latest 2.6.29 "make update-po-config" fails at msguniq invocation with an "invalid control sequence" error. The offending string is the following, and it's located in drivers/staging/panel/Kconfig:72: "'\e[L' which are specific to the LCD, and a few ANSI codes. The" looks to me like gettext expects strings in printf format, so in this case it thinks "\e" is a control sequence but doesn't recognise it as a valid one. A valid solution would be to tell kxgettext to automatically escape this kind of strings in the */config.pot he produces, so that msguniq would not complain. ===== This patch implements the suggested escaping. Reported-by: Massimo Maiurana <maiurana@gmail.com> Tested-by: Massimo Maiurana <maiurana@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/kconfig/kxgettext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c
index 6eb72a7f2562..8d9ce22b0fc5 100644
--- a/scripts/kconfig/kxgettext.c
+++ b/scripts/kconfig/kxgettext.c
@@ -43,6 +43,10 @@ static char *escape(const char* text, char *bf, int len)
++text;
goto next;
}
+ else if (*text == '\\') {
+ *bfp++ = '\\';
+ len--;
+ }
*bfp++ = *text++;
next:
--len;