Skip to contentSkip to conversation

kconfig: whitespace removing

PATCH In review EGRY Gabor 1 participant 1 message Jan 11, 2008

Subsystems (2)
lore
Share & tools
lore

EGRY Gabor

author
#0 lore raw

PATCH 10/10 kconfig: whitespace removing

This patch removes the unnecessary whitespaces from end of help lines of Kconfig files.

---

 kbuild-szilard/scripts/kconfig/lex.zconf.c_shipped |    5 +++++
 kbuild-szilard/scripts/kconfig/zconf.l             |    5 +++++
 2 files changed, 10 insertions(+)
scripts/kconfig/zconf.l renamed from scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix +5 -0
diff -puN scripts/kconfig/zconf.l~kconfig-i18n-18-whitespace-fix scripts/kconfig/zconf.l
@@ -217,6 +217,11 @@ n	[A-Za-z0-9_]
 		append_string("\n", 1);
 	}
 	[^ \t\n].* {
+		while (yyleng) {
+			if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t'))
+				break;
+			yyleng--;
+		}
 		append_string(yytext, yyleng);
 		if (!first_ts)
 			first_ts = last_ts;
scripts/kconfig/lex.zconf.c_shipped renamed from scripts/kconfig/lex.zconf.c_shipped~kconfig-i18n-18-whitespace-fix +5 -0
diff -puN scripts/kconfig/lex.zconf.c_shipped~kconfig-i18n-18-whitespace-fix scripts/kconfig/lex.zconf.c_shipped
@@ -1275,6 +1275,11 @@ YY_RULE_SETUP
 case 32:
 YY_RULE_SETUP
 {
+		while (zconfleng) {
+			if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
+				break;
+			zconfleng--;
+		}
 		append_string(zconftext, zconfleng);
 		if (!first_ts)
 			first_ts = last_ts;

_