diff options
author | Josh Triplett <josh@joshtriplett.org> | 2009-10-15 15:13:36 -0400 |
---|---|---|
committer | Josh Triplett <josh@joshtriplett.org> | 2009-11-15 18:00:16 -0500 |
commit | 65166571800af0f63f21e5576d7db12d2bf73790 (patch) | |
tree | 42bae137b3966ff60c28619cd22c84cf20ec1c79 /scripts/kconfig | |
parent | 1456edbb1476db735715ddcc7ac306de587024eb (diff) |
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>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/lex.zconf.c_shipped | 25 | ||||
-rw-r--r-- | scripts/kconfig/zconf.gperf | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.hash.c_shipped | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.l | 6 | ||||
-rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 6 | ||||
-rw-r--r-- | scripts/kconfig/zconf.y | 6 |
6 files changed, 32 insertions, 15 deletions
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index dc3e81807d13..fdc7113b08d1 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t; | |||
160 | 160 | ||
161 | /* Size of default input buffer. */ | 161 | /* Size of default input buffer. */ |
162 | #ifndef YY_BUF_SIZE | 162 | #ifndef YY_BUF_SIZE |
163 | #ifdef __ia64__ | ||
164 | /* On IA-64, the buffer size is 16k, not 8k. | ||
165 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
166 | * Ditto for the __ia64__ case accordingly. | ||
167 | */ | ||
168 | #define YY_BUF_SIZE 32768 | ||
169 | #else | ||
163 | #define YY_BUF_SIZE 16384 | 170 | #define YY_BUF_SIZE 16384 |
171 | #endif /* __ia64__ */ | ||
164 | #endif | 172 | #endif |
165 | 173 | ||
166 | /* The state buf must be large enough to hold one state per character in the main buffer. | 174 | /* 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; | |||
802 | static void zconf_endhelp(void); | 810 | static void zconf_endhelp(void); |
803 | static void zconf_endfile(void); | 811 | static void zconf_endfile(void); |
804 | 812 | ||
805 | void new_string(void) | 813 | static void new_string(void) |
806 | { | 814 | { |
807 | text = malloc(START_STRSIZE); | 815 | text = malloc(START_STRSIZE); |
808 | text_asize = START_STRSIZE; | 816 | text_asize = START_STRSIZE; |
@@ -810,7 +818,7 @@ void new_string(void) | |||
810 | *text = 0; | 818 | *text = 0; |
811 | } | 819 | } |
812 | 820 | ||
813 | void append_string(const char *str, int size) | 821 | static void append_string(const char *str, int size) |
814 | { | 822 | { |
815 | int new_size = text_size + size + 1; | 823 | int new_size = text_size + size + 1; |
816 | if (new_size > text_asize) { | 824 | if (new_size > text_asize) { |
@@ -824,7 +832,7 @@ void append_string(const char *str, int size) | |||
824 | text[text_size] = 0; | 832 | text[text_size] = 0; |
825 | } | 833 | } |
826 | 834 | ||
827 | void alloc_string(const char *str, int size) | 835 | static void alloc_string(const char *str, int size) |
828 | { | 836 | { |
829 | text = malloc(size + 1); | 837 | text = malloc(size + 1); |
830 | memcpy(text, str, size); | 838 | memcpy(text, str, size); |
@@ -914,7 +922,12 @@ static int input (void ); | |||
914 | 922 | ||
915 | /* Amount of stuff to slurp up with each read. */ | 923 | /* Amount of stuff to slurp up with each read. */ |
916 | #ifndef YY_READ_BUF_SIZE | 924 | #ifndef YY_READ_BUF_SIZE |
925 | #ifdef __ia64__ | ||
926 | /* On IA-64, the buffer size is 16k, not 8k */ | ||
927 | #define YY_READ_BUF_SIZE 16384 | ||
928 | #else | ||
917 | #define YY_READ_BUF_SIZE 8192 | 929 | #define YY_READ_BUF_SIZE 8192 |
930 | #endif /* __ia64__ */ | ||
918 | #endif | 931 | #endif |
919 | 932 | ||
920 | /* Copy whatever the last rule matched to the standard output. */ | 933 | /* Copy whatever the last rule matched to the standard output. */ |
@@ -922,7 +935,7 @@ static int input (void ); | |||
922 | /* This used to be an fputs(), but since the string might contain NUL's, | 935 | /* This used to be an fputs(), but since the string might contain NUL's, |
923 | * we now use fwrite(). | 936 | * we now use fwrite(). |
924 | */ | 937 | */ |
925 | #define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) | 938 | #define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) |
926 | #endif | 939 | #endif |
927 | 940 | ||
928 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 941 | /* 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 ) | |||
2060 | 2073 | ||
2061 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will | 2074 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will |
2062 | * scan from a @e copy of @a bytes. | 2075 | * scan from a @e copy of @a bytes. |
2063 | * @param bytes the byte buffer to scan | 2076 | * @param yybytes the byte buffer to scan |
2064 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 2077 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2065 | * | 2078 | * |
2066 | * @return the newly allocated buffer state object. | 2079 | * @return the newly allocated buffer state object. |
2067 | */ | 2080 | */ |
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf index 25ef5d01c0af..d8bc74249622 100644 --- a/scripts/kconfig/zconf.gperf +++ b/scripts/kconfig/zconf.gperf | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct kconf_id; | 10 | struct kconf_id; |
11 | 11 | ||
12 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
13 | |||
12 | %% | 14 | %% |
13 | mainmenu, T_MAINMENU, TF_COMMAND | 15 | mainmenu, T_MAINMENU, TF_COMMAND |
14 | menu, T_MENU, TF_COMMAND | 16 | menu, T_MENU, TF_COMMAND |
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 5c73d51339d8..c1748faf4634 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped | |||
@@ -30,6 +30,8 @@ | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | struct kconf_id; | 32 | struct kconf_id; |
33 | |||
34 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
33 | /* maximum key range = 47, duplicates = 0 */ | 35 | /* maximum key range = 47, duplicates = 0 */ |
34 | 36 | ||
35 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 21ff69c9ad4e..d8f7236cb0a3 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -39,7 +39,7 @@ static int last_ts, first_ts; | |||
39 | static void zconf_endhelp(void); | 39 | static void zconf_endhelp(void); |
40 | static void zconf_endfile(void); | 40 | static void zconf_endfile(void); |
41 | 41 | ||
42 | void new_string(void) | 42 | static void new_string(void) |
43 | { | 43 | { |
44 | text = malloc(START_STRSIZE); | 44 | text = malloc(START_STRSIZE); |
45 | text_asize = START_STRSIZE; | 45 | text_asize = START_STRSIZE; |
@@ -47,7 +47,7 @@ void new_string(void) | |||
47 | *text = 0; | 47 | *text = 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | void append_string(const char *str, int size) | 50 | static void append_string(const char *str, int size) |
51 | { | 51 | { |
52 | int new_size = text_size + size + 1; | 52 | int new_size = text_size + size + 1; |
53 | if (new_size > text_asize) { | 53 | if (new_size > text_asize) { |
@@ -61,7 +61,7 @@ void append_string(const char *str, int size) | |||
61 | text[text_size] = 0; | 61 | text[text_size] = 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | void alloc_string(const char *str, int size) | 64 | static void alloc_string(const char *str, int size) |
65 | { | 65 | { |
66 | text = malloc(size + 1); | 66 | text = malloc(size + 1); |
67 | memcpy(text, str, size); | 67 | memcpy(text, str, size); |
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index c42b439c5cc0..6e9dcd59aa87 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
@@ -2249,7 +2249,7 @@ void conf_parse(const char *name) | |||
2249 | sym_set_change_count(1); | 2249 | sym_set_change_count(1); |
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | const char *zconf_tokenname(int token) | 2252 | static const char *zconf_tokenname(int token) |
2253 | { | 2253 | { |
2254 | switch (token) { | 2254 | switch (token) { |
2255 | case T_MENU: return "menu"; | 2255 | case T_MENU: return "menu"; |
@@ -2313,7 +2313,7 @@ static void zconferror(const char *err) | |||
2313 | #endif | 2313 | #endif |
2314 | } | 2314 | } |
2315 | 2315 | ||
2316 | void print_quoted_string(FILE *out, const char *str) | 2316 | static void print_quoted_string(FILE *out, const char *str) |
2317 | { | 2317 | { |
2318 | const char *p; | 2318 | const char *p; |
2319 | int len; | 2319 | int len; |
@@ -2330,7 +2330,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
2330 | putc('"', out); | 2330 | putc('"', out); |
2331 | } | 2331 | } |
2332 | 2332 | ||
2333 | void print_symbol(FILE *out, struct menu *menu) | 2333 | static void print_symbol(FILE *out, struct menu *menu) |
2334 | { | 2334 | { |
2335 | struct symbol *sym = menu->sym; | 2335 | struct symbol *sym = menu->sym; |
2336 | struct property *prop; | 2336 | struct property *prop; |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 01ec550ec01b..8c43491f8cc9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -504,7 +504,7 @@ void conf_parse(const char *name) | |||
504 | sym_set_change_count(1); | 504 | sym_set_change_count(1); |
505 | } | 505 | } |
506 | 506 | ||
507 | const char *zconf_tokenname(int token) | 507 | static const char *zconf_tokenname(int token) |
508 | { | 508 | { |
509 | switch (token) { | 509 | switch (token) { |
510 | case T_MENU: return "menu"; | 510 | case T_MENU: return "menu"; |
@@ -568,7 +568,7 @@ static void zconferror(const char *err) | |||
568 | #endif | 568 | #endif |
569 | } | 569 | } |
570 | 570 | ||
571 | void print_quoted_string(FILE *out, const char *str) | 571 | static void print_quoted_string(FILE *out, const char *str) |
572 | { | 572 | { |
573 | const char *p; | 573 | const char *p; |
574 | int len; | 574 | int len; |
@@ -585,7 +585,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
585 | putc('"', out); | 585 | putc('"', out); |
586 | } | 586 | } |
587 | 587 | ||
588 | void print_symbol(FILE *out, struct menu *menu) | 588 | static void print_symbol(FILE *out, struct menu *menu) |
589 | { | 589 | { |
590 | struct symbol *sym = menu->sym; | 590 | struct symbol *sym = menu->sym; |
591 | struct property *prop; | 591 | struct property *prop; |