From: Egry Gabor <gaboregry@t-online.hu>

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>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 scripts/kconfig/kxgettext.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN scripts/kconfig/kxgettext.c~kconfig-kxgettext-eol-fix scripts/kconfig/kxgettext.c
--- 25/scripts/kconfig/kxgettext.c~kconfig-kxgettext-eol-fix	Mon Jul 11 15:25:46 2005
+++ 25-akpm/scripts/kconfig/kxgettext.c	Mon Jul 11 15:25:46 2005
@@ -14,6 +14,11 @@ static char *escape(const char* text, ch
 {
 	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 @@ next:
 		--len;
 	}
 
-	if (multiline)
+	if (multiline && eol)
 		bfp -= 3;
 
 	*bfp++ = '"';
_