summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-08-27 20:18:33 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-08-27 20:18:33 +0000
commitaf06d81be38f26c8f89d3a693f342b3835dd9e2c (patch)
tree6b4970ca2d15a48919cbf6dfd2fd8f3ce89b9ddd
parentf51a1ec08ef8e80f353f7e52004e9ba6a332af7b (diff)
kconfig: warn about overlong lines in help-texts
From busybox r22852.
-rw-r--r--package/config/lex.zconf.c_shipped5
-rw-r--r--package/config/zconf.l4
2 files changed, 9 insertions, 0 deletions
diff --git a/package/config/lex.zconf.c_shipped b/package/config/lex.zconf.c_shipped
index a065d5a57..aea5276e6 100644
--- a/package/config/lex.zconf.c_shipped
+++ b/package/config/lex.zconf.c_shipped
@@ -815,6 +815,11 @@ void new_string(void)
void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
+ if (size > 70) {
+ fprintf (stderr, "%s:%d warning: Overlong line\n",
+ current_file->name, current_file->lineno);
+ }
+
if (new_size > text_asize) {
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;
diff --git a/package/config/zconf.l b/package/config/zconf.l
index 187d38cca..13b5f5d0e 100644
--- a/package/config/zconf.l
+++ b/package/config/zconf.l
@@ -49,6 +49,10 @@ void new_string(void)
void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
+ if (size > 70) {
+ fprintf (stderr, "%s:%d warning: Overlong line\n",
+ current_file->name, current_file->lineno);
+ }
if (new_size > text_asize) {
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;