Changeset 529

Show
Ignore:
Timestamp:
04/25/06 16:30:47 (3 years ago)
Author:
common
Message:

nepenthes
- shellcode-signatures

namespace the yy* fns with nepenthes_shellcodesignatures_yy to prevent collisions when linked against libprelude

-> moved lex.yy.c -> lex.nepenthes_shellcodesignatures_yy.c for this reason
s/yy/nepenthes_shellcodesignatures_yy/g
edit Makefile.am to include lex.nepenthes_shellcodesignatures_yy.c
fix parser.y to use nepenthes_shellcodesignatures_yy* instead of yy*

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/shellcode-signatures/Makefile.am

    r520 r529  
    77AM_CPPFLAGS = -I$(top_srcdir)/nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE 
    88AM_CXXFLAGS = -Wall -Werror 
     9AM_CFLAGS = -Wall 
    910AM_LDFLAGS = -lpcre 
    1011 
     
    1314 
    1415shellcodesignatures_la_SOURCES = shellcode-signatures.sc  
    15 shellcodesignatures_la_SOURCES += y.tab.c lex.yy.c y.tab.h 
     16shellcodesignatures_la_SOURCES += y.tab.c lex.nepenthes_shellcodesignatures_yy.c y.tab.h 
    1617shellcodesignatures_la_SOURCES += parser.hpp parser.h 
    1718shellcodesignatures_la_SOURCES += shellcode-signatures.cpp shellcode-signatures.hpp  
  • nepenthes/trunk/modules/shellcode-signatures/Makefile.parser

    r422 r529  
    44 
    55lex.yy.c: parser.l 
    6         lex $^ 
     6        lex -P nepenthes_shellcodesignatures_yy $^ 
    77 
    88y.tab.c: parser.y 
    9         yacc -d $^ 
     9        yacc -p nepenthes_shellcodesignatures_yy -d $^ 
    1010 
    1111clean: 
  • nepenthes/trunk/modules/shellcode-signatures/lex.nepenthes_shellcodesignatures_yy.c

    r521 r529  
    11 
    2 #line 3 "lex.yy.c" 
     2#line 3 "lex.nepenthes_shellcodesignatures_yy.c" 
    33 
    44#define  YY_INT_ALIGNED short int 
     
    126126 
    127127/* Special action meaning "start processing a new file". */ 
    128 #define YY_NEW_FILE yyrestart(yyin  ) 
     128#define YY_NEW_FILE nepenthes_shellcodesignatures_yyrestart(nepenthes_shellcodesignatures_yyin  ) 
    129129 
    130130#define YY_END_OF_BUFFER_CHAR 0 
     
    140140#endif 
    141141 
    142 extern int yyleng; 
    143  
    144 extern FILE *yyin, *yyout; 
     142extern int nepenthes_shellcodesignatures_yyleng; 
     143 
     144extern FILE *nepenthes_shellcodesignatures_yyin, *nepenthes_shellcodesignatures_yyout; 
    145145 
    146146#define EOB_ACT_CONTINUE_SCAN 0 
     
    154154        do \ 
    155155                { \ 
    156                 /* Undo effects of setting up yytext. */ \ 
     156                /* Undo effects of setting up nepenthes_shellcodesignatures_yytext. */ \ 
    157157        int yyless_macro_arg = (n); \ 
    158158        YY_LESS_LINENO(yyless_macro_arg);\ 
     
    160160                YY_RESTORE_YY_MORE_OFFSET \ 
    161161                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 
    162                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 
     162                YY_DO_BEFORE_ACTION; /* set up nepenthes_shellcodesignatures_yytext again */ \ 
    163163                } \ 
    164164        while ( 0 ) 
     
    233233         * 
    234234         * When we actually see the EOF, we change the status to "new" 
    235          * (via yyrestart()), so that the user can continue scanning by 
    236          * just pointing yyin at a new input file. 
     235         * (via nepenthes_shellcodesignatures_yyrestart()), so that the user can continue scanning by 
     236         * just pointing nepenthes_shellcodesignatures_yyin at a new input file. 
    237237         */ 
    238238#define YY_BUFFER_EOF_PENDING 2 
     
    261261#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 
    262262 
    263 /* yy_hold_char holds the character lost when yytext is formed. */ 
     263/* yy_hold_char holds the character lost when nepenthes_shellcodesignatures_yytext is formed. */ 
    264264static char yy_hold_char; 
    265265static int yy_n_chars;          /* number of characters read into yy_ch_buf */ 
    266 int yyleng; 
     266int nepenthes_shellcodesignatures_yyleng; 
    267267 
    268268/* Points to current character in buffer. */ 
     
    271271static int yy_start = 0;        /* start state number */ 
    272272 
    273 /* Flag which is used to allow yywrap()'s to do buffer switches 
    274  * instead of setting up a fresh yyin.  A bit of a hack ... 
     273/* Flag which is used to allow nepenthes_shellcodesignatures_yywrap()'s to do buffer switches 
     274 * instead of setting up a fresh nepenthes_shellcodesignatures_yyin.  A bit of a hack ... 
    275275 */ 
    276276static int yy_did_buffer_switch_on_eof; 
    277277 
    278 void yyrestart (FILE *input_file  ); 
    279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
    280 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  ); 
    281 void yy_delete_buffer (YY_BUFFER_STATE b  ); 
    282 void yy_flush_buffer (YY_BUFFER_STATE b  ); 
    283 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); 
    284 void yypop_buffer_state (void ); 
    285  
    286 static void yyensure_buffer_stack (void ); 
    287 static void yy_load_buffer_state (void ); 
    288 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
    289  
    290 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 
    291  
    292 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  ); 
    293 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  ); 
    294 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  ); 
    295  
    296 void *yyalloc (yy_size_t  ); 
    297 void *yyrealloc (void *,yy_size_t  ); 
    298 void yyfree (void *  ); 
    299  
    300 #define yy_new_buffer yy_create_buffer 
     278void nepenthes_shellcodesignatures_yyrestart (FILE *input_file  ); 
     279void nepenthes_shellcodesignatures_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
     280YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_create_buffer (FILE *file,int size  ); 
     281void nepenthes_shellcodesignatures_yy_delete_buffer (YY_BUFFER_STATE b  ); 
     282void nepenthes_shellcodesignatures_yy_flush_buffer (YY_BUFFER_STATE b  ); 
     283void nepenthes_shellcodesignatures_yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); 
     284void nepenthes_shellcodesignatures_yypop_buffer_state (void ); 
     285 
     286static void nepenthes_shellcodesignatures_yyensure_buffer_stack (void ); 
     287static void nepenthes_shellcodesignatures_yy_load_buffer_state (void ); 
     288static void nepenthes_shellcodesignatures_yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
     289 
     290#define YY_FLUSH_BUFFER nepenthes_shellcodesignatures_yy_flush_buffer(YY_CURRENT_BUFFER ) 
     291 
     292YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_buffer (char *base,yy_size_t size  ); 
     293YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_string (yyconst char *yy_str  ); 
     294YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_bytes (yyconst char *bytes,int len  ); 
     295 
     296void *nepenthes_shellcodesignatures_yyalloc (yy_size_t  ); 
     297void *nepenthes_shellcodesignatures_yyrealloc (void *,yy_size_t  ); 
     298void nepenthes_shellcodesignatures_yyfree (void *  ); 
     299 
     300#define yy_new_buffer nepenthes_shellcodesignatures_yy_create_buffer 
    301301 
    302302#define yy_set_interactive(is_interactive) \ 
    303303        { \ 
    304304        if ( ! YY_CURRENT_BUFFER ){ \ 
    305         yyensure_buffer_stack (); \ 
     305        nepenthes_shellcodesignatures_yyensure_buffer_stack (); \ 
    306306                YY_CURRENT_BUFFER_LVALUE =    \ 
    307             yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     307            nepenthes_shellcodesignatures_yy_create_buffer(nepenthes_shellcodesignatures_yyin,YY_BUF_SIZE ); \ 
    308308        } \ 
    309309        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 
     
    313313        { \ 
    314314        if ( ! YY_CURRENT_BUFFER ){\ 
    315         yyensure_buffer_stack (); \ 
     315        nepenthes_shellcodesignatures_yyensure_buffer_stack (); \ 
    316316                YY_CURRENT_BUFFER_LVALUE =    \ 
    317             yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     317            nepenthes_shellcodesignatures_yy_create_buffer(nepenthes_shellcodesignatures_yyin,YY_BUF_SIZE ); \ 
    318318        } \ 
    319319        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 
     
    326326typedef unsigned char YY_CHAR; 
    327327 
    328 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 
     328FILE *nepenthes_shellcodesignatures_yyin = (FILE *) 0, *nepenthes_shellcodesignatures_yyout = (FILE *) 0; 
    329329 
    330330typedef int yy_state_type; 
    331331 
    332 extern int yylineno; 
    333  
    334 int yylineno = 1; 
    335  
    336 extern char *yytext; 
    337 #define yytext_ptr yytext 
     332extern int nepenthes_shellcodesignatures_yylineno; 
     333 
     334int nepenthes_shellcodesignatures_yylineno = 1; 
     335 
     336extern char *nepenthes_shellcodesignatures_yytext; 
     337#define yytext_ptr nepenthes_shellcodesignatures_yytext 
    338338 
    339339static yy_state_type yy_get_previous_state (void ); 
     
    343343 
    344344/* Done after the current pattern has been matched and before the 
    345  * corresponding action - sets up yytext. 
     345 * corresponding action - sets up nepenthes_shellcodesignatures_yytext. 
    346346 */ 
    347347#define YY_DO_BEFORE_ACTION \ 
    348348        (yytext_ptr) = yy_bp; \ 
    349         yyleng = (size_t) (yy_cp - yy_bp); \ 
     349        nepenthes_shellcodesignatures_yyleng = (size_t) (yy_cp - yy_bp); \ 
    350350        (yy_hold_char) = *yy_cp; \ 
    351351        *yy_cp = '\0'; \ 
     
    580580static char *yy_last_accepting_cpos; 
    581581 
    582 extern int yy_flex_debug; 
    583 int yy_flex_debug = 0; 
     582extern int nepenthes_shellcodesignatures_yy_flex_debug; 
     583int nepenthes_shellcodesignatures_yy_flex_debug = 0; 
    584584 
    585585/* The intent behind this definition is that it'll catch 
     
    590590#define YY_MORE_ADJ 0 
    591591#define YY_RESTORE_YY_MORE_OFFSET 
    592 char *yytext; 
     592char *nepenthes_shellcodesignatures_yytext; 
    593593#line 1 "parser.l" 
    594594/* $Id$ */ 
     
    608608 
    609609 
    610 #line 611 "lex.yy.c" 
     610#line 611 "lex.nepenthes_shellcodesignatures_yy.c" 
    611611 
    612612#define INITIAL 0 
     
    632632#ifndef YY_SKIP_YYWRAP 
    633633#ifdef __cplusplus 
    634 extern "C" int yywrap (void ); 
     634extern "C" int nepenthes_shellcodesignatures_yywrap (void ); 
    635635#else 
    636 extern int yywrap (void ); 
     636extern int nepenthes_shellcodesignatures_yywrap (void ); 
    637637#endif 
    638638#endif 
     
    668668 * we now use fwrite(). 
    669669 */ 
    670 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 
     670#define ECHO (void) fwrite( nepenthes_shellcodesignatures_yytext, nepenthes_shellcodesignatures_yyleng, 1, nepenthes_shellcodesignatures_yyout ) 
    671671#endif 
    672672 
     
    681681                size_t n; \ 
    682682                for ( n = 0; n < max_size && \ 
    683                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 
     683                             (c = getc( nepenthes_shellcodesignatures_yyin )) != EOF && c != '\n'; ++n ) \ 
    684684                        buf[n] = (char) c; \ 
    685685                if ( c == '\n' ) \ 
    686686                        buf[n++] = (char) c; \ 
    687                 if ( c == EOF && ferror( yyin ) ) \ 
     687                if ( c == EOF && ferror( nepenthes_shellcodesignatures_yyin ) ) \ 
    688688                        YY_FATAL_ERROR( "input in flex scanner failed" ); \ 
    689689                result = n; \ 
     
    692692                { \ 
    693693                errno=0; \ 
    694                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 
     694                while ( (result = fread(buf, 1, max_size, nepenthes_shellcodesignatures_yyin))==0 && ferror(nepenthes_shellcodesignatures_yyin)) \ 
    695695                        { \ 
    696696                        if( errno != EINTR) \ 
     
    700700                                } \ 
    701701                        errno=0; \ 
    702                         clearerr(yyin); \ 
     702                        clearerr(nepenthes_shellcodesignatures_yyin); \ 
    703703                        } \ 
    704704                }\ 
     
    733733#define YY_DECL_IS_OURS 1 
    734734 
    735 extern int yylex (void); 
    736  
    737 #define YY_DECL int yylex (void) 
     735extern int nepenthes_shellcodesignatures_yylex (void); 
     736 
     737#define YY_DECL int nepenthes_shellcodesignatures_yylex (void) 
    738738#endif /* !YY_DECL */ 
    739739 
    740 /* Code executed at the beginning of each rule, after yytext and yyleng 
     740/* Code executed at the beginning of each rule, after nepenthes_shellcodesignatures_yytext and nepenthes_shellcodesignatures_yyleng 
    741741 * have been set up. 
    742742 */ 
     
    765765 
    766766 
    767 #line 768 "lex.yy.c" 
     767#line 768 "lex.nepenthes_shellcodesignatures_yy.c" 
    768768 
    769769        if ( (yy_init) ) 
     
    778778                        (yy_start) = 1; /* first start state */ 
    779779 
    780                 if ( ! yyin ) 
    781                         yyin = stdin; 
    782  
    783                 if ( ! yyout ) 
    784                         yyout = stdout; 
     780                if ( ! nepenthes_shellcodesignatures_yyin ) 
     781                        nepenthes_shellcodesignatures_yyin = stdin; 
     782 
     783                if ( ! nepenthes_shellcodesignatures_yyout ) 
     784                        nepenthes_shellcodesignatures_yyout = stdout; 
    785785 
    786786                if ( ! YY_CURRENT_BUFFER ) { 
    787                         yyensure_buffer_stack (); 
     787                        nepenthes_shellcodesignatures_yyensure_buffer_stack (); 
    788788                        YY_CURRENT_BUFFER_LVALUE = 
    789                                 yy_create_buffer(yyin,YY_BUF_SIZE ); 
     789                                nepenthes_shellcodesignatures_yy_create_buffer(nepenthes_shellcodesignatures_yyin,YY_BUF_SIZE ); 
    790790                } 
    791791 
    792                 yy_load_buffer_state( ); 
     792                nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    793793                } 
    794794 
     
    797797                yy_cp = (yy_c_buf_p); 
    798798 
    799                 /* Support of yytext. */ 
     799                /* Support of nepenthes_shellcodesignatures_yytext. */ 
    800800                *yy_cp = (yy_hold_char); 
    801801 
     
    10461046YY_RULE_SETUP 
    10471047#line 75 "parser.l" 
    1048 { string_append(yytext, yyleng); return SC_ID; } 
     1048{ string_append(nepenthes_shellcodesignatures_yytext, nepenthes_shellcodesignatures_yyleng); return SC_ID; } 
    10491049        YY_BREAK 
    10501050case 41: 
     
    11181118#line 92 "parser.l" 
    11191119{ 
    1120         char hexval[] = {'0', 'x', *(yytext + 2), *(yytext + 3), '\0'}; 
     1120        char hexval[] = {'0', 'x', *(nepenthes_shellcodesignatures_yytext + 2), *(nepenthes_shellcodesignatures_yytext + 3), '\0'}; 
    11211121        unsigned int c; 
    11221122 
     
    11291129YY_RULE_SETUP 
    11301130#line 99 "parser.l" 
    1131 { string_append(yytext, yyleng); } 
     1131{ string_append(nepenthes_shellcodesignatures_yytext, nepenthes_shellcodesignatures_yyleng); } 
    11321132        YY_BREAK 
    11331133case 56: 
     
    11621162ECHO; 
    11631163        YY_BREAK 
    1164 #line 1165 "lex.yy.c" 
     1164#line 1165 "lex.nepenthes_shellcodesignatures_yy.c" 
    11651165case YY_STATE_EOF(INITIAL): 
    11661166case YY_STATE_EOF(comment): 
     
    11811181                        /* We're scanning a new file or input source.  It's 
    11821182                         * possible that this happened because the user 
    1183                          * just pointed yyin at a new source and called 
    1184                          * yylex().  If so, then we have to assure 
     1183                         * just pointed nepenthes_shellcodesignatures_yyin at a new source and called 
     1184                         * nepenthes_shellcodesignatures_yylex().  If so, then we have to assure 
    11851185                         * consistency between YY_CURRENT_BUFFER and our 
    11861186                         * globals.  Here is the right place to do so, because 
     
    11891189                         */ 
    11901190                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
    1191                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 
     1191                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = nepenthes_shellcodesignatures_yyin; 
    11921192                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 
    11931193                        } 
     
    12421242                                (yy_did_buffer_switch_on_eof) = 0; 
    12431243 
    1244                                 if ( yywrap( ) ) 
     1244                                if ( nepenthes_shellcodesignatures_yywrap( ) ) 
    12451245                                        { 
    12461246                                        /* Note: because we've taken care in 
    12471247                                         * yy_get_next_buffer() to have set up 
    1248                                          * yytext, we can now set up 
     1248                                         * nepenthes_shellcodesignatures_yytext, we can now set up 
    12491249                                         * yy_c_buf_p so that if some total 
    12501250                                         * hoser (like flex itself) wants to 
     
    12951295        } /* end of action switch */ 
    12961296                } /* end of scanning one token */ 
    1297 } /* end of yylex */ 
     1297} /* end of nepenthes_shellcodesignatures_yylex */ 
    12981298 
    12991299/* yy_get_next_buffer - try to read in a new buffer 
     
    13731373                                b->yy_ch_buf = (char *) 
    13741374                                        /* Include room in for 2 EOB chars. */ 
    1375                                         yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); 
     1375                                        nepenthes_shellcodesignatures_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); 
    13761376                                } 
    13771377                        else 
     
    14051405                        { 
    14061406                        ret_val = EOB_ACT_END_OF_FILE; 
    1407                         yyrestart(yyin  ); 
     1407                        nepenthes_shellcodesignatures_yyrestart(nepenthes_shellcodesignatures_yyin  ); 
    14081408                        } 
    14091409 
     
    14911491    yy_cp = (yy_c_buf_p); 
    14921492 
    1493         /* undo effects of setting up yytext */ 
     1493        /* undo effects of setting up nepenthes_shellcodesignatures_yytext */ 
    14941494        *yy_cp = (yy_hold_char); 
    14951495 
     
    15631563 
    15641564                                        /* Reset buffer status. */ 
    1565                                         yyrestart(yyin ); 
     1565                                        nepenthes_shellcodesignatures_yyrestart(nepenthes_shellcodesignatures_yyin ); 
    15661566 
    15671567                                        /*FALLTHROUGH*/ 
     
    15691569                                case EOB_ACT_END_OF_FILE: 
    15701570                                        { 
    1571                                         if ( yywrap( ) ) 
     1571                                        if ( nepenthes_shellcodesignatures_yywrap( ) ) 
    15721572                                                return EOF; 
    15731573 
     
    15891589 
    15901590        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */ 
    1591         *(yy_c_buf_p) = '\0';   /* preserve yytext */ 
     1591        *(yy_c_buf_p) = '\0';   /* preserve nepenthes_shellcodesignatures_yytext */ 
    15921592        (yy_hold_char) = *++(yy_c_buf_p); 
    15931593 
     
    16011601 * @note This function does not reset the start condition to @c INITIAL . 
    16021602 */ 
    1603     void yyrestart  (FILE * input_file ) 
     1603    void nepenthes_shellcodesignatures_yyrestart  (FILE * input_file ) 
    16041604{ 
    16051605     
    16061606        if ( ! YY_CURRENT_BUFFER ){ 
    1607         yyensure_buffer_stack (); 
     1607        nepenthes_shellcodesignatures_yyensure_buffer_stack (); 
    16081608                YY_CURRENT_BUFFER_LVALUE = 
    1609             yy_create_buffer(yyin,YY_BUF_SIZE ); 
     1609            nepenthes_shellcodesignatures_yy_create_buffer(nepenthes_shellcodesignatures_yyin,YY_BUF_SIZE ); 
    16101610        } 
    16111611 
    1612         yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 
    1613         yy_load_buffer_state( ); 
     1612        nepenthes_shellcodesignatures_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 
     1613        nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    16141614} 
    16151615 
     
    16181618 *  
    16191619 */ 
    1620     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) 
     1620    void nepenthes_shellcodesignatures_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) 
    16211621{ 
    16221622     
    16231623        /* TODO. We should be able to replace this entire function body 
    16241624         * with 
    1625          *              yypop_buffer_state(); 
    1626          *              yypush_buffer_state(new_buffer); 
     1625         *              nepenthes_shellcodesignatures_yypop_buffer_state(); 
     1626         *              nepenthes_shellcodesignatures_yypush_buffer_state(new_buffer); 
    16271627     */ 
    1628         yyensure_buffer_stack (); 
     1628        nepenthes_shellcodesignatures_yyensure_buffer_stack (); 
    16291629        if ( YY_CURRENT_BUFFER == new_buffer ) 
    16301630                return; 
     
    16391639 
    16401640        YY_CURRENT_BUFFER_LVALUE = new_buffer; 
    1641         yy_load_buffer_state( ); 
     1641        nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    16421642 
    16431643        /* We don't actually know whether we did this switch during 
    1644          * EOF (yywrap()) processing, but the only time this flag 
    1645          * is looked at is after yywrap() is called, so it's safe 
     1644         * EOF (nepenthes_shellcodesignatures_yywrap()) processing, but the only time this flag 
     1645         * is looked at is after nepenthes_shellcodesignatures_yywrap() is called, so it's safe 
    16461646         * to go ahead and always set it. 
    16471647         */ 
     
    16491649} 
    16501650 
    1651 static void yy_load_buffer_state  (void) 
     1651static void nepenthes_shellcodesignatures_yy_load_buffer_state  (void) 
    16521652{ 
    16531653        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
    16541654        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 
    1655         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 
     1655        nepenthes_shellcodesignatures_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 
    16561656        (yy_hold_char) = *(yy_c_buf_p); 
    16571657} 
     
    16631663 * @return the allocated buffer state. 
    16641664 */ 
    1665     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size ) 
     1665    YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_create_buffer  (FILE * file, int  size ) 
    16661666{ 
    16671667        YY_BUFFER_STATE b; 
    16681668     
    1669         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); 
     1669        b = (YY_BUFFER_STATE) nepenthes_shellcodesignatures_yyalloc(sizeof( struct yy_buffer_state )  ); 
    16701670        if ( ! b ) 
    1671                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     1671                YY_FATAL_ERROR( "out of dynamic memory in nepenthes_shellcodesignatures_yy_create_buffer()" ); 
    16721672 
    16731673        b->yy_buf_size = size; 
     
    16761676         * we need to put in 2 end-of-buffer characters. 
    16771677         */ 
    1678         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  ); 
     1678        b->yy_ch_buf = (char *) nepenthes_shellcodesignatures_yyalloc(b->yy_buf_size + 2  ); 
    16791679        if ( ! b->yy_ch_buf ) 
    1680                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     1680                YY_FATAL_ERROR( "out of dynamic memory in nepenthes_shellcodesignatures_yy_create_buffer()" ); 
    16811681 
    16821682        b->yy_is_our_buffer = 1; 
    16831683 
    1684         yy_init_buffer(b,file ); 
     1684        nepenthes_shellcodesignatures_yy_init_buffer(b,file ); 
    16851685 
    16861686        return b; 
     
    16881688 
    16891689/** Destroy the buffer. 
    1690  * @param b a buffer created with yy_create_buffer() 
     1690 * @param b a buffer created with nepenthes_shellcodesignatures_yy_create_buffer() 
    16911691 *  
    16921692 */ 
    1693     void yy_delete_buffer (YY_BUFFER_STATE  b ) 
     1693    void nepenthes_shellcodesignatures_yy_delete_buffer (YY_BUFFER_STATE  b ) 
    16941694{ 
    16951695     
     
    17011701 
    17021702        if ( b->yy_is_our_buffer ) 
    1703                 yyfree((void *) b->yy_ch_buf  ); 
    1704  
    1705         yyfree((void *) b  ); 
     1703                nepenthes_shellcodesignatures_yyfree((void *) b->yy_ch_buf  ); 
     1704 
     1705        nepenthes_shellcodesignatures_yyfree((void *) b  ); 
    17061706} 
    17071707 
     
    17121712/* Initializes or reinitializes a buffer. 
    17131713 * This function is sometimes called more than once on the same buffer, 
    1714  * such as during a yyrestart() or at EOF. 
    1715  */ 
    1716     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file ) 
     1714 * such as during a nepenthes_shellcodesignatures_yyrestart() or at EOF. 
     1715 */ 
     1716    static void nepenthes_shellcodesignatures_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file ) 
    17171717 
    17181718{ 
    17191719        int oerrno = errno; 
    17201720     
    1721         yy_flush_buffer(b ); 
     1721        nepenthes_shellcodesignatures_yy_flush_buffer(b ); 
    17221722 
    17231723        b->yy_input_file = file; 
    17241724        b->yy_fill_buffer = 1; 
    17251725 
    1726     /* If b is the current buffer, then yy_init_buffer was _probably_ 
    1727      * called from yyrestart() or through yy_get_next_buffer. 
     1726    /* If b is the current buffer, then nepenthes_shellcodesignatures_yy_init_buffer was _probably_ 
     1727     * called from nepenthes_shellcodesignatures_yyrestart() or through yy_get_next_buffer. 
    17281728     * In that case, we don't want to reset the lineno or column. 
    17291729     */ 
     
    17421742 *  
    17431743 */ 
    1744     void yy_flush_buffer (YY_BUFFER_STATE  b ) 
     1744    void nepenthes_shellcodesignatures_yy_flush_buffer (YY_BUFFER_STATE  b ) 
    17451745{ 
    17461746        if ( ! b ) 
     
    17621762 
    17631763        if ( b == YY_CURRENT_BUFFER ) 
    1764                 yy_load_buffer_state( ); 
     1764                nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    17651765} 
    17661766 
     
    17711771 *   
    17721772 */ 
    1773 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 
     1773void nepenthes_shellcodesignatures_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 
    17741774{ 
    17751775        if (new_buffer == NULL) 
    17761776                return; 
    17771777 
    1778         yyensure_buffer_stack(); 
    1779  
    1780         /* This block is copied from yy_switch_to_buffer. */ 
     1778        nepenthes_shellcodesignatures_yyensure_buffer_stack(); 
     1779 
     1780        /* This block is copied from nepenthes_shellcodesignatures_yy_switch_to_buffer. */ 
    17811781        if ( YY_CURRENT_BUFFER ) 
    17821782                { 
     
    17921792        YY_CURRENT_BUFFER_LVALUE = new_buffer; 
    17931793 
    1794         /* copied from yy_switch_to_buffer. */ 
    1795         yy_load_buffer_state( ); 
     1794        /* copied from nepenthes_shellcodesignatures_yy_switch_to_buffer. */ 
     1795        nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    17961796        (yy_did_buffer_switch_on_eof) = 1; 
    17971797} 
     
    18011801 *   
    18021802 */ 
    1803 void yypop_buffer_state (void) 
     1803void nepenthes_shellcodesignatures_yypop_buffer_state (void) 
    18041804{ 
    18051805        if (!YY_CURRENT_BUFFER) 
    18061806                return; 
    18071807 
    1808         yy_delete_buffer(YY_CURRENT_BUFFER ); 
     1808        nepenthes_shellcodesignatures_yy_delete_buffer(YY_CURRENT_BUFFER ); 
    18091809        YY_CURRENT_BUFFER_LVALUE = NULL; 
    18101810        if ((yy_buffer_stack_top) > 0) 
     
    18121812 
    18131813        if (YY_CURRENT_BUFFER) { 
    1814                 yy_load_buffer_state( ); 
     1814                nepenthes_shellcodesignatures_yy_load_buffer_state( ); 
    18151815                (yy_did_buffer_switch_on_eof) = 1; 
    18161816        } 
     
    18201820 *  Guarantees space for at least one push. 
    18211821 */ 
    1822 static void yyensure_buffer_stack (void) 
     1822static void nepenthes_shellcodesignatures_yyensure_buffer_stack (void) 
    18231823{ 
    18241824        int num_to_alloc; 
     
    18311831         */ 
    18321832                num_to_alloc = 1; 
    1833                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 
     1833                (yy_buffer_stack) = (struct yy_buffer_state**)nepenthes_shellcodesignatures_yyalloc 
    18341834                                                                (num_to_alloc * sizeof(struct yy_buffer_state*) 
    18351835                                                                ); 
     
    18481848 
    18491849                num_to_alloc = (yy_buffer_stack_max) + grow_size; 
    1850                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 
     1850                (yy_buffer_stack) = (struct yy_buffer_state**)nepenthes_shellcodesignatures_yyrealloc 
    18511851                                                                ((yy_buffer_stack), 
    18521852                                                                num_to_alloc * sizeof(struct yy_buffer_state*) 
     
    18651865 * @return the newly allocated buffer state object.  
    18661866 */ 
    1867 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size ) 
     1867YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_buffer  (char * base, yy_size_t  size ) 
    18681868{ 
    18691869        YY_BUFFER_STATE b; 
     
    18751875                return 0; 
    18761876 
    1877         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); 
     1877        b = (YY_BUFFER_STATE) nepenthes_shellcodesignatures_yyalloc(sizeof( struct yy_buffer_state )  ); 
    18781878        if ( ! b ) 
    1879                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 
     1879                YY_FATAL_ERROR( "out of dynamic memory in nepenthes_shellcodesignatures_yy_scan_buffer()" ); 
    18801880 
    18811881        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */ 
     
    18891889        b->yy_buffer_status = YY_BUFFER_NEW; 
    18901890 
    1891         yy_switch_to_buffer(b  ); 
     1891        nepenthes_shellcodesignatures_yy_switch_to_buffer(b  ); 
    18921892 
    18931893        return b; 
    18941894} 
    18951895 
    1896 /** Setup the input buffer state to scan a string. The next call to yylex() will 
     1896/** Setup the input buffer state to scan a string. The next call to nepenthes_shellcodesignatures_yylex() will 
    18971897 * scan from a @e copy of @a str. 
    18981898 * @param str a NUL-terminated string to scan 
     
    19011901 * @return the newly allocated buffer state object. 
    19021902 * @note If you want to scan bytes that may contain NUL values, then use 
    1903  *       yy_scan_bytes() instead. 
    1904  */ 
    1905 YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str ) 
     1903 *       nepenthes_shellcodesignatures_yy_scan_bytes() instead. 
     1904 */ 
     1905YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_string (yyconst char * yy_str ) 
    19061906{ 
    19071907     
    1908         return yy_scan_bytes(yy_str,strlen(yy_str) ); 
    1909 } 
    1910  
    1911 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 
     1908        return nepenthes_shellcodesignatures_yy_scan_bytes(yy_str,strlen(yy_str) ); 
     1909} 
     1910 
     1911/** Setup the input buffer state to scan the given bytes. The next call to nepenthes_shellcodesignatures_yylex() will 
    19121912 * scan from a @e copy of @a bytes. 
    19131913 * @param bytes the byte buffer to scan 
     
    19161916 * @return the newly allocated buffer state object. 
    19171917 */ 
    1918 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * bytes, int  len ) 
     1918YY_BUFFER_STATE nepenthes_shellcodesignatures_yy_scan_bytes  (yyconst char * bytes, int  len ) 
    19191919{ 
    19201920        YY_BUFFER_STATE b; 
     
    19251925        /* Get memory for full buffer, including space for trailing EOB's. */ 
    19261926        n = len + 2; 
    1927         buf = (char *) yyalloc(n  ); 
     1927        buf = (char *) nepenthes_shellcodesignatures_yyalloc(n  ); 
    19281928        if ( ! buf ) 
    1929                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 
     1929                YY_FATAL_ERROR( "out of dynamic memory in nepenthes_shellcodesignatures_yy_scan_bytes()" ); 
    19301930 
    19311931        for ( i = 0; i < len; ++i ) 
     
    19341934        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 
    19351935 
    1936         b = yy_scan_buffer(buf,n ); 
     1936        b = nepenthes_shellcodesignatures_yy_scan_buffer(buf,n ); 
    19371937        if ( ! b ) 
    1938                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 
     1938                YY_FATAL_ERROR( "bad buffer in nepenthes_shellcodesignatures_yy_scan_bytes()" ); 
    19391939 
    19401940        /* It's okay to grow etc. this buffer, and we should throw it 
     
    19621962        do \ 
    19631963                { \ 
    1964                 /* Undo effects of setting up yytext. */ \ 
     1964                /* Undo effects of setting up nepenthes_shellcodesignatures_yytext. */ \ 
    19651965        int yyless_macro_arg = (n); \ 
    19661966        YY_LESS_LINENO(yyless_macro_arg);\ 
    1967                 yytext[yyleng] = (yy_hold_char); \ 
    1968                 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 
     1967                nepenthes_shellcodesignatures_yytext[nepenthes_shellcodesignatures_yyleng] = (yy_hold_char); \ 
     1968                (yy_c_buf_p) = nepenthes_shellcodesignatures_yytext + yyless_macro_arg; \ 
    19691969                (yy_hold_char) = *(yy_c_buf_p); \ 
    19701970                *(yy_c_buf_p) = '\0'; \ 
    1971                 yyleng = yyless_macro_arg; \ 
     1971                nepenthes_shellcodesignatures_yyleng = yyless_macro_arg; \ 
    19721972                } \ 
    19731973        while ( 0 ) 
     
    19781978 *  
    19791979 */ 
    1980 int yyget_lineno  (void) 
     1980int nepenthes_shellcodesignatures_yyget_lineno  (void) 
    19811981{ 
    19821982         
    1983     return yylineno; 
     1983    return nepenthes_shellcodesignatures_yylineno; 
    19841984} 
    19851985 
     
    19871987 *  
    19881988 */ 
    1989 FILE *yyget_in  (void) 
    1990 { 
    1991         return yyin; 
     1989FILE *nepenthes_shellcodesignatures_yyget_in  (void) 
     1990{ 
     1991        return nepenthes_shellcodesignatures_yyin; 
    19921992} 
    19931993 
     
    19951995 *  
    19961996 */ 
    1997 FILE *yyget_out  (void) 
    1998 { 
    1999         return yyout; 
     1997FILE *nepenthes_shellcodesignatures_yyget_out  (void) 
     1998{ 
     1999        return nepenthes_shellcodesignatures_yyout; 
    20002000} 
    20012001 
     
    20032003 *  
    20042004 */ 
    2005 int yyget_leng  (void) 
    2006 { 
    2007         return yyleng; 
     2005int nepenthes_shellcodesignatures_yyget_leng  (void) 
     2006{ 
     2007        return nepenthes_shellcodesignatures_yyleng; 
    20082008} 
    20092009 
     
    20122012 */ 
    20132013 
    2014 char *yyget_text  (void) 
    2015 { 
    2016         return yytext; 
     2014char *nepenthes_shellcodesignatures_yyget_text  (void) 
     2015{ 
     2016        return nepenthes_shellcodesignatures_yytext; 
    20172017} 
    20182018 
     
    20212021 *  
    20222022 */ 
    2023 void yyset_lineno (int  line_number ) 
     2023void nepenthes_shellcodesignatures_yyset_lineno (int  line_number ) 
    20242024{ 
    20252025     
    2026     yylineno = line_number; 
     2026    nepenthes_shellcodesignatures_yylineno = line_number; 
    20272027} 
    20282028 
     
    20312031 * @param in_str A readable stream. 
    20322032 *  
    2033  * @see yy_switch_to_buffer 
    2034  */ 
    2035 void yyset_in (FILE *  in_str ) 
    2036 { 
    2037         yyin = in_str ; 
    2038 } 
    2039  
    2040 void yyset_out (FILE *  out_str ) 
    2041 { 
    2042         yyout = out_str ; 
    2043 } 
    2044  
    2045 int yyget_debug  (void) 
    2046 { 
    2047         return yy_flex_debug; 
    2048 } 
    2049  
    2050 void yyset_debug (int  bdebug ) 
    2051 { 
    2052         yy_flex_debug = bdebug ; 
    2053 } 
    2054  
    2055 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 
    2056 int yylex_destroy  (void) 
     2033 * @see nepenthes_shellcodesignatures_yy_switch_to_buffer 
     2034 */ 
     2035void nepenthes_shellcodesignatures_yyset_in (FILE *  in_str ) 
     2036{ 
     2037        nepenthes_shellcodesignatures_yyin = in_str ; 
     2038} 
     2039 
     2040void nepenthes_shellcodesignatures_yyset_out (FILE *  out_str ) 
     2041{ 
     2042        nepenthes_shellcodesignatures_yyout = out_str ; 
     2043} 
     2044 
     2045int nepenthes_shellcodesignatures_yyget_debug  (void) 
     2046{ 
     2047        return nepenthes_shellcodesignatures_yy_flex_debug; 
     2048} 
     2049 
     2050void nepenthes_shellcodesignatures_yyset_debug (int  bdebug ) 
     2051{ 
     2052        nepenthes_shellcodesignatures_yy_flex_debug = bdebug ; 
     2053} 
     2054 
     2055/* nepenthes_shellcodesignatures_yylex_destroy is for both reentrant and non-reentrant scanners. */ 
     2056int nepenthes_shellcodesignatures_yylex_destroy  (void) 
    20572057{ 
    20582058     
    20592059    /* Pop the buffer stack, destroying each element. */ 
    20602060        while(YY_CURRENT_BUFFER){ 
    2061                 yy_delete_buffer(YY_CURRENT_BUFFER  ); 
     2061                nepenthes_shellcodesignatures_yy_delete_buffer(YY_CURRENT_BUFFER  ); 
    20622062                YY_CURRENT_BUFFER_LVALUE = NULL; 
    2063                 yypop_buffer_state(); 
     2063                nepenthes_shellcodesignatures_yypop_buffer_state(); 
    20642064        } 
    20652065 
    20662066        /* Destroy the stack itself. */ 
    2067         yyfree((yy_buffer_stack) ); 
     2067        nepenthes_shellcodesignatures_yyfree((yy_buffer_stack) ); 
    20682068        (yy_buffer_stack) = NULL; 
    20692069 
     
    20952095#endif 
    20962096 
    2097 void *yyalloc (yy_size_t  size ) 
     2097void *nepenthes_shellcodesignatures_yyalloc (yy_size_t  size ) 
    20982098{ 
    20992099        return (void *) malloc( size ); 
    21002100} 
    21012101 
    2102 void *yyrealloc  (void * ptr, yy_size_t  size ) 
     2102void *nepenthes_shellcodesignatures_yyrealloc  (void * ptr, yy_size_t  size ) 
    21032103{ 
    21042104        /* The cast to (char *) in the following accommodates both 
     
    21122112} 
    21132113 
    2114 void yyfree (void * ptr ) 
    2115 { 
    2116         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */ 
     2114void nepenthes_shellcodesignatures_yyfree (void * ptr ) 
     2115{ 
     2116        free( (char *) ptr );   /* see nepenthes_shellcodesignatures_yyrealloc() for (char *) cast */ 
    21172117} 
    21182118 
  • nepenthes/trunk/modules/shell