diff -Nru icmake-7.21.00/QUICKINSTALL icmake-7.21.01/QUICKINSTALL --- icmake-7.21.00/QUICKINSTALL 2012-04-17 17:54:18.000000000 +0000 +++ icmake-7.21.01/QUICKINSTALL 2014-01-20 09:49:58.000000000 +0000 @@ -3,11 +3,15 @@ 1. Inspect and modify if necessary the current locations in INSTALL.im. -2. Create the icmake installation files: +2. If you want the compiler to insert debugging code in the icmake programs + then define a CFLAGS environment variable. E.g., + CFLAGS="-Wall -O2 -g" + +3. Create the icmake installation files: ./icm_bootstrap / -3. To install, do as root: +4. To install, do as root: ./icm_install strip all / -4. Remove intermediate construction area: +5. Remove intermediate construction area: rm -rf tmp diff -Nru icmake-7.21.00/VERSION icmake-7.21.01/VERSION --- icmake-7.21.00/VERSION 2013-07-30 14:43:37.000000000 +0000 +++ icmake-7.21.01/VERSION 2014-01-20 10:03:58.000000000 +0000 @@ -1,2 +1,2 @@ -VERSION=7.21.00 -YEARS=1992-2013 +VERSION=7.21.01 +YEARS=1992-2014 diff -Nru icmake-7.21.00/changelog icmake-7.21.01/changelog --- icmake-7.21.00/changelog 2013-08-02 06:44:16.000000000 +0000 +++ icmake-7.21.01/changelog 2014-01-20 10:03:35.000000000 +0000 @@ -1,3 +1,22 @@ +icmake (7.21.01) + + * By default, ./icm_bootstrap no longer specifies -g when compiling icmake's + sources. If you *want* to use the -g flag, define an environment variable + CFLAGS. E.g., CFLAGS="-Wall -O2 -g". + + * Applied Colin Herbert's patches (to see Colin's patches use the prefix + https://gist.github.com/ColinHebert/): + + Removed the redundant definition of __STDC_VERSION__ from lexer.c: + 1377507/raw/545a60cb39105c80d97e543dc77e00ab7ecbb5ff/lexer.c.diff + + Removed the hard coded path to CONFDIR: + 1377533/raw/c7cb3f768deafa8c2e393bed1f5d4acd42edc7bd/icm_install.diff + + * The above changes were suggested by Florian Franzen. Thanks! + + -- Frank B. Brokken Mon, 20 Jan 2014 11:00:27 +0100 + icmake (7.21.00) * Repaired segfaults found in icmake, icm-exec, and icmun by Alexandre diff -Nru icmake-7.21.00/comp/lexer.c icmake-7.21.01/comp/lexer.c --- icmake-7.21.00/comp/lexer.c 2012-07-15 13:24:41.000000000 +0000 +++ icmake-7.21.01/comp/lexer.c 2014-01-20 09:54:31.000000000 +0000 @@ -2,7 +2,6 @@ #line 4 "lexer.c" -#define __STDC_VERSION__ 199901L #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -94,15 +93,15 @@ /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const @@ -167,17 +166,17 @@ /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) @@ -189,66 +188,66 @@ #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; + { + FILE *yy_input_file; - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int 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 - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int 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 + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; 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. - */ - int yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; - int yy_buffer_status; + int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ #define YY_BUFFER_EOF_PENDING 2 - }; + }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ @@ -273,13 +272,13 @@ /* 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 int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... @@ -311,24 +310,24 @@ #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } #define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ + { \ + if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ + YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) @@ -354,21 +353,21 @@ * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 97 #define YY_END_OF_BUFFER 98 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; static yyconst flex_int16_t yy_accept[332] = { 0, 0, 0, 0, 0, 98, 96, 4, 5, 96, 7, @@ -776,33 +775,33 @@ */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ \ #endif @@ -851,105 +850,105 @@ #endif #define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; #line 28 "lexer" #line 871 "lexer.c" - if ( !(yy_init) ) - { - (yy_init) = 1; + if ( !(yy_init) ) + { + (yy_init) = 1; #ifdef YY_USER_INIT - YY_USER_INIT; + YY_USER_INIT; #endif - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! yyout ) + yyout = stdout; - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } - yy_load_buffer_state( ); - } + yy_load_buffer_state( ); + } - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); - /* Support of yytext. */ - *yy_cp = (yy_hold_char); + /* Support of yytext. */ + *yy_cp = (yy_hold_char); - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); yy_match: - do - { - register 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; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 332 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 369 ); + do + { + register 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; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 332 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 369 ); yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; case 1: /* rule 1 can match eol */ @@ -961,7 +960,7 @@ { lexstring = xstrcat(lexstring, yytext); } - YY_BREAK + YY_BREAK case 3: YY_RULE_SETUP #line 34 "lexer" @@ -971,32 +970,32 @@ semantic("illegal escape sequence in string"); return(STRING); } - YY_BREAK + YY_BREAK case 4: YY_RULE_SETUP #line 40 "lexer" ; - YY_BREAK + YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 41 "lexer" yylineno++; - YY_BREAK + YY_BREAK case 6: YY_RULE_SETUP #line 42 "lexer" { change_file(yytext + 1); } - YY_BREAK + YY_BREAK case 7: YY_RULE_SETUP #line 45 "lexer" { lexstring[0] = 0; BEGIN str; } - YY_BREAK + YY_BREAK case 8: YY_RULE_SETUP #line 48 "lexer" @@ -1004,7 +1003,7 @@ sprintf(lexstring, "%d%c", yytext[1], 0); return(NUMBER); } - YY_BREAK + YY_BREAK case 9: YY_RULE_SETUP #line 53 "lexer" @@ -1012,7 +1011,7 @@ yylval.type = f_arg_head; return(ARG_HEAD); } - YY_BREAK + YY_BREAK case 10: YY_RULE_SETUP #line 57 "lexer" @@ -1020,7 +1019,7 @@ yylval.type = f_arg_tail; return(ARG_TAIL); } - YY_BREAK + YY_BREAK case 11: YY_RULE_SETUP #line 61 "lexer" @@ -1028,14 +1027,14 @@ yylval.type = f_ascii_int; return(ASCII); } - YY_BREAK + YY_BREAK case 12: YY_RULE_SETUP #line 65 "lexer" { return(BREAK); } - YY_BREAK + YY_BREAK case 13: YY_RULE_SETUP #line 68 "lexer" @@ -1043,7 +1042,7 @@ yylval.type = f_chdir; return(CHDIR); } - YY_BREAK + YY_BREAK case 14: YY_RULE_SETUP #line 72 "lexer" @@ -1051,7 +1050,7 @@ yylval.type = f_cmd_tail; return(CMD_TAIL); } - YY_BREAK + YY_BREAK case 15: YY_RULE_SETUP #line 76 "lexer" @@ -1059,7 +1058,7 @@ yylval.type = f_cmd_head; return(CMD_HEAD); } - YY_BREAK + YY_BREAK case 16: YY_RULE_SETUP #line 80 "lexer" @@ -1067,7 +1066,7 @@ yylval.type = f_c_base; return(C_BASE); } - YY_BREAK + YY_BREAK case 17: YY_RULE_SETUP #line 84 "lexer" @@ -1075,7 +1074,7 @@ yylval.type = f_c_ext; return(C_EXT); } - YY_BREAK + YY_BREAK case 18: YY_RULE_SETUP #line 88 "lexer" @@ -1083,7 +1082,7 @@ yylval.type = f_c_path; return(C_PATH); } - YY_BREAK + YY_BREAK case 19: YY_RULE_SETUP #line 92 "lexer" @@ -1091,7 +1090,7 @@ yylval.type = f_fprintf; return(FPRINTF); } - YY_BREAK + YY_BREAK case 20: YY_RULE_SETUP #line 96 "lexer" @@ -1099,7 +1098,7 @@ yylval.type = f_g_base; return(G_BASE); } - YY_BREAK + YY_BREAK case 21: YY_RULE_SETUP #line 100 "lexer" @@ -1107,7 +1106,7 @@ yylval.type = f_g_ext; return(G_EXT); } - YY_BREAK + YY_BREAK case 22: YY_RULE_SETUP #line 104 "lexer" @@ -1115,7 +1114,7 @@ yylval.type = f_g_path; return(G_PATH); } - YY_BREAK + YY_BREAK case 23: YY_RULE_SETUP #line 108 "lexer" @@ -1123,7 +1122,7 @@ yylval.type = f_getch; return(GETCH); } - YY_BREAK + YY_BREAK case 24: YY_RULE_SETUP #line 112 "lexer" @@ -1131,7 +1130,7 @@ yylval.type = f_getpid; return(GETPID); } - YY_BREAK + YY_BREAK case 25: YY_RULE_SETUP #line 116 "lexer" @@ -1139,7 +1138,7 @@ yylval.type = f_gets; return(GETS); } - YY_BREAK + YY_BREAK case 26: YY_RULE_SETUP #line 120 "lexer" @@ -1147,7 +1146,7 @@ yylval.type = f_echo; return(M_ECHO); } - YY_BREAK + YY_BREAK case 27: YY_RULE_SETUP #line 124 "lexer" @@ -1155,14 +1154,14 @@ yylval.type = f_element; return(ELEMENT); } - YY_BREAK + YY_BREAK case 28: YY_RULE_SETUP #line 128 "lexer" { return(ELSE); } - YY_BREAK + YY_BREAK case 29: YY_RULE_SETUP #line 131 "lexer" @@ -1170,7 +1169,7 @@ yylval.type = f_exec; return(EXEC); } - YY_BREAK + YY_BREAK case 30: YY_RULE_SETUP #line 135 "lexer" @@ -1178,7 +1177,7 @@ yylval.type = f_execute; return(EXECUTE); } - YY_BREAK + YY_BREAK case 31: YY_RULE_SETUP #line 139 "lexer" @@ -1186,7 +1185,7 @@ yylval.type = f_exists; return(EXISTS); } - YY_BREAK + YY_BREAK case 32: YY_RULE_SETUP #line 143 "lexer" @@ -1194,7 +1193,7 @@ yylval.type = op_exit; return(EXIT); } - YY_BREAK + YY_BREAK case 33: YY_RULE_SETUP #line 147 "lexer" @@ -1202,14 +1201,14 @@ yylval.type = f_fgets; return (FGETS); } - YY_BREAK + YY_BREAK case 34: YY_RULE_SETUP #line 151 "lexer" { return(FOR); } - YY_BREAK + YY_BREAK case 35: YY_RULE_SETUP #line 154 "lexer" @@ -1217,14 +1216,14 @@ yylval.type = f_getenv; return GETENV; } - YY_BREAK + YY_BREAK case 36: YY_RULE_SETUP #line 158 "lexer" { return(IF); } - YY_BREAK + YY_BREAK case 37: YY_RULE_SETUP #line 161 "lexer" @@ -1232,7 +1231,7 @@ yylval.type = 0; /* 0 == void */ return (VOID); } - YY_BREAK + YY_BREAK case 38: YY_RULE_SETUP #line 165 "lexer" @@ -1240,7 +1239,7 @@ yylval.type = e_int; return(INT); } - YY_BREAK + YY_BREAK case 39: YY_RULE_SETUP #line 169 "lexer" @@ -1248,7 +1247,7 @@ yylval.type = e_list; return(LIST); } - YY_BREAK + YY_BREAK case 40: YY_RULE_SETUP #line 173 "lexer" @@ -1256,7 +1255,7 @@ yylval.type = f_makelist; return(MAKELIST); } - YY_BREAK + YY_BREAK case 41: YY_RULE_SETUP #line 177 "lexer" @@ -1264,7 +1263,7 @@ yylval.type = op_older; return(OLDER); } - YY_BREAK + YY_BREAK case 42: YY_RULE_SETUP #line 181 "lexer" @@ -1272,7 +1271,7 @@ yylval.type = f_printf; return(PRINTF); } - YY_BREAK + YY_BREAK case 43: YY_RULE_SETUP #line 185 "lexer" @@ -1280,7 +1279,7 @@ yylval.type = f_putenv; return (PUTENV); } - YY_BREAK + YY_BREAK case 44: YY_RULE_SETUP #line 189 "lexer" @@ -1288,7 +1287,7 @@ yylval.type = op_ret; return(RETURN); } - YY_BREAK + YY_BREAK case 45: #line 194 "lexer" case 46: @@ -1298,7 +1297,7 @@ yylval.type = f_sizeoflist; return(SIZEOFLIST); } - YY_BREAK + YY_BREAK case 47: YY_RULE_SETUP #line 198 "lexer" @@ -1306,7 +1305,7 @@ yylval.type = f_stat; return (STAT); } - YY_BREAK + YY_BREAK case 48: YY_RULE_SETUP #line 202 "lexer" @@ -1314,7 +1313,7 @@ yylval.type = e_str; return(STRINGTYPE); } - YY_BREAK + YY_BREAK case 49: YY_RULE_SETUP #line 206 "lexer" @@ -1322,7 +1321,7 @@ yylval.type = f_strlen; return(STRLEN); } - YY_BREAK + YY_BREAK case 50: YY_RULE_SETUP #line 210 "lexer" @@ -1330,7 +1329,7 @@ yylval.type = f_strlwr; return(STRLWR); } - YY_BREAK + YY_BREAK case 51: YY_RULE_SETUP #line 214 "lexer" @@ -1338,7 +1337,7 @@ yylval.type = f_strupr; return(STRUPR); } - YY_BREAK + YY_BREAK case 52: YY_RULE_SETUP #line 218 "lexer" @@ -1346,7 +1345,7 @@ yylval.type = f_fields; return(FIELDS); } - YY_BREAK + YY_BREAK case 53: YY_RULE_SETUP #line 222 "lexer" @@ -1354,7 +1353,7 @@ yylval.type = f_strfind; return STRFIND; } - YY_BREAK + YY_BREAK case 54: YY_RULE_SETUP #line 226 "lexer" @@ -1362,7 +1361,7 @@ yylval.type = f_substr; return SUBSTR; } - YY_BREAK + YY_BREAK case 55: YY_RULE_SETUP #line 230 "lexer" @@ -1370,14 +1369,14 @@ yylval.type = f_system; return(SYSTEM); } - YY_BREAK + YY_BREAK case 56: YY_RULE_SETUP #line 234 "lexer" { return(WHILE); } - YY_BREAK + YY_BREAK case 57: #line 238 "lexer" case 58: @@ -1387,147 +1386,147 @@ yylval.type = op_younger; return(YOUNGER); } - YY_BREAK + YY_BREAK case 59: YY_RULE_SETUP #line 242 "lexer" { return(INC); } - YY_BREAK + YY_BREAK case 60: YY_RULE_SETUP #line 245 "lexer" { return(DEC); } - YY_BREAK + YY_BREAK case 61: YY_RULE_SETUP #line 248 "lexer" { return(DIV_IS); } - YY_BREAK + YY_BREAK case 62: YY_RULE_SETUP #line 251 "lexer" { return(MINUS_IS); } - YY_BREAK + YY_BREAK case 63: YY_RULE_SETUP #line 254 "lexer" { return(MUL_IS); } - YY_BREAK + YY_BREAK case 64: YY_RULE_SETUP #line 257 "lexer" { return(MOD_IS); } - YY_BREAK + YY_BREAK case 65: YY_RULE_SETUP #line 260 "lexer" { return(PLUS_IS); } - YY_BREAK + YY_BREAK case 66: YY_RULE_SETUP #line 263 "lexer" { return(AND_IS); } - YY_BREAK + YY_BREAK case 67: YY_RULE_SETUP #line 266 "lexer" { return(OR_IS); } - YY_BREAK + YY_BREAK case 68: YY_RULE_SETUP #line 269 "lexer" { return(XOR_IS); } - YY_BREAK + YY_BREAK case 69: YY_RULE_SETUP #line 272 "lexer" { return(SHL_IS); } - YY_BREAK + YY_BREAK case 70: YY_RULE_SETUP #line 275 "lexer" { return(SHR_IS); } - YY_BREAK + YY_BREAK case 71: YY_RULE_SETUP #line 278 "lexer" { return(OR); } - YY_BREAK + YY_BREAK case 72: YY_RULE_SETUP #line 281 "lexer" { return(AND); } - YY_BREAK + YY_BREAK case 73: YY_RULE_SETUP #line 284 "lexer" { return(EQUAL); } - YY_BREAK + YY_BREAK case 74: YY_RULE_SETUP #line 287 "lexer" { return(NOT_EQUAL); } - YY_BREAK + YY_BREAK case 75: YY_RULE_SETUP #line 290 "lexer" { return(SMALLER_EQUAL); } - YY_BREAK + YY_BREAK case 76: YY_RULE_SETUP #line 293 "lexer" { return(GREATER_EQUAL); } - YY_BREAK + YY_BREAK case 77: YY_RULE_SETUP #line 296 "lexer" { return(SHR); } - YY_BREAK + YY_BREAK case 78: YY_RULE_SETUP #line 299 "lexer" { return(SHL); } - YY_BREAK + YY_BREAK case 79: YY_RULE_SETUP #line 302 "lexer" @@ -1537,7 +1536,7 @@ sprintf(lexstring, "%d", (int)value); return(NUMBER); } - YY_BREAK + YY_BREAK case 80: YY_RULE_SETUP #line 308 "lexer" @@ -1545,7 +1544,7 @@ lexstring = xstrdup(yytext); return(NUMBER); } - YY_BREAK + YY_BREAK case 81: #line 313 "lexer" case 82: @@ -1555,7 +1554,7 @@ lexstring = xstrdup("0"); return(NUMBER); } - YY_BREAK + YY_BREAK case 83: #line 318 "lexer" case 84: @@ -1567,7 +1566,7 @@ lexstring = xstrdup("1"); return(NUMBER); } - YY_BREAK + YY_BREAK case 86: #line 324 "lexer" case 87: @@ -1579,7 +1578,7 @@ lexstring = xstrdup("2"); return(NUMBER); } - YY_BREAK + YY_BREAK case 89: #line 330 "lexer" case 90: @@ -1589,7 +1588,7 @@ lexstring = xstrdup("4"); return(NUMBER); } - YY_BREAK + YY_BREAK case 91: #line 335 "lexer" case 92: @@ -1599,7 +1598,7 @@ lexstring = xstrdup("8"); return(NUMBER); } - YY_BREAK + YY_BREAK case 93: YY_RULE_SETUP #line 339 "lexer" @@ -1607,7 +1606,7 @@ lexstring = xstrdup("16"); return(NUMBER); } - YY_BREAK + YY_BREAK case 94: YY_RULE_SETUP #line 343 "lexer" @@ -1615,7 +1614,7 @@ lexstring = xstrdup("32"); return(NUMBER); } - YY_BREAK + YY_BREAK case 95: YY_RULE_SETUP #line 347 "lexer" @@ -1623,383 +1622,383 @@ lexstring = xstrdup(yytext); return(IDENTIFIER); } - YY_BREAK + YY_BREAK case 96: YY_RULE_SETUP #line 351 "lexer" return yytext[0]; - YY_BREAK + YY_BREAK case 97: YY_RULE_SETUP #line 352 "lexer" ECHO; - YY_BREAK + YY_BREAK #line 1638 "lexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(str): - yyterminate(); + yyterminate(); - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file */ 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; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - 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,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + 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,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - return ret_val; + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + register yy_state_type yy_current_state; + register char *yy_cp; - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); + 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); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 332 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } + 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); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 332 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } - return yy_current_state; + return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis - * next_state = yy_try_NUL_trans( current_state ); + * next_state = yy_try_NUL_trans( current_state ); */ 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); + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 332 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 331); + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 332 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 331); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { - register char *yy_cp; + register char *yy_cp; yy_cp = (yy_c_buf_p); - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (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" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (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" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT @@ -2010,73 +2009,73 @@ #endif { - int c; + int c; - *(yy_c_buf_p) = (yy_hold_char); + *(yy_c_buf_p) = (yy_hold_char); - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return EOF; + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; #ifdef __cplusplus - return yyinput(); + return yyinput(); #else - return input(); + return input(); #endif - } + } - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - return c; + return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. @@ -2086,14 +2085,14 @@ void yyrestart (FILE * input_file ) { - if ( ! YY_CURRENT_BUFFER ){ + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = + YY_CURRENT_BUFFER_LVALUE = 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. @@ -2103,40 +2102,40 @@ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. @@ -2147,26 +2146,26 @@ */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { - YY_BUFFER_STATE b; + YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = size; - /* 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 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + /* 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 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_is_our_buffer = 1; + b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ); + yy_init_buffer(b,file ); - return b; + return b; } /** Destroy the buffer. @@ -2176,16 +2175,16 @@ void yy_delete_buffer (YY_BUFFER_STATE b ) { - if ( ! b ) - return; + if ( ! b ) + return; - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); - yyfree((void *) b ); + yyfree((void *) b ); } #ifndef __cplusplus @@ -2199,12 +2198,12 @@ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { - int oerrno = errno; + int oerrno = errno; - yy_flush_buffer(b ); + yy_flush_buffer(b ); - b->yy_input_file = file; - b->yy_fill_buffer = 1; + b->yy_input_file = file; + b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. @@ -2217,7 +2216,7 @@ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - errno = oerrno; + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. @@ -2226,25 +2225,25 @@ */ void yy_flush_buffer (YY_BUFFER_STATE b ) { - if ( ! b ) - return; + if ( ! b ) + return; - b->yy_n_chars = 0; + b->yy_n_chars = 0; - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - b->yy_buf_pos = &b->yy_ch_buf[0]; + b->yy_buf_pos = &b->yy_ch_buf[0]; - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -2255,28 +2254,28 @@ */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { - if (new_buffer == NULL) - return; + if (new_buffer == NULL) + return; - yyensure_buffer_stack(); + yyensure_buffer_stack(); - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. @@ -2285,18 +2284,18 @@ */ void yypop_buffer_state (void) { - if (!YY_CURRENT_BUFFER) - return; + if (!YY_CURRENT_BUFFER) + return; - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } } /* Allocates the stack if it does not exist. @@ -2304,45 +2303,45 @@ */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + int num_to_alloc; - if (!(yy_buffer_stack)) { + if (!(yy_buffer_stack)) { - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. + /* First allocation is just for 2 elements, since we don't know if this + * 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; - (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; - } - - 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 */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } + num_to_alloc = 1; + (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; + } + + 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 */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } } /** Setup the input buffer state to scan directly from a user-specified character buffer. @@ -2353,31 +2352,31 @@ */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { - YY_BUFFER_STATE b; + YY_BUFFER_STATE b; - if ( size < 2 || - 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; - - 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_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - 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; + if ( size < 2 || + 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; + + 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_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + 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; + return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will @@ -2391,7 +2390,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - return yy_scan_bytes(yystr,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 @@ -2403,32 +2402,32 @@ */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; - return b; + return b; } #ifndef YY_EXIT_FAILURE @@ -2437,26 +2436,26 @@ static void yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ @@ -2571,15 +2570,15 @@ { /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ @@ -2595,43 +2594,43 @@ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; + register 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 ) { - register int n; - for ( n = 0; s[n]; ++n ) - ; + register int n; + for ( n = 0; s[n]; ++n ) + ; - return n; + return n; } #endif void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return (void *) 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 - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, 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 + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) 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" diff -Nru icmake-7.21.00/debian/changelog icmake-7.21.01/debian/changelog --- icmake-7.21.00/debian/changelog 2013-08-04 16:51:43.000000000 +0000 +++ icmake-7.21.01/debian/changelog 2014-01-20 10:18:38.000000000 +0000 @@ -1,3 +1,9 @@ +icmake (7.21.01-1) unstable; urgency=low + + * New upstream release fixes some issues encountered on Macs + + -- Frank B. Brokken Mon, 20 Jan 2014 11:07:06 +0100 + icmake (7.21.00-1) unstable; urgency=low * New upstream release repairs segfaults reported by Alexandre Reber. diff -Nru icmake-7.21.00/debian/control icmake-7.21.01/debian/control --- icmake-7.21.00/debian/control 2013-08-04 16:51:43.000000000 +0000 +++ icmake-7.21.01/debian/control 2014-01-20 10:18:38.000000000 +0000 @@ -6,7 +6,7 @@ Frank B. Brokken , tony mancill Build-Depends: debhelper (>= 9.20120909), hardening-wrapper -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: http://icmake.sourceforge.net/ Vcs-Git: git://git.debian.org/git/collab-maint/icmake.git Vcs-Browser: http://git.debian.org/?p=collab-maint/icmake.git diff -Nru icmake-7.21.00/debian/rules icmake-7.21.01/debian/rules --- icmake-7.21.00/debian/rules 2013-08-04 16:51:43.000000000 +0000 +++ icmake-7.21.01/debian/rules 2014-01-20 10:18:38.000000000 +0000 @@ -8,7 +8,7 @@ # catches silent file content forges at the upstream server side # Archive downloaded from https://www.icce.rug.nl/debian/icmake # file: icmake_x.y.z.tar.gz -MD5TRUSTED := 2d6b12e2ec193339fde35eed7614089c +MD5TRUSTED := 36161ccaf7afe93b00dda0f60758dbbb export DEB_BUILD_HARDENING=1 export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) diff -Nru icmake-7.21.00/doc/icmake.1 icmake-7.21.01/doc/icmake.1 --- icmake-7.21.00/doc/icmake.1 2013-07-30 14:52:41.000000000 +0000 +++ icmake-7.21.01/doc/icmake.1 2014-01-20 10:04:45.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "icmake" "1" "1992\-2013" "icmake\&.7\&.20\&.00\&.tar\&.gz" "A program maintenance utility" +.TH "icmake" "1" "1992\-2014" "icmake\&.7\&.21\&.01\&.tar\&.gz" "A program maintenance utility" .PP .SH "NAME" diff -Nru icmake-7.21.00/doc/icmbuild.1 icmake-7.21.01/doc/icmbuild.1 --- icmake-7.21.00/doc/icmbuild.1 2013-07-30 14:53:42.000000000 +0000 +++ icmake-7.21.01/doc/icmbuild.1 2014-01-20 10:04:45.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "icmbuild" "1" "1992\-2013" "icmake\&.7\&.20\&.00\&.tar\&.gz" "A generic program maintenance script" +.TH "icmbuild" "1" "1992\-2014" "icmake\&.7\&.21\&.01\&.tar\&.gz" "A generic program maintenance script" .PP .SH "NAME" diff -Nru icmake-7.21.00/doc/icmstart.1 icmake-7.21.01/doc/icmstart.1 --- icmake-7.21.00/doc/icmstart.1 2013-07-30 14:54:28.000000000 +0000 +++ icmake-7.21.01/doc/icmstart.1 2014-01-20 10:04:45.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "icmstart" "1" "1992\-2013" "icmake\&.7\&.20\&.00\&.tar\&.gz" "starts icmbuild program maintenance" +.TH "icmstart" "1" "1992\-2014" "icmake\&.7\&.21\&.01\&.tar\&.gz" "starts icmbuild program maintenance" .PP .SH "NAME" diff -Nru icmake-7.21.00/doc/icmstart.rc.7 icmake-7.21.01/doc/icmstart.rc.7 --- icmake-7.21.00/doc/icmstart.rc.7 2013-07-30 14:54:08.000000000 +0000 +++ icmake-7.21.01/doc/icmstart.rc.7 2014-01-20 10:04:45.000000000 +0000 @@ -1,4 +1,4 @@ -.TH "icmstart\&.rc" "7" "1992\-2013" "icmake\&.7\&.20\&.00\&.tar\&.gz" "icmstart resource file" +.TH "icmstart\&.rc" "7" "1992\-2014" "icmake\&.7\&.21\&.01\&.tar\&.gz" "icmstart resource file" .PP .SH "NAME" diff -Nru icmake-7.21.00/doc/manpage/release.yo icmake-7.21.01/doc/manpage/release.yo --- icmake-7.21.00/doc/manpage/release.yo 1970-01-01 00:00:00.000000000 +0000 +++ icmake-7.21.01/doc/manpage/release.yo 2014-01-20 10:04:45.000000000 +0000 @@ -0,0 +1,2 @@ +SUBST(_CurVers_)(7.21.01) +SUBST(_CurYrs_)(1992-2014) diff -Nru icmake-7.21.00/icm_bootstrap icmake-7.21.01/icm_bootstrap --- icmake-7.21.00/icm_bootstrap 2012-07-16 13:34:54.000000000 +0000 +++ icmake-7.21.01/icm_bootstrap 2014-01-20 09:45:59.000000000 +0000 @@ -29,7 +29,7 @@ . icm_prepare -if [ "${CFLAGS}" == "" ] ; then CFLAGS="-Wall -O2 -g"; fi +if [ "${CFLAGS}" == "" ] ; then CFLAGS="-Wall -O2"; fi if [ "${CC}" == "" ] ; then CC="gcc"; fi echo Creating tmp/libicrss.a diff -Nru icmake-7.21.00/icm_install icmake-7.21.01/icm_install --- icmake-7.21.00/icm_install 2012-04-17 17:54:18.000000000 +0000 +++ icmake-7.21.01/icm_install 2014-01-20 09:56:41.000000000 +0000 @@ -67,7 +67,7 @@ into ${SKELDIR} into ${DOCDIR} into ${DOCDOCDIR} - into etc/icmake + into ${CONFDIR} ;; (progs) @@ -91,7 +91,7 @@ ;; (etc) - into etc/icmake + into ${CONFDIR} ;; (docdoc)