* [PATCH 2/3] kconfig: kxgettext: EOL fix
@ 2005-07-10 19:59 Egry Gábor
0 siblings, 0 replies; only message in thread
From: Egry Gábor @ 2005-07-10 19:59 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel Mailing List, Arnaldo Carvalho de Melo
The end of line character doesn't exist on end of help in all case,
check it first.
Signed-off-by: Egry Gabor <gaboregry@t-online.hu>
---
kxgettext.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
diff -Nru linux-2.6.13-rc2/scripts/kconfig/kxgettext.c
linux-2.6.13-rc2-i18n-kconfig/scripts/kconfig/kxgettext.c
--- linux-2.6.13-rc2/scripts/kconfig/kxgettext.c 2005-07-09
12:16:04.000000000 +0200
+++ linux-2.6.13-rc2-i18n-kconfig/scripts/kconfig/kxgettext.c 2005-07-09
13:38:48.000000000 +0200
@@ -14,6 +14,11 @@
{
char *bfp = bf;
int multiline = strchr(text, '\n') != NULL;
+ int eol = 0;
+ int textlen = strlen(text);
+
+ if ((textlen > 0) && (text[textlen-1] == '\n'))
+ eol = 1;
*bfp++ = '"';
--len;
@@ -43,7 +48,7 @@
--len;
}
- if (multiline)
+ if (multiline && eol)
bfp -= 3;
*bfp++ = '"';
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-10 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-10 19:59 [PATCH 2/3] kconfig: kxgettext: EOL fix Egry Gábor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®