Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd03a067

Browse files
author
Michael Meskes
committed
ecpg now recognizes named structs/unions. So you don't have to list the whole definition everytime you declare a variable anymore.
1 parent0b5b3e9 commitd03a067

File tree

10 files changed

+264
-114
lines changed

10 files changed

+264
-114
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,10 @@ Tue May 20 11:47:00 CEST 2003
14321432
- Reversed my fix for ifdef. It was the example, not ecpg which was
14331433
incorrect.
14341434
- Changed DBPATH variable to PG_DBPATH.
1435+
1436+
Thu May 22 09:33:54 CEST 2003
1437+
1438+
- ecpg now recognizes named struct/union usage.
14351439
- Set ecpg version to 2.12.0.
14361440
- Set ecpg library to 3.4.2.
14371441
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/preproc/descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ output_get_descr(char *desc_name, char *index)
192192
break;
193193
}
194194
fprintf(yyout,"%s,",get_dtype(results->value));
195-
ECPGdump_a_type(yyout,v->name,v->type,NULL,NULL,NULL,NULL,make_str("0"),NULL,NULL);
195+
ECPGdump_a_type(yyout,v->name,v->type,NULL,NULL,NULL,NULL,NULL,NULL,make_str("0"),NULL,NULL);
196196
}
197197
drop_assignments();
198198
fputs("ECPGd_EODT);\n",yyout);

‎src/interfaces/ecpg/preproc/extern.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ extern void add_descriptor(char *, char *);
7373
externvoiddrop_descriptor(char*,char*);
7474
externstructdescriptor*lookup_descriptor(char*,char*);
7575
externstructvariable*descriptor_variable(constchar*name,intinput);
76-
externvoidadd_variable(structarguments**,structvariable*,structvariable*);
77-
externvoidappend_variable(structarguments**,structvariable*,structvariable*);
76+
externvoidadd_variable(structarguments**,structvariable*,char*i,structvariable*,char*);
77+
externvoidappend_variable(structarguments**,structvariable*,char*,structvariable*,char*);
7878
externvoiddump_variables(structarguments*,int);
7979
externstructtypedefs*get_typedef(char*);
8080
externvoidadjust_array(enumECPGttype,char**,char**,char*,char*,int);

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.109 2003/05/20 11:05:27 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.110 2003/05/22 07:58:41 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -434,20 +434,6 @@ cppline{space}*#(.*\\{space})+.*
434434
else
435435
return yytext[0];
436436
}
437-
<C>{informix_special}{struct} {
438-
/* are we simulating Informix? */
439-
if (compat == ECPG_COMPAT_INFORMIX)
440-
{
441-
string_unput("typedef struct");
442-
BEGIN SQL;
443-
return SQL_START;
444-
}
445-
else
446-
{
447-
string_unput("struct");
448-
return S_ANYTHING;
449-
}
450-
}
451437
<SQL>{self}{/*
452438
* We may find a ';' inside a structure
453439
* definition in a TYPE or VAR statement.
@@ -905,7 +891,7 @@ cppline{space}*#(.*\\{space})+.*
905891

906892
<xskip>{other}{/* ignore */ }
907893

908-
<xcond>{identifier}{space}*';' {
894+
<xcond>{identifier}{space}*";" {
909895
if ( preproc_tos >= MAX_NESTED_IF-1 ) {
910896
mmerror(PARSE_ERROR, ET_FATAL,"Too many nested 'EXEC SQL IFDEF' conditions");
911897
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp