kconfig: warn about overlong lines in help-texts
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 27 Aug 2008 20:18:33 +0000 (20:18 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 27 Aug 2008 20:18:33 +0000 (20:18 -0000)
From busybox r22852.

package/config/lex.zconf.c_shipped
package/config/zconf.l

index a065d5a57c01c131694d6da73ce5591063b34e9b..aea5276e61f2e6da9bd374d4dd60e7304f256456 100644 (file)
@@ -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;
index 187d38ccadd57f489b89cbbf16798cdf5f08ef49..13b5f5d0ee0efdd9bd4b1dc4e492b6a8a3115b89 100644 (file)
@@ -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;