- Removed debug message from preproc.y.
- Fixed some bugs in exec sql var and exec sql type command.
+
+Sat Dec 8 21:35:45 CET 2001
+
+ - Fix ecpg to allow pointer to structs.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
struct ECPGstruct_member *p,
*ind_p = NULL;
char obuf[BUFSIZ];
- char pbuf[BUFSIZ],
+ char pbuf[BUFSIZ*2],
ind_pbuf[BUFSIZ];
const char *offset;
else
offset = offsetarg;
- sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
+ if (arrsiz != 0)
+ sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
+ else
+ sprintf(pbuf, "%s%s->", prefix ? prefix : "", name);
+
prefix = pbuf;
if (ind_typ == &ecpg_no_indicator)
}
else if (ind_typ != NULL)
{
- sprintf(ind_pbuf, "%s%s.", ind_prefix ? ind_prefix : "", ind_name);
+ if (arrsiz != 0)
+ sprintf(ind_pbuf, "%s%s.", ind_prefix ? ind_prefix : "", ind_name);
+ else
+ sprintf(ind_pbuf, "%s%s->", ind_prefix ? ind_prefix : "", ind_name);
+
ind_prefix = ind_pbuf;
ind_p = ind_typ->u.members;
}
exec sql begin declare section;
struct personal_struct { str name;
birthinfo birth;
- } personal;
+ } personal, *p;
struct personal_indicator { int ind_name;
birthinfo ind_birth;
- } ind_personal;
+ } ind_personal, *i;
float ind_married;
ind children;
ind ind_children;
exec sql whenever not found do break;
+ p=&personal;
+ i=&ind_personal;
while (1) {
strcpy(msg, "fetch");
- exec sql fetch cur into :personal:ind_personal, :married:ind_married, :children.integer:ind_children.smallint;
+ exec sql fetch cur into :p:i, :married:ind_married, :children.integer:ind_children.smallint;
printf("%8.8s", personal.name.arr);
if (ind_personal.ind_birth.born >= 0)
printf(", born %ld", personal.birth.born);
if (dbgs != NULL)
fclose(dbgs);
-
return (0);
}