- Fixed prototype for ECPGprepared_statement to not moan about "const char"
- Fixed parsing of nested structures.
- Added option to parse header files.
fprintf(yyout,"/* Processed by ecpg (%d.%d.%d) */\n/* These include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n#line 1 \"%s\"\n",MAJOR_VERSION,MINOR_VERSION,PATCHLEVEL,input_filename);
/* but not if we are in header mode */
fprintf(yyout,"/* Processed by ecpg (%d.%d.%d) */\n",MAJOR_VERSION,MINOR_VERSION,PATCHLEVEL);
if(header_mode==false)
{
fprintf(yyout,"/* These include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
/* add some compatibility headers */
if(INFORMIX_MODE)
fprintf(yyout,"/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
/* add some compatibility headers */
if(INFORMIX_MODE)
fprintf(yyout,"/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
fprintf(yyout,"/* End of automatic include section */\n");
fprintf(yyout,"/* End of automatic include section */\n");
}
fprintf(yyout,"#line 1 \"%s\"\n",input_filename);
/* and parse the source */
yyparse();
/* check if all cursors were indeed opened */
for(ptr=cur;ptr!=NULL;)
{
charerrortext[128];
if(!(ptr->opened))
{
/* Does not really make sense to declare a cursor but not open it */
snprintf(errortext,sizeof(errortext),"cursor `%s´ has been declared but ot opened\n",ptr->name);