? contrib/tsearch/libtsearch.so.0.0 ? contrib/tsearch/parser.c ? contrib/tsearch/results ? contrib/tsearch/tsearch.sql Index: contrib/tsearch/parser.h =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/tsearch/Attic/parser.h,v retrieving revision 1.3 diff -c -r1.3 parser.h *** contrib/tsearch/parser.h 28 Oct 2001 06:25:41 -0000 1.3 --- contrib/tsearch/parser.h 16 Jul 2005 18:11:53 -0000 *************** *** 5,11 **** int tokenlen; int tsearch_yylex(void); void start_parse_str(char *, int); - void start_parse_fh(FILE *, int); void end_parse(void); #endif --- 5,10 ---- Index: contrib/tsearch/parser.l =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/tsearch/Attic/parser.l,v retrieving revision 1.1 diff -c -r1.1 parser.l *** contrib/tsearch/parser.l 12 Oct 2001 23:19:09 -0000 1.1 --- contrib/tsearch/parser.l 16 Jul 2005 18:11:53 -0000 *************** *** 1,56 **** %{ #include #include "deflex.h" #include "parser.h" - /* postgres allocation function */ - #include "postgres.h" - #define free pfree - #define malloc palloc - #define realloc repalloc - - #ifdef strdup - #undef strdup - #endif - #define strdup pstrdup - - char *token = NULL; /* pointer to token */ char *s = NULL; /* for returning full defis-word */ YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */ - int lrlimit = -1; /* for limiting read from filehandle ( -1 - unlimited read ) */ - int bytestoread = 0; /* for limiting read from filehandle */ - - /* redefine macro for read limited length */ - #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( tsearch_yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( tsearch_yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } else { \ - if ( lrlimit == 0 ) \ - result=YY_NULL; \ - else { \ - if ( lrlimit>0 ) { \ - bytestoread = ( lrlimit > max_size ) ? max_size : lrlimit; \ - lrlimit -= bytestoread; \ - } else \ - bytestoread = max_size; \ - if ( ((result = fread( buf, 1, bytestoread, tsearch_yyin )) == 0) \ - && ferror( tsearch_yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - } \ - } - - #define YY_NO_UNPUT %} /* parser's state for parsing defis-word */ --- 1,14 ---- %{ + #include "postgres.h" #include #include "deflex.h" #include "parser.h" char *token = NULL; /* pointer to token */ char *s = NULL; /* for returning full defis-word */ YY_BUFFER_STATE buf = NULL; /* buffer to parse; it need for parse from string */ %} /* parser's state for parsing defis-word */ *************** *** 308,320 **** BEGIN INITIAL; } - /* start parse from filehandle */ - void start_parse_fh( FILE* fh, int limit ) { - if (buf) end_parse(); - lrlimit = ( limit ) ? limit : -1; - buf = tsearch_yy_create_buffer( fh, YY_BUF_SIZE ); - tsearch_yy_switch_to_buffer( buf ); - BEGIN INITIAL; - } - --- 266,269 ----