Index: external/gpl3/gcc/dist/gcc/gengtype-lex.c =================================================================== RCS file: /cvsroot/src/external/gpl3/gcc/dist/gcc/Attic/gengtype-lex.c,v retrieving revision 1.10.2.1 diff -u -p -r1.10.2.1 gengtype-lex.c --- external/gpl3/gcc/dist/gcc/gengtype-lex.c 14 Aug 2020 10:45:13 -0000 1.10.2.1 +++ external/gpl3/gcc/dist/gcc/gengtype-lex.c 16 Nov 2025 22:24:37 -0000 @@ -1,7 +1,6 @@ -#include "bconfig.h" -#line 2 "gengtype-lex.c" +#line 1 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" -#line 4 "gengtype-lex.c" +#line 3 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" #define YY_INT_ALIGNED short int @@ -9,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -18,6 +17,9 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ +#ifdef _LIBC +#include "namespace.h" +#endif #include #include #include @@ -25,6 +27,8 @@ /* end standard C headers. */ +/* $NetBSD: flexint.h,v 1.3 2018/12/23 16:27:17 christos Exp $ */ + /* flex integer type definitions */ #ifndef FLEXINT_H @@ -85,65 +89,61 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) +/* begin standard C++ headers. */ -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * - /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START - /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - +#define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* 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. @@ -167,8 +167,9 @@ extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -183,7 +184,6 @@ extern FILE *yyin, *yyout; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) - #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -198,12 +198,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -226,7 +226,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -254,7 +254,7 @@ struct yy_buffer_state /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -265,7 +265,6 @@ static YY_BUFFER_STATE * yy_buffer_stack #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) - /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ @@ -273,11 +272,11 @@ static YY_BUFFER_STATE * yy_buffer_stack /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -286,85 +285,81 @@ static int yy_start = 0; /* start state */ static int yy_did_buffer_switch_on_eof; -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); +void yyrestart ( FILE *input_file ); +void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, yy_size_t size ); +void yy_delete_buffer ( YY_BUFFER_STATE b ); +void yy_flush_buffer ( YY_BUFFER_STATE b ); +void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state ( void ); + +static void yyensure_buffer_stack ( void ); +static void yy_load_buffer_state ( void ); +static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len ); + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); #define yy_new_buffer yy_create_buffer - #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define yywrap() 1 +#define yywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; -typedef unsigned char YY_CHAR; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; - int yylineno = 1; extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #define yytext_ptr yytext -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static yy_state_type yy_get_previous_state ( void ); +static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); +static int yy_get_next_buffer ( void ); +static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; - #define YY_NUM_RULES 53 #define YY_END_OF_BUFFER 54 /* This struct is not used in this scanner, @@ -374,7 +369,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[561] = +static const flex_int16_t yy_accept[561] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 41, 38, 50, 41, 50, 39, 41, 41, 39, 39, 39, @@ -439,7 +434,7 @@ static yyconst flex_int16_t yy_accept[56 0, 45, 0, 0, 0, 0, 0, 0, 0, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, @@ -471,7 +466,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[68] = +static const YY_CHAR yy_meta[68] = { 0, 1, 2, 3, 1, 1, 1, 1, 1, 1, 4, 5, 1, 1, 6, 6, 7, 8, 9, 9, 9, @@ -482,7 +477,7 @@ static yyconst flex_int32_t yy_meta[68] 11, 11, 11, 11, 11, 11, 1 } ; -static yyconst flex_int16_t yy_base[608] = +static const flex_int16_t yy_base[608] = { 0, 0, 67, 134, 16, 16, 17, 18, 20, 1232, 2403, 2403, 19, 1191, 19, 31, 41, 43, 32, 33, 34, @@ -553,7 +548,7 @@ static yyconst flex_int16_t yy_base[608] 2329, 2339, 2350, 2360, 2371, 2381, 2391 } ; -static yyconst flex_int16_t yy_def[608] = +static const flex_int16_t yy_def[608] = { 0, 561, 561, 560, 3, 562, 562, 562, 562, 560, 560, 560, 563, 564, 565, 566, 560, 560, 566, 566, 566, @@ -624,7 +619,7 @@ static yyconst flex_int16_t yy_def[608] 560, 560, 560, 560, 560, 560, 560 } ; -static yyconst flex_int16_t yy_nxt[2471] = +static const flex_int16_t yy_nxt[2471] = { 0, 10, 10, 11, 10, 12, 10, 10, 13, 10, 10, 10, 10, 14, 10, 10, 10, 10, 56, 59, 59, @@ -899,7 +894,7 @@ static yyconst flex_int16_t yy_nxt[2471] 560, 560, 560, 560, 560, 560, 560, 560, 560, 560 } ; -static yyconst flex_int16_t yy_chk[2471] = +static const flex_int16_t yy_chk[2471] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 6, @@ -1188,7 +1183,7 @@ int yy_flex_debug = 0; #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 1 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* -*- indented-text -*- */ /* Process source files and output type information. Copyright (C) 2002-2017 Free Software Foundation, Inc. @@ -1209,7 +1204,7 @@ You should have received a copy of the G along with GCC; see the file COPYING3. If not see . */ #define YY_NO_INPUT 1 -#line 24 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 24 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" #ifdef HOST_GENERATOR_FILE #include "config.h" #define GENERATOR_FILE 1 @@ -1237,9 +1232,11 @@ update_lineno (const char *l, size_t len lexer_line.line++; } -/* Include '::' in identifiers to capture C++ scope qualifiers. */ +#line 1235 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" +#line 59 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" + /* Include '::' in identifiers to capture C++ scope qualifiers. */ -#line 1242 "gengtype-lex.c" +#line 1239 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" #define INITIAL 0 #define in_struct 1 @@ -1258,36 +1255,36 @@ update_lineno (const char *l, size_t len #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals (void ); +static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy (void ); +int yylex_destroy ( void ); -int yyget_debug (void ); +int yyget_debug ( void ); -void yyset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE yyget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void yyset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *yyget_in (void ); +FILE *yyget_in ( void ); -void yyset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *yyget_out (void ); +FILE *yyget_out ( void ); -void yyset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -yy_size_t yyget_leng (void ); + yy_size_t yyget_leng ( void ); -char *yyget_text (void ); +char *yyget_text ( void ); -int yyget_lineno (void ); +int yyget_lineno ( void ); -void yyset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1295,33 +1292,41 @@ void yyset_lineno (int line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap (void ); +extern "C" int yywrap ( void ); #else -extern int yywrap (void ); +extern int yywrap ( void ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT - #ifdef __cplusplus -static int yyinput (void ); +static int yyinput ( void ); #else -static int input (void ); +static int input ( void ); #endif #endif /* 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. */ @@ -1329,7 +1334,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 do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1340,7 +1345,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1353,7 +1358,7 @@ static int input (void ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1408,7 +1413,7 @@ extern int yylex (void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -1421,23 +1426,10 @@ extern int yylex (void); */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 66 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" - - /* Do this on entry to yylex(): */ - *yylval = 0; - if (lexer_toplevel_done) - { - BEGIN(INITIAL); - lexer_toplevel_done = 0; - } - - /* Things we look for in skipping mode: */ -#line 1439 "gengtype-lex.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -1458,13 +1450,27 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 67 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" + + /* Do this on entry to yylex(): */ + *yylval = 0; + if (lexer_toplevel_done) + { + BEGIN(INITIAL); + lexer_toplevel_done = 0; + } + + /* Things we look for in skipping mode: */ +#line 1471 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -1481,7 +1487,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1491,9 +1497,9 @@ yy_match: { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 561 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 560 ); @@ -1519,10 +1525,11 @@ do_action: /* This label is used only to case 1: /* rule 1 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 77 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 78 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return TYPEDEF; @@ -1531,10 +1538,11 @@ YY_RULE_SETUP case 2: /* rule 2 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 81 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 82 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; @@ -1543,10 +1551,11 @@ YY_RULE_SETUP case 3: /* rule 3 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 85 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 86 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return UNION; @@ -1555,10 +1564,11 @@ YY_RULE_SETUP case 4: /* rule 4 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 89 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 90 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return STRUCT; @@ -1567,10 +1577,11 @@ YY_RULE_SETUP case 5: /* rule 5 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 93 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 94 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return EXTERN; @@ -1579,10 +1590,11 @@ YY_RULE_SETUP case 6: /* rule 6 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 97 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 98 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); return STATIC; @@ -1593,52 +1605,54 @@ YY_RULE_SETUP case 7: YY_RULE_SETUP -#line 105 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 106 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct_comment); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 106 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 107 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP -#line 108 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 109 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP -#line 109 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 110 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 11: /* rule 11 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 5); (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 111 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 112 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* don't care */ YY_BREAK case 12: /* rule 12 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ -#line 113 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 114 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 13: /* rule 13 can match eol */ -#line 114 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 115 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 14: /* rule 14 can match eol */ -#line 115 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 116 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 115 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 116 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng + 1); return IGNORABLE_CXX_KEYWORD; @@ -1647,99 +1661,109 @@ YY_RULE_SETUP case 16: /* rule 16 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 3); (yy_c_buf_p) = yy_cp = yy_bp + 3; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 119 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 120 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return GTY_TOKEN; } YY_BREAK case 17: /* rule 17 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 5); (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 120 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 121 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return UNION; } YY_BREAK case 18: /* rule 18 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 6); (yy_c_buf_p) = yy_cp = yy_bp + 6; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 121 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 122 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 19: /* rule 19 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 5); (yy_c_buf_p) = yy_cp = yy_bp + 5; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 122 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 123 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return STRUCT; } YY_BREAK case 20: /* rule 20 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 7); (yy_c_buf_p) = yy_cp = yy_bp + 7; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 123 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 124 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return TYPEDEF; } YY_BREAK case 21: /* rule 21 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 4); (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 124 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 125 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return ENUM; } YY_BREAK case 22: /* rule 22 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 9); (yy_c_buf_p) = yy_cp = yy_bp + 9; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 125 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 126 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return PTR_ALIAS; } YY_BREAK case 23: /* rule 23 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 10); (yy_c_buf_p) = yy_cp = yy_bp + 10; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 126 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 127 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return NESTED_PTR; } YY_BREAK case 24: /* rule 24 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 4); (yy_c_buf_p) = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 127 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 128 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return USER_GTY; } YY_BREAK case 25: YY_RULE_SETUP -#line 128 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 129 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return NUM; } YY_BREAK case 26: /* rule 26 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ -#line 131 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 132 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 27: /* rule 27 can match eol */ YY_RULE_SETUP -#line 131 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 132 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { size_t len; @@ -1754,10 +1778,11 @@ YY_RULE_SETUP case 28: /* rule 28 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_cp - 1); (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 142 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 143 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1); return ID; @@ -1766,7 +1791,7 @@ YY_RULE_SETUP case 29: /* rule 29 can match eol */ YY_RULE_SETUP -#line 147 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 148 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return STRING; @@ -1776,7 +1801,7 @@ YY_RULE_SETUP case 30: /* rule 30 can match eol */ YY_RULE_SETUP -#line 152 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 153 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1); return ARRAY; @@ -1785,7 +1810,7 @@ YY_RULE_SETUP case 31: /* rule 31 can match eol */ YY_RULE_SETUP -#line 156 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 157 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng); return CHAR; @@ -1793,24 +1818,24 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 161 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 162 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return ELLIPSIS; } YY_BREAK case 33: YY_RULE_SETUP -#line 162 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 163 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { return yytext[0]; } YY_BREAK /* ignore pp-directives */ case 34: /* rule 34 can match eol */ YY_RULE_SETUP -#line 165 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 166 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" {lexer_line.line++;} YY_BREAK case 35: YY_RULE_SETUP -#line 167 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 168 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unexpected character `%s'", yytext); } @@ -1818,86 +1843,88 @@ YY_RULE_SETUP case 36: YY_RULE_SETUP -#line 172 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 173 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_comment); } YY_BREAK case 37: /* rule 37 can match eol */ YY_RULE_SETUP -#line 173 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 174 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP -#line 174 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 175 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 39: -#line 176 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 177 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 40: /* rule 40 can match eol */ -#line 177 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 178 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 41: /* rule 41 can match eol */ YY_RULE_SETUP -#line 177 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 178 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP -#line 178 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 179 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { update_lineno (yytext, yyleng); } YY_BREAK case 43: /* rule 43 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 1); (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 179 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 180 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP -#line 182 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 183 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { lexer_line.line++; } YY_BREAK case 45: -#line 184 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 185 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 46: YY_RULE_SETUP -#line 184 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 185 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 47: /* rule 47 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +YY_LINENO_REWIND_TO(yy_bp + 1); (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 185 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 186 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 48: YY_RULE_SETUP -#line 188 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 189 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(INITIAL); } YY_BREAK case 49: YY_RULE_SETUP -#line 189 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 190 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { BEGIN(in_struct); } YY_BREAK case 50: -#line 192 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 193 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" case 51: YY_RULE_SETUP -#line 192 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 193 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" { error_at_line (&lexer_line, "unterminated comment or string; unexpected EOF"); @@ -1906,15 +1933,15 @@ YY_RULE_SETUP case 52: /* rule 52 can match eol */ YY_RULE_SETUP -#line 197 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 198 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" /* do nothing */ YY_BREAK case 53: YY_RULE_SETUP -#line 199 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" +#line 200 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1917 "gengtype-lex.c" +#line 1944 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(in_struct): case YY_STATE_EOF(in_struct_comment): @@ -1996,7 +2023,7 @@ case YY_STATE_EOF(in_comment): { (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -2049,6 +2076,7 @@ case YY_STATE_EOF(in_comment): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2060,9 +2088,9 @@ case YY_STATE_EOF(in_comment): */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -2091,7 +2119,7 @@ static int yy_get_next_buffer (void) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2104,7 +2132,7 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2127,11 +2155,12 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2139,7 +2168,7 @@ static int yy_get_next_buffer (void) (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } @@ -2159,7 +2188,7 @@ static int yy_get_next_buffer (void) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); + yyrestart( yyin ); } else @@ -2173,12 +2202,15 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (yy_size_t) (new_size - 2); } (yy_n_chars) += number_to_move; @@ -2194,15 +2226,15 @@ static int yy_get_next_buffer (void) static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -2212,9 +2244,9 @@ static int yy_get_next_buffer (void) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 561 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -2227,10 +2259,10 @@ static int yy_get_next_buffer (void) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -2240,14 +2272,18 @@ static int yy_get_next_buffer (void) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 561 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 560); return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -2272,7 +2308,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2289,14 +2325,14 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - yyrestart(yyin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -2335,11 +2371,11 @@ static int yy_get_next_buffer (void) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. @@ -2367,7 +2403,7 @@ static int yy_get_next_buffer (void) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -2391,11 +2427,11 @@ static void yy_load_buffer_state (void) * * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) + YY_BUFFER_STATE yy_create_buffer (FILE * file, yy_size_t size ) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -2404,13 +2440,13 @@ static void yy_load_buffer_state (void) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } @@ -2429,9 +2465,9 @@ static void yy_load_buffer_state (void) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - yyfree((void *) b ); + yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. @@ -2443,7 +2479,7 @@ static void yy_load_buffer_state (void) { int oerrno = errno; - yy_flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -2486,7 +2522,7 @@ static void yy_load_buffer_state (void) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -2517,7 +2553,7 @@ void yypush_buffer_state (YY_BUFFER_STAT YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -2536,7 +2572,7 @@ void yypop_buffer_state (void) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -2554,15 +2590,15 @@ static void yyensure_buffer_stack (void) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -2571,7 +2607,7 @@ static void yyensure_buffer_stack (void) if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc @@ -2591,7 +2627,7 @@ static void yyensure_buffer_stack (void) * @param base the character buffer * @param size the size in bytes of the character buffer * - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { @@ -2601,23 +2637,23 @@ YY_BUFFER_STATE yy_scan_buffer (char * base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } @@ -2630,10 +2666,10 @@ YY_BUFFER_STATE yy_scan_buffer (char * * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return yy_scan_bytes(yystr,(int) strlen(yystr) ); + return yy_scan_bytes( yystr, strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2643,16 +2679,16 @@ YY_BUFFER_STATE yy_scan_string (yyconst * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) _yybytes_len + 2; - buf = (char *) yyalloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2661,7 +2697,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2677,9 +2713,9 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2707,7 +2743,7 @@ static void yy_fatal_error (yyconst char */ int yyget_lineno (void) { - + return yylineno; } @@ -2745,29 +2781,29 @@ char *yyget_text (void) } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void yyset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - yylineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (void) @@ -2775,9 +2811,9 @@ int yyget_debug (void) return yy_flex_debug; } -void yyset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) @@ -2786,10 +2822,10 @@ static int yy_init_globals (void) * This function is called from yylex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -2798,8 +2834,8 @@ static int yy_init_globals (void) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2814,7 +2850,7 @@ int yylex_destroy (void) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } @@ -2835,18 +2871,19 @@ int yylex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2856,11 +2893,12 @@ static int yy_flex_strlen (yyconst char void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2868,18 +2906,17 @@ void *yyrealloc (void * ptr, yy_size_t * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr ) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 199 "/space/rguenther/gcc-7.5.0/gcc-7.5.0/gcc/gengtype-lex.l" - +#line 200 "/home/netbsd/9/external/gpl3/gcc/dist/gcc/gengtype-lex.l" void Index: sys/dev/tc/sfb.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/sfb.c,v retrieving revision 1.85 diff -u -p -r1.85 sfb.c --- sys/dev/tc/sfb.c 24 Jan 2018 05:35:58 -0000 1.85 +++ sys/dev/tc/sfb.c 16 Nov 2025 22:24:39 -0000 @@ -487,7 +487,7 @@ sfbmmap(void *v, void *vs, off_t offset, if (offset >= SFB_SIZE || offset < 0) return (-1); - return machine_btop(sc->sc_vaddr + offset); + return machine_btop(sc->sc_vaddr + SFB_FB_OFFSET + offset); } static int Index: sys/dev/tc/sfbplus.c =================================================================== RCS file: /cvsroot/src/sys/dev/tc/sfbplus.c,v retrieving revision 1.38 diff -u -p -r1.38 sfbplus.c --- sys/dev/tc/sfbplus.c 24 Jan 2018 05:35:58 -0000 1.38 +++ sys/dev/tc/sfbplus.c 16 Nov 2025 22:24:39 -0000 @@ -510,7 +510,7 @@ sfbmmap(void *v, void *vs, off_t offset, if (offset >= 0x1000000 || offset < 0) /* XXX 16MB XXX */ return (-1); - return machine_btop(sc->sc_vaddr + offset); + return machine_btop(sc->sc_vaddr + SFB_FB_OFFSET + offset); } static int Index: xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c =================================================================== RCS file: /cvsroot/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/Attic/glcpp-lex.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 glcpp-lex.c --- xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c 10 Mar 2019 03:42:47 -0000 1.1.1.1 +++ xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c 16 Nov 2025 22:25:21 -0000 @@ -1,6 +1,6 @@ -#line 1 "glsl/glcpp/glcpp-lex.c" +#line 1 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" -#line 3 "glsl/glcpp/glcpp-lex.c" +#line 3 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" #define YY_INT_ALIGNED short int @@ -251,6 +251,9 @@ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ +#ifdef _LIBC +#include "namespace.h" +#endif #include #include #include @@ -258,6 +261,8 @@ /* end standard C headers. */ +/* $NetBSD: flexint.h,v 1.3 2018/12/23 16:27:17 christos Exp $ */ + /* flex integer type definitions */ #ifndef FLEXINT_H @@ -440,12 +445,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -509,7 +514,7 @@ struct yy_buffer_state void yyrestart ( FILE *input_file , yyscan_t yyscanner ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_create_buffer ( FILE *file, yy_size_t size , yyscan_t yyscanner ); void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); @@ -522,7 +527,7 @@ static void yy_init_buffer ( YY_BUFFER_S YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); void *yyalloc ( yy_size_t , yyscan_t yyscanner ); void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); @@ -569,7 +574,7 @@ static void yynoreturn yy_fatal_error ( */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t)(yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -813,8 +818,8 @@ static const flex_int16_t yy_chk[475] = #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -#line 1 "./glsl/glcpp/glcpp-lex.l" -#line 2 "./glsl/glcpp/glcpp-lex.l" +#line 1 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" +#line 2 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" /* * Copyright © 2010 Intel Corporation * @@ -981,8 +986,8 @@ glcpp_lex_update_state_per_token (glcpp_ } -#line 984 "glsl/glcpp/glcpp-lex.c" -#line 178 "./glsl/glcpp/glcpp-lex.l" +#line 989 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" +#line 178 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" /* Note: When adding any start conditions to this list, you must also * update the "Internal compiler error" catch-all rule near the end of * this file. */ @@ -993,7 +998,7 @@ match longer strings take priority over strings, we have to be careful to avoid OTHER matching and hiding something that CPP does care about. So we simply exclude all characters that appear in any other expressions. */ -#line 996 "glsl/glcpp/glcpp-lex.c" +#line 1001 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" #define INITIAL 0 #define COMMENT 1 @@ -1026,8 +1031,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1084,7 +1089,7 @@ FILE *yyget_out ( yyscan_t yyscanner ); void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); char *yyget_text ( yyscan_t yyscanner ); @@ -1171,7 +1176,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1184,7 +1189,7 @@ static int input ( yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1287,7 +1292,7 @@ YY_DECL } { -#line 207 "./glsl/glcpp/glcpp-lex.l" +#line 207 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" glcpp_parser_t *parser = yyextra; @@ -1348,7 +1353,7 @@ YY_DECL } /* Single-line comments */ -#line 1351 "glsl/glcpp/glcpp-lex.c" +#line 1356 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1403,41 +1408,41 @@ do_action: /* This label is used only to case 1: YY_RULE_SETUP -#line 267 "./glsl/glcpp/glcpp-lex.l" +#line 267 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { } YY_BREAK /* Multi-line comments */ case 2: YY_RULE_SETUP -#line 271 "./glsl/glcpp/glcpp-lex.l" +#line 271 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { yy_push_state(COMMENT, yyscanner); } YY_BREAK case 3: YY_RULE_SETUP -#line 272 "./glsl/glcpp/glcpp-lex.l" +#line 272 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 273 "./glsl/glcpp/glcpp-lex.l" +#line 273 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { yylineno++; yycolumn = 0; parser->commented_newlines++; } YY_BREAK case 5: YY_RULE_SETUP -#line 274 "./glsl/glcpp/glcpp-lex.l" +#line 274 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 275 "./glsl/glcpp/glcpp-lex.l" +#line 275 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { yylineno++; yycolumn = 0; parser->commented_newlines++; } YY_BREAK case 7: YY_RULE_SETUP -#line 276 "./glsl/glcpp/glcpp-lex.l" +#line 276 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { yy_pop_state(yyscanner); /* In the start condition, we don't want any SPACE token. */ @@ -1447,7 +1452,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 283 "./glsl/glcpp/glcpp-lex.l" +#line 283 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { /* If the '#' is the first non-whitespace, non-comment token on this @@ -1466,7 +1471,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 299 "./glsl/glcpp/glcpp-lex.l" +#line 299 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; yyextra->space_tokens = 0; @@ -1489,7 +1494,7 @@ YY_LINENO_REWIND_TO(yy_cp - 1); yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 314 "./glsl/glcpp/glcpp-lex.l" +#line 314 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; } @@ -1498,7 +1503,7 @@ YY_RULE_SETUP * Simply pass them through to the main compiler's lexer/parser. */ case 11: YY_RULE_SETUP -#line 320 "./glsl/glcpp/glcpp-lex.l" +#line 320 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; RETURN_STRING_TOKEN (PRAGMA); @@ -1506,7 +1511,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 325 "./glsl/glcpp/glcpp-lex.l" +#line 325 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; RETURN_TOKEN (LINE); @@ -1515,7 +1520,7 @@ YY_RULE_SETUP case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 330 "./glsl/glcpp/glcpp-lex.l" +#line 330 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; yyextra->space_tokens = 0; @@ -1528,7 +1533,7 @@ YY_RULE_SETUP * even when we are otherwise skipping. */ case 14: YY_RULE_SETUP -#line 340 "./glsl/glcpp/glcpp-lex.l" +#line 340 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1540,7 +1545,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 349 "./glsl/glcpp/glcpp-lex.l" +#line 349 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1557,7 +1562,7 @@ YY_LINENO_REWIND_TO(yy_bp + 2); yyg->yy_c_buf_p = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 358 "./glsl/glcpp/glcpp-lex.l" +#line 358 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1574,7 +1579,7 @@ YY_LINENO_REWIND_TO(yy_bp + 4); yyg->yy_c_buf_p = yy_cp = yy_bp + 4; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 367 "./glsl/glcpp/glcpp-lex.l" +#line 367 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1586,7 +1591,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 376 "./glsl/glcpp/glcpp-lex.l" +#line 376 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1597,7 +1602,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 384 "./glsl/glcpp/glcpp-lex.l" +#line 384 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!yyextra->in_define) { BEGIN INITIAL; @@ -1608,7 +1613,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 392 "./glsl/glcpp/glcpp-lex.l" +#line 392 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; RETURN_STRING_TOKEN (ERROR_TOKEN); @@ -1634,7 +1639,7 @@ YY_RULE_SETUP */ case 21: YY_RULE_SETUP -#line 415 "./glsl/glcpp/glcpp-lex.l" +#line 415 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { yyextra->in_define = true; if (!parser->skipping) { @@ -1646,7 +1651,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 424 "./glsl/glcpp/glcpp-lex.l" +#line 424 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; yyextra->space_tokens = 0; @@ -1655,7 +1660,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 430 "./glsl/glcpp/glcpp-lex.l" +#line 430 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { /* Nothing to do here. Importantly, don't leave the * start condition, since it's legal to have space between the @@ -1665,7 +1670,7 @@ YY_RULE_SETUP /* This will catch any non-directive garbage after a HASH */ case 24: YY_RULE_SETUP -#line 437 "./glsl/glcpp/glcpp-lex.l" +#line 437 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (!parser->skipping) { BEGIN INITIAL; @@ -1679,7 +1684,7 @@ case 25: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 445 "./glsl/glcpp/glcpp-lex.l" +#line 445 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; RETURN_STRING_TOKEN (FUNC_IDENTIFIER); @@ -1688,7 +1693,7 @@ YY_RULE_SETUP /* An identifier not immediately followed by '(' */ case 26: YY_RULE_SETUP -#line 451 "./glsl/glcpp/glcpp-lex.l" +#line 451 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; RETURN_STRING_TOKEN (OBJ_IDENTIFIER); @@ -1697,7 +1702,7 @@ YY_RULE_SETUP /* Whitespace */ case 27: YY_RULE_SETUP -#line 457 "./glsl/glcpp/glcpp-lex.l" +#line 457 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { /* Just ignore it. Nothing to do here. */ } @@ -1706,7 +1711,7 @@ YY_RULE_SETUP case 28: /* rule 28 can match eol */ YY_RULE_SETUP -#line 462 "./glsl/glcpp/glcpp-lex.l" +#line 462 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; glcpp_error(yylloc, yyextra, "#define followed by a non-identifier: %s", yytext); @@ -1717,7 +1722,7 @@ YY_RULE_SETUP * space. This is an error. */ case 29: YY_RULE_SETUP -#line 470 "./glsl/glcpp/glcpp-lex.l" +#line 470 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { BEGIN INITIAL; glcpp_error(yylloc, yyextra, "#define followed by a non-identifier: %s", yytext); @@ -1726,98 +1731,98 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 476 "./glsl/glcpp/glcpp-lex.l" +#line 476 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (INTEGER_STRING); } YY_BREAK case 31: YY_RULE_SETUP -#line 480 "./glsl/glcpp/glcpp-lex.l" +#line 480 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (INTEGER_STRING); } YY_BREAK case 32: YY_RULE_SETUP -#line 484 "./glsl/glcpp/glcpp-lex.l" +#line 484 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (INTEGER_STRING); } YY_BREAK case 33: YY_RULE_SETUP -#line 488 "./glsl/glcpp/glcpp-lex.l" +#line 488 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (LEFT_SHIFT); } YY_BREAK case 34: YY_RULE_SETUP -#line 492 "./glsl/glcpp/glcpp-lex.l" +#line 492 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (RIGHT_SHIFT); } YY_BREAK case 35: YY_RULE_SETUP -#line 496 "./glsl/glcpp/glcpp-lex.l" +#line 496 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (LESS_OR_EQUAL); } YY_BREAK case 36: YY_RULE_SETUP -#line 500 "./glsl/glcpp/glcpp-lex.l" +#line 500 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (GREATER_OR_EQUAL); } YY_BREAK case 37: YY_RULE_SETUP -#line 504 "./glsl/glcpp/glcpp-lex.l" +#line 504 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (EQUAL); } YY_BREAK case 38: YY_RULE_SETUP -#line 508 "./glsl/glcpp/glcpp-lex.l" +#line 508 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (NOT_EQUAL); } YY_BREAK case 39: YY_RULE_SETUP -#line 512 "./glsl/glcpp/glcpp-lex.l" +#line 512 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (AND); } YY_BREAK case 40: YY_RULE_SETUP -#line 516 "./glsl/glcpp/glcpp-lex.l" +#line 516 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (OR); } YY_BREAK case 41: YY_RULE_SETUP -#line 520 "./glsl/glcpp/glcpp-lex.l" +#line 520 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (PLUS_PLUS); } YY_BREAK case 42: YY_RULE_SETUP -#line 524 "./glsl/glcpp/glcpp-lex.l" +#line 524 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (MINUS_MINUS); } YY_BREAK case 43: YY_RULE_SETUP -#line 528 "./glsl/glcpp/glcpp-lex.l" +#line 528 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (! parser->skipping) { if (parser->is_gles) @@ -1828,42 +1833,42 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 536 "./glsl/glcpp/glcpp-lex.l" +#line 536 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (DEFINED); } YY_BREAK case 45: YY_RULE_SETUP -#line 540 "./glsl/glcpp/glcpp-lex.l" +#line 540 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (IDENTIFIER); } YY_BREAK case 46: YY_RULE_SETUP -#line 544 "./glsl/glcpp/glcpp-lex.l" +#line 544 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (OTHER); } YY_BREAK case 47: YY_RULE_SETUP -#line 548 "./glsl/glcpp/glcpp-lex.l" +#line 548 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_TOKEN (yytext[0]); } YY_BREAK case 48: YY_RULE_SETUP -#line 552 "./glsl/glcpp/glcpp-lex.l" +#line 552 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { RETURN_STRING_TOKEN (OTHER); } YY_BREAK case 49: YY_RULE_SETUP -#line 556 "./glsl/glcpp/glcpp-lex.l" +#line 556 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (yyextra->space_tokens) { RETURN_TOKEN (SPACE); @@ -1875,7 +1880,7 @@ YY_RULE_SETUP case 50: /* rule 50 can match eol */ YY_RULE_SETUP -#line 564 "./glsl/glcpp/glcpp-lex.l" +#line 564 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (parser->commented_newlines) { BEGIN NEWLINE_CATCHUP; @@ -1894,7 +1899,7 @@ case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(DEFINE): case YY_STATE_EOF(HASH): -#line 578 "./glsl/glcpp/glcpp-lex.l" +#line 578 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { if (YY_START == COMMENT) glcpp_error(yylloc, yyextra, "Unterminated comment"); @@ -1911,7 +1916,7 @@ case YY_STATE_EOF(HASH): * of the preceding patterns to match that input. */ case 51: YY_RULE_SETUP -#line 593 "./glsl/glcpp/glcpp-lex.l" +#line 593 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" { glcpp_error(yylloc, yyextra, "Internal compiler error: Unexpected character: %s", yytext); @@ -1927,10 +1932,10 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 606 "./glsl/glcpp/glcpp-lex.l" +#line 606 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1933 "glsl/glcpp/glcpp-lex.c" +#line 1938 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.c" case YY_STATE_EOF(DONE): case YY_STATE_EOF(NEWLINE_CATCHUP): case YY_STATE_EOF(UNREACHABLE): @@ -2079,7 +2084,7 @@ static int yy_get_next_buffer (yyscan_t struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = yyg->yytext_ptr; - int number_to_move, i; + yy_size_t number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -2108,7 +2113,7 @@ static int yy_get_next_buffer (yyscan_t /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2121,7 +2126,7 @@ static int yy_get_next_buffer (yyscan_t else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2135,7 +2140,7 @@ static int yy_get_next_buffer (yyscan_t if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2193,13 +2198,13 @@ static int yy_get_next_buffer (yyscan_t if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (yy_size_t) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -2286,7 +2291,7 @@ static int yy_get_next_buffer (yyscan_t if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - int number_to_move = yyg->yy_n_chars + 2; + yy_size_t number_to_move = yyg->yy_n_chars + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; char *source = @@ -2298,7 +2303,7 @@ static int yy_get_next_buffer (yyscan_t yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); @@ -2338,7 +2343,7 @@ static int yy_get_next_buffer (yyscan_t else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2458,7 +2463,7 @@ static void yy_load_buffer_state (yysca * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) + YY_BUFFER_STATE yy_create_buffer (FILE * file, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; @@ -2680,7 +2685,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_size = (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = NULL; @@ -2706,7 +2711,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + return yy_scan_bytes( yystr, strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2716,12 +2721,12 @@ YY_BUFFER_STATE yy_scan_string (const ch * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2874,7 +2879,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -3167,7 +3172,7 @@ void yyfree (void * ptr , yyscan_t yysca #define YYTABLES_NAME "yytables" -#line 606 "./glsl/glcpp/glcpp-lex.l" +#line 606 "/home/netbsd/9/xsrc/external/mit/MesaLib/dist/src/compiler/glsl/glcpp/glcpp-lex.l" void