forked from luck/tmp_suning_uos_patched
kconfig: Mark various internal functions static
kconfig's keyword hash, lexer, and parser define various functions used only locally. Declare these functions as static, and regenerate the corresponding generated files. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
1456edbb14
commit
6516657180
|
@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t;
|
|||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
|
@ -802,7 +810,7 @@ static int last_ts, first_ts;
|
|||
static void zconf_endhelp(void);
|
||||
static void zconf_endfile(void);
|
||||
|
||||
void new_string(void)
|
||||
static void new_string(void)
|
||||
{
|
||||
text = malloc(START_STRSIZE);
|
||||
text_asize = START_STRSIZE;
|
||||
|
@ -810,7 +818,7 @@ void new_string(void)
|
|||
*text = 0;
|
||||
}
|
||||
|
||||
void append_string(const char *str, int size)
|
||||
static void append_string(const char *str, int size)
|
||||
{
|
||||
int new_size = text_size + size + 1;
|
||||
if (new_size > text_asize) {
|
||||
|
@ -824,7 +832,7 @@ void append_string(const char *str, int size)
|
|||
text[text_size] = 0;
|
||||
}
|
||||
|
||||
void alloc_string(const char *str, int size)
|
||||
static void alloc_string(const char *str, int size)
|
||||
{
|
||||
text = malloc(size + 1);
|
||||
memcpy(text, str, size);
|
||||
|
@ -914,7 +922,12 @@ static int input (void );
|
|||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
|
@ -922,7 +935,7 @@ static int input (void );
|
|||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
|
||||
#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
|
@ -2060,8 +2073,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
|
|||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
struct kconf_id;
|
||||
|
||||
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
|
||||
|
||||
%%
|
||||
mainmenu, T_MAINMENU, TF_COMMAND
|
||||
menu, T_MENU, TF_COMMAND
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#endif
|
||||
|
||||
struct kconf_id;
|
||||
|
||||
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
|
||||
/* maximum key range = 47, duplicates = 0 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
|
|
@ -39,7 +39,7 @@ static int last_ts, first_ts;
|
|||
static void zconf_endhelp(void);
|
||||
static void zconf_endfile(void);
|
||||
|
||||
void new_string(void)
|
||||
static void new_string(void)
|
||||
{
|
||||
text = malloc(START_STRSIZE);
|
||||
text_asize = START_STRSIZE;
|
||||
|
@ -47,7 +47,7 @@ void new_string(void)
|
|||
*text = 0;
|
||||
}
|
||||
|
||||
void append_string(const char *str, int size)
|
||||
static void append_string(const char *str, int size)
|
||||
{
|
||||
int new_size = text_size + size + 1;
|
||||
if (new_size > text_asize) {
|
||||
|
@ -61,7 +61,7 @@ void append_string(const char *str, int size)
|
|||
text[text_size] = 0;
|
||||
}
|
||||
|
||||
void alloc_string(const char *str, int size)
|
||||
static void alloc_string(const char *str, int size)
|
||||
{
|
||||
text = malloc(size + 1);
|
||||
memcpy(text, str, size);
|
||||
|
|
|
@ -2249,7 +2249,7 @@ void conf_parse(const char *name)
|
|||
sym_set_change_count(1);
|
||||
}
|
||||
|
||||
const char *zconf_tokenname(int token)
|
||||
static const char *zconf_tokenname(int token)
|
||||
{
|
||||
switch (token) {
|
||||
case T_MENU: return "menu";
|
||||
|
@ -2313,7 +2313,7 @@ static void zconferror(const char *err)
|
|||
#endif
|
||||
}
|
||||
|
||||
void print_quoted_string(FILE *out, const char *str)
|
||||
static void print_quoted_string(FILE *out, const char *str)
|
||||
{
|
||||
const char *p;
|
||||
int len;
|
||||
|
@ -2330,7 +2330,7 @@ void print_quoted_string(FILE *out, const char *str)
|
|||
putc('"', out);
|
||||
}
|
||||
|
||||
void print_symbol(FILE *out, struct menu *menu)
|
||||
static void print_symbol(FILE *out, struct menu *menu)
|
||||
{
|
||||
struct symbol *sym = menu->sym;
|
||||
struct property *prop;
|
||||
|
|
|
@ -504,7 +504,7 @@ void conf_parse(const char *name)
|
|||
sym_set_change_count(1);
|
||||
}
|
||||
|
||||
const char *zconf_tokenname(int token)
|
||||
static const char *zconf_tokenname(int token)
|
||||
{
|
||||
switch (token) {
|
||||
case T_MENU: return "menu";
|
||||
|
@ -568,7 +568,7 @@ static void zconferror(const char *err)
|
|||
#endif
|
||||
}
|
||||
|
||||
void print_quoted_string(FILE *out, const char *str)
|
||||
static void print_quoted_string(FILE *out, const char *str)
|
||||
{
|
||||
const char *p;
|
||||
int len;
|
||||
|
@ -585,7 +585,7 @@ void print_quoted_string(FILE *out, const char *str)
|
|||
putc('"', out);
|
||||
}
|
||||
|
||||
void print_symbol(FILE *out, struct menu *menu)
|
||||
static void print_symbol(FILE *out, struct menu *menu)
|
||||
{
|
||||
struct symbol *sym = menu->sym;
|
||||
struct property *prop;
|
||||
|
|
Loading…
Reference in New Issue
Block a user