X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Flexer.l;h=2ee9f31f9ccf6317c5134613b2bd6f2cbdb8c468;hb=HEAD;hp=80665ae17289a0c701537112061e31b44a648d16;hpb=a98a38a3d941d209b429b9a1b646506db0a6db72;p=carl9170fw.git diff --git a/config/lexer.l b/config/lexer.l index 80665ae..2ee9f31 100644 --- a/config/lexer.l +++ b/config/lexer.l @@ -12,7 +12,6 @@ #include #include #include -#include #include "lkc.h" #include "parser.tab.h" @@ -36,7 +35,7 @@ struct buffer { YY_BUFFER_STATE state; }; -struct buffer *current_buf; +static struct buffer *current_buf; static int last_ts, first_ts; @@ -105,7 +104,7 @@ n [A-Za-z0-9_-] "endchoice" return T_ENDCHOICE; "endif" return T_ENDIF; "endmenu" return T_ENDMENU; -"help"|"---help---" return T_HELP; +"help" return T_HELP; "hex" return T_HEX; "if" return T_IF; "imply" return T_IMPLY; @@ -378,7 +377,8 @@ FILE *zconf_fopen(const char *name) if (!f && name != NULL && name[0] != '/') { env = getenv(SRCTREE); if (env) { - sprintf(fullname, "%s/%s", env, name); + snprintf(fullname, sizeof(fullname), + "%s/%s", env, name); f = fopen(fullname, "r"); } }