[PATCH 18/19] Kconfig I18N: LKC: whitespace removing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch removes unnecessary whitespaces from end of help 
lines of Kconfig files. The size of .po files will smaller. 
This is a compatibility fix with TLKTP's .po files.

Signed-off-by: Egry Gabor <[email protected]>
---

 scripts/kconfig/zconf.l |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

diff -puN scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix scripts/kconfig/zconf.l
--- linux-2.6.13-rc3-i18n-kconfig/scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix	2005-07-13 18:32:20.000000000 +0200
+++ linux-2.6.13-rc3-i18n-kconfig-gabaman/scripts/kconfig/zconf.l	2005-07-13 18:32:20.000000000 +0200
@@ -57,6 +57,17 @@ void append_string(const char *str, int 
 	*text_ptr = 0;
 }
 
+void append_helpstring(const char *str, int size)
+{
+	while (size) {
+		if ((str[size-1] != ' ') && (str[size-1] != '\t'))
+			break;
+		size--;
+	}
+
+	append_string (str, size);
+}
+
 void alloc_string(const char *str, int size)
 {
 	text = malloc(size + 1);
@@ -225,7 +236,7 @@ n	[A-Za-z0-9_]
 		append_string("\n", 1);
 	}
 	[^ \t\n].* {
-		append_string(yytext, yyleng);
+		append_helpstring(yytext, yyleng);
 		if (!first_ts)
 			first_ts = last_ts;
 	}
_


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux