Michael Meskes writes:> On Wed, Aug 08, 2001 at 09:07:18AM -0700, Lee Kindness wrote:> > I believe ecpg is incorrectly
handlingthe placement of results into a> > pointer to a host structure, consider the following function:> >
GeoContractorTabPtrptr;> This is not a pointer. This defines ptr to be a struct, doesn't it?
It's a pointer but it's conforming to some god-awful programming
practise we have in house. For example in table_strs.h there is:
/* Description of table geo_contractor from database */typedef struct GeoContractorTabStr_{ char project_id[9]; char
contractor[53];}GeoContractorTabStr, *GeoContractorTabPtr;
and in table_strs_embedded.h
/* Description of table geo_contractor from database */EXEC SQL TYPE GeoContractorTabStr IS STRUCT { char
project_id[9]; char contractor[53];};EXEC SQL TYPE GeoContractorTabPtr IS GeoContractorTabStr REFERENCE;
both are included in the C file.
Thanks, Lee Kindness.