File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -1850,6 +1850,10 @@ Tue Jul 20 09:15:21 CEST 2004
18501850
18511851 - Synced parser and keyword list.
18521852 - Fixed handling of cyclic defines.
1853+
1854+ Mon Jul 26 09:04:53 CEST 2004
1855+
1856+ - SQL defines are only used in SQL space in Informix mode.
18531857 - Set pgtypes library version to 1.2.
18541858 - Set ecpg version to 3.2.0.
18551859 - Set compat library version to 1.2.
Original file line number Diff line number Diff line change 1212 *
1313 *
1414 * IDENTIFICATION
15- * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.130 2004/07/20 18:06:41 meskes Exp $
15+ * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.131 2004/07/26 10:28:28 meskes Exp $
1616 *
1717 *-------------------------------------------------------------------------
1818 */
@@ -693,24 +693,32 @@ cppline {space}*#(.*\\{space})+.*
693693 ScanKeyword *keyword;
694694 struct _defines *ptr;
695695
696- /* is it a define? */
697- for (ptr = defines; ptr; ptr = ptr->next )
696+ if (INFORMIX_MODE)
698697 {
699- if (strcmp (yytext, ptr->old ) == 0 && ptr->used == NULL )
698+ /* Informix uses SQL defines only in SQL space */
699+ ptr = NULL ;
700+ }
701+ else
702+ {
703+ /* is it a define? */
704+ for (ptr = defines; ptr; ptr = ptr->next )
700705 {
701- struct _yy_buffer *yb;
706+ if (strcmp (yytext, ptr->old ) == 0 && ptr->used == NULL )
707+ {
708+ struct _yy_buffer *yb;
702709
703- yb = mm_alloc (sizeof (struct _yy_buffer ));
710+ yb = mm_alloc (sizeof (struct _yy_buffer ));
704711
705- yb->buffer = YY_CURRENT_BUFFER;
706- yb->lineno = yylineno;
707- yb->filename = mm_strdup (input_filename);
708- ptr->used = yb->next = yy_buffer;
712+ yb->buffer = YY_CURRENT_BUFFER;
713+ yb->lineno = yylineno;
714+ yb->filename = mm_strdup (input_filename);
715+ ptr->used = yb->next = yy_buffer;
709716
710- yy_buffer = yb;
717+ yy_buffer = yb;
711718
712- yy_scan_string (ptr->new );
713- break ;
719+ yy_scan_string (ptr->new );
720+ break ;
721+ }
714722 }
715723 }
716724
You can’t perform that action at this time.
0 commit comments