You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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);
392
+
/* but not if we are in header mode */
393
+
fprintf(yyout,"/* Processed by ecpg (%d.%d.%d) */\n",MAJOR_VERSION,MINOR_VERSION,PATCHLEVEL);
394
+
395
+
if (header_mode== false)
396
+
{
397
+
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");
387
398
388
-
/* add some compatibility headers */
389
-
if (INFORMIX_MODE)
390
-
fprintf(yyout,"/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
399
+
/* add some compatibility headers */
400
+
if (INFORMIX_MODE)
401
+
fprintf(yyout,"/* Needed for informix compatibility */\n#include <ecpg_informix.h>\n");
391
402
392
-
fprintf(yyout,"/* End of automatic include section */\n");
403
+
fprintf(yyout,"/* End of automatic include section */\n");
404
+
}
393
405
406
+
fprintf(yyout,"#line 1 \"%s\"\n",input_filename);
407
+
394
408
/* and parse the source */
395
409
yyparse();
396
410
411
+
/* check if all cursors were indeed opened */
412
+
for (ptr=cur;ptr!=NULL;)
413
+
{
414
+
charerrortext[128];
415
+
416
+
if (!(ptr->opened))
417
+
{
418
+
/* Does not really make sense to declare a cursor but not open it */
419
+
snprintf(errortext,sizeof(errortext),"cursor `%s´ has been declared but ot opened\n",ptr->name);