- warn about overlong lines in help-texts
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 17 Jul 2008 08:02:28 +0000 (08:02 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 17 Jul 2008 08:02:28 +0000 (08:02 -0000)
  I initially bailed out with an error, but then that's a bit rough. Just warn to trick somebody into fixing them..

scripts/kconfig/lex.zconf.c_shipped
scripts/kconfig/zconf.l

index b4792d344649180ab313ba8c10b9f747e4fdf60c..5fc323de302cebe187a57225484fd1883170dcd0 100644 (file)
@@ -784,6 +784,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 error: Overlong line\n",
+               current_file->name, current_file->lineno);
+       }
+
        if (new_size > text_asize) {
                new_size += START_STRSIZE - 1;
                new_size &= -START_STRSIZE;
index cfa46077c6b43a45dad6d89c60ea5dd274c566cf..d839577ca8e5192acd7643d27ce33fd447d7b825 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 error: Overlong line\n",
+                        current_file->name, current_file->lineno);
+       }
        if (new_size > text_asize) {
                new_size += START_STRSIZE - 1;
                new_size &= -START_STRSIZE;