lkml.org 
[lkml]   [2005]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 18/19] Kconfig I18N: LKC: whitespace removing
From
Date

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 <gaboregry@t-online.hu>
---
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-13 19:57    [from the cache]
©2003-2011 Jasper Spaans