|
24 | 24 | int cdebug = PRINTD; |
25 | 25 |
|
26 | 26 | static void yyerror(const char *err); |
27 | | -static void zconfprint(const char *err, ...); |
28 | 27 | static void zconf_error(const char *err, ...); |
29 | 28 | static bool zconf_endtoken(const char *tokenname, |
30 | 29 | const char *expected_tokenname); |
@@ -183,7 +182,7 @@ menuconfig_stmt: menuconfig_entry_start config_option_list |
183 | 182 | if (current_entry->prompt) |
184 | 183 | current_entry->prompt->type = P_MENU; |
185 | 184 | else |
186 | | - zconfprint("warning: menuconfig statement without prompt"); |
| 185 | + zconf_error("menuconfig statement without prompt"); |
187 | 186 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); |
188 | 187 | }; |
189 | 188 |
|
@@ -402,14 +401,14 @@ help: help_start T_HELPTEXT |
402 | 401 | { |
403 | 402 | if (current_entry->help) { |
404 | 403 | free(current_entry->help); |
405 | | - zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", |
406 | | - current_entry->sym->name ?: "<choice>"); |
| 404 | + zconf_error("'%s' defined with more than one help text", |
| 405 | + current_entry->sym->name ?: "<choice>"); |
407 | 406 | } |
408 | 407 |
|
409 | 408 | /* Is the help text empty or all whitespace? */ |
410 | 409 | if ($2[strspn($2, " \f\n\r\t\v")] == '\0') |
411 | | - zconfprint("warning: '%s' defined with blank help text", |
412 | | - current_entry->sym->name ?: "<choice>"); |
| 410 | + zconf_error("'%s' defined with blank help text", |
| 411 | + current_entry->sym->name ?: "<choice>"); |
413 | 412 |
|
414 | 413 | current_entry->help = $2; |
415 | 414 | }; |
@@ -592,17 +591,6 @@ static bool zconf_endtoken(const char *tokenname, |
592 | 591 | return true; |
593 | 592 | } |
594 | 593 |
|
595 | | -static void zconfprint(const char *err, ...) |
596 | | -{ |
597 | | - va_list ap; |
598 | | - |
599 | | - fprintf(stderr, "%s:%d: ", cur_filename, cur_lineno); |
600 | | - va_start(ap, err); |
601 | | - vfprintf(stderr, err, ap); |
602 | | - va_end(ap); |
603 | | - fprintf(stderr, "\n"); |
604 | | -} |
605 | | - |
606 | 594 | static void zconf_error(const char *err, ...) |
607 | 595 | { |
608 | 596 | va_list ap; |
|
0 commit comments