1.1 --- a/kconfig/lex.zconf.c Sun Sep 28 10:33:30 2008 +0000
1.2 +++ b/kconfig/lex.zconf.c Tue Oct 28 15:07:28 2008 +0000
1.3 @@ -5,10 +5,29 @@
1.4
1.5 /* A lexical scanner generated by flex */
1.6
1.7 +#define yy_create_buffer zconf_create_buffer
1.8 +#define yy_delete_buffer zconf_delete_buffer
1.9 +#define yy_flex_debug zconf_flex_debug
1.10 +#define yy_init_buffer zconf_init_buffer
1.11 +#define yy_flush_buffer zconf_flush_buffer
1.12 +#define yy_load_buffer_state zconf_load_buffer_state
1.13 +#define yy_switch_to_buffer zconf_switch_to_buffer
1.14 +#define yyin zconfin
1.15 +#define yyleng zconfleng
1.16 +#define yylex zconflex
1.17 +#define yylineno zconflineno
1.18 +#define yyout zconfout
1.19 +#define yyrestart zconfrestart
1.20 +#define yytext zconftext
1.21 +#define yywrap zconfwrap
1.22 +#define yyalloc zconfalloc
1.23 +#define yyrealloc zconfrealloc
1.24 +#define yyfree zconffree
1.25 +
1.26 #define FLEX_SCANNER
1.27 #define YY_FLEX_MAJOR_VERSION 2
1.28 #define YY_FLEX_MINOR_VERSION 5
1.29 -#define YY_FLEX_SUBMINOR_VERSION 33
1.30 +#define YY_FLEX_SUBMINOR_VERSION 35
1.31 #if YY_FLEX_SUBMINOR_VERSION > 0
1.32 #define FLEX_BETA
1.33 #endif
1.34 @@ -30,10 +49,10 @@
1.35
1.36 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
1.37
1.38 -#if __STDC_VERSION__ >= 199901L
1.39 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
1.40
1.41 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
1.42 - * if you want the limit (max/min) macros for int types.
1.43 + * if you want the limit (max/min) macros for int types.
1.44 */
1.45 #ifndef __STDC_LIMIT_MACROS
1.46 #define __STDC_LIMIT_MACROS 1
1.47 @@ -53,7 +72,6 @@
1.48 typedef unsigned char flex_uint8_t;
1.49 typedef unsigned short int flex_uint16_t;
1.50 typedef unsigned int flex_uint32_t;
1.51 -#endif /* ! C99 */
1.52
1.53 /* Limits of integral types. */
1.54 #ifndef INT8_MIN
1.55 @@ -84,6 +102,8 @@
1.56 #define UINT32_MAX (4294967295U)
1.57 #endif
1.58
1.59 +#endif /* ! C99 */
1.60 +
1.61 #endif /* ! FLEXINT_H */
1.62
1.63 #ifdef __cplusplus
1.64 @@ -93,11 +113,12 @@
1.65
1.66 #else /* ! __cplusplus */
1.67
1.68 -#if __STDC__
1.69 +/* C99 requires __STDC__ to be defined as 1. */
1.70 +#if defined (__STDC__)
1.71
1.72 #define YY_USE_CONST
1.73
1.74 -#endif /* __STDC__ */
1.75 +#endif /* defined (__STDC__) */
1.76 #endif /* ! __cplusplus */
1.77
1.78 #ifdef YY_USE_CONST
1.79 @@ -177,14 +198,9 @@
1.80
1.81 #define unput(c) yyunput( c, (yytext_ptr) )
1.82
1.83 -/* The following is because we cannot portably get our hands on size_t
1.84 - * (without autoconf's help, which isn't available because we want
1.85 - * flex-generated scanners to compile on their own).
1.86 - */
1.87 -
1.88 #ifndef YY_TYPEDEF_YY_SIZE_T
1.89 #define YY_TYPEDEF_YY_SIZE_T
1.90 -typedef unsigned int yy_size_t;
1.91 +typedef size_t yy_size_t;
1.92 #endif
1.93
1.94 #ifndef YY_STRUCT_YY_BUFFER_STATE
1.95 @@ -335,7 +351,7 @@
1.96
1.97 /* Begin user sect3 */
1.98
1.99 -#define zconfwrap() 1
1.100 +#define zconfwrap(n) 1
1.101 #define YY_SKIP_YYWRAP
1.102
1.103 typedef unsigned char YY_CHAR;
1.104 @@ -748,6 +764,7 @@
1.105 #define YY_MORE_ADJ 0
1.106 #define YY_RESTORE_YY_MORE_OFFSET
1.107 char *zconftext;
1.108 +#define YY_NO_INPUT 1
1.109
1.110 /*
1.111 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
1.112 @@ -834,6 +851,35 @@
1.113
1.114 static int yy_init_globals (void );
1.115
1.116 +/* Accessor methods to globals.
1.117 + These are made visible to non-reentrant scanners for convenience. */
1.118 +
1.119 +int zconflex_destroy (void );
1.120 +
1.121 +int zconfget_debug (void );
1.122 +
1.123 +void zconfset_debug (int debug_flag );
1.124 +
1.125 +YY_EXTRA_TYPE zconfget_extra (void );
1.126 +
1.127 +void zconfset_extra (YY_EXTRA_TYPE user_defined );
1.128 +
1.129 +FILE *zconfget_in (void );
1.130 +
1.131 +void zconfset_in (FILE * in_str );
1.132 +
1.133 +FILE *zconfget_out (void );
1.134 +
1.135 +void zconfset_out (FILE * out_str );
1.136 +
1.137 +int zconfget_leng (void );
1.138 +
1.139 +char *zconfget_text (void );
1.140 +
1.141 +int zconfget_lineno (void );
1.142 +
1.143 +void zconfset_lineno (int line_number );
1.144 +
1.145 /* Macros after this point can all be overridden by user definitions in
1.146 * section 1.
1.147 */
1.148 @@ -876,7 +922,7 @@
1.149 /* This used to be an fputs(), but since the string might contain NUL's,
1.150 * we now use fwrite().
1.151 */
1.152 -#define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout )
1.153 +#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
1.154 #endif
1.155
1.156 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1.157 @@ -1256,6 +1302,11 @@
1.158 case 32:
1.159 YY_RULE_SETUP
1.160 {
1.161 + while (zconfleng) {
1.162 + if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
1.163 + break;
1.164 + zconfleng--;
1.165 + }
1.166 append_string(zconftext, zconfleng);
1.167 if (!first_ts)
1.168 first_ts = last_ts;
1.169 @@ -1511,7 +1562,7 @@
1.170
1.171 /* Read in more data. */
1.172 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1.173 - (yy_n_chars), num_to_read );
1.174 + (yy_n_chars), (size_t) num_to_read );
1.175
1.176 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1.177 }
1.178 @@ -1535,6 +1586,14 @@
1.179 else
1.180 ret_val = EOB_ACT_CONTINUE_SCAN;
1.181
1.182 + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1.183 + /* Extend the array by 50%, plus the number we really need. */
1.184 + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1.185 + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1.186 + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1.187 + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1.188 + }
1.189 +
1.190 (yy_n_chars) += number_to_move;
1.191 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1.192 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1.193 @@ -1921,7 +1980,9 @@
1.194 (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
1.195 (num_to_alloc * sizeof(struct yy_buffer_state*)
1.196 );
1.197 -
1.198 + if ( ! (yy_buffer_stack) )
1.199 + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
1.200 +
1.201 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1.202
1.203 (yy_buffer_stack_max) = num_to_alloc;
1.204 @@ -1939,6 +2000,8 @@
1.205 ((yy_buffer_stack),
1.206 num_to_alloc * sizeof(struct yy_buffer_state*)
1.207 );
1.208 + if ( ! (yy_buffer_stack) )
1.209 + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
1.210
1.211 /* zero only the new slots.*/
1.212 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1.213 @@ -2264,7 +2327,7 @@
1.214 FILE *f;
1.215
1.216 f = fopen(name, "r");
1.217 - if (!f && name[0] != '/') {
1.218 + if (!f && name != NULL && name[0] != '/') {
1.219 env = getenv(SRCTREE);
1.220 if (env) {
1.221 sprintf(fullname, "%s/%s", env, name);