From af06d81be38f26c8f89d3a693f342b3835dd9e2c Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 27 Aug 2008 20:18:33 +0000 Subject: [PATCH] kconfig: warn about overlong lines in help-texts From busybox r22852. --- package/config/lex.zconf.c_shipped | 5 +++++ package/config/zconf.l | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/package/config/lex.zconf.c_shipped b/package/config/lex.zconf.c_shipped index a065d5a57c..aea5276e61 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 187d38ccad..13b5f5d0ee 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; -- 2.30.2