64 #line 31 "pointer_to_struct.pgc"
65 struct varchar_2 {
int len;
char arr[ 50 ]; }
name ;
67 #line 32 "pointer_to_struct.pgc"
71 #line 33 "pointer_to_struct.pgc"
90 #line 27 "pointer_to_struct.pgc"
93 #line 28 "pointer_to_struct.pgc"
96 #line 34 "pointer_to_struct.pgc"
97 customer2 * custs2 = ( customer2 * )
malloc (
sizeof ( customer2 ) * 10 ) ;
99 #line 40 "pointer_to_struct.pgc"
101 #line 38 "pointer_to_struct.pgc"
104 #line 39 "pointer_to_struct.pgc"
106 } * custs3 = (
struct customer3 * )
malloc (
sizeof (
struct customer3 ) * 10 ) ;
108 #line 46 "pointer_to_struct.pgc"
110 #line 44 "pointer_to_struct.pgc"
111 struct varchar_3 {
int len;
char arr[ 50 ]; }
name ;
113 #line 45 "pointer_to_struct.pgc"
115 } * custs4 = (
struct customer4 * )
malloc (
sizeof (
struct customer4 ) ) ;
117 #line 48 "pointer_to_struct.pgc"
120 #line 49 "pointer_to_struct.pgc"
121 struct varchar_4 {
int len;
char arr[ 50 ]; } onlyname [ 2 ] ;
123 #line 50 "pointer_to_struct.pgc"
128 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
129 #line 54 "pointer_to_struct.pgc"
132 #line 54 "pointer_to_struct.pgc"
135 #line 54 "pointer_to_struct.pgc"
139 #line 56 "pointer_to_struct.pgc"
142 #line 56 "pointer_to_struct.pgc"
145 #line 56 "pointer_to_struct.pgc"
148 #line 57 "pointer_to_struct.pgc"
151 #line 57 "pointer_to_struct.pgc"
154 #line 57 "pointer_to_struct.pgc"
157 #line 57 "pointer_to_struct.pgc"
160 #line 58 "pointer_to_struct.pgc"
163 #line 58 "pointer_to_struct.pgc"
166 #line 58 "pointer_to_struct.pgc"
169 #line 58 "pointer_to_struct.pgc"
177 #line 60 "pointer_to_struct.pgc"
180 #line 60 "pointer_to_struct.pgc"
183 #line 60 "pointer_to_struct.pgc"
186 #line 60 "pointer_to_struct.pgc"
189 for (r = 0; r < 2; r++)
192 printf(
"phone - %d\n", custs1[r].phone );
196 ECPGt_varchar,&(custs2->name),(
long)50,(
long)-1,
sizeof( customer2 ),
198 ECPGt_int,&(custs2->phone),(
long)1,(
long)-1,
sizeof( customer2 ),
200 #line 68 "pointer_to_struct.pgc"
203 #line 68 "pointer_to_struct.pgc"
206 #line 68 "pointer_to_struct.pgc"
209 #line 68 "pointer_to_struct.pgc"
212 for (r = 0; r < 2; r++)
215 printf(
"phone - %d\n", custs2[r].phone );
219 ECPGt_char,&(custs3->name),(
long)50,(
long)-1,
sizeof(
struct customer3 ),
221 ECPGt_int,&(custs3->phone),(
long)1,(
long)-1,
sizeof(
struct customer3 ),
223 #line 76 "pointer_to_struct.pgc"
226 #line 76 "pointer_to_struct.pgc"
229 #line 76 "pointer_to_struct.pgc"
232 #line 76 "pointer_to_struct.pgc"
235 for (r = 0; r < 2; r++)
238 printf(
"phone - %d\n", custs3[r].phone );
242 ECPGt_varchar,&(custs4->name),(
long)50,(
long)-1,
sizeof(
struct customer4 ),
244 ECPGt_int,&(custs4->phone),(
long)1,(
long)-1,
sizeof(
struct customer4 ),
246 #line 84 "pointer_to_struct.pgc"
249 #line 84 "pointer_to_struct.pgc"
252 #line 84 "pointer_to_struct.pgc"
255 #line 84 "pointer_to_struct.pgc"
258 printf(
"name - %s\n", custs4->name.arr );
259 printf(
"phone - %d\n", custs4->phone );
262 ECPGt_varchar,(onlyname),(
long)50,(
long)2,
sizeof(
struct varchar_4),
264 #line 89 "pointer_to_struct.pgc"
267 #line 89 "pointer_to_struct.pgc"
270 #line 89 "pointer_to_struct.pgc"
273 #line 89 "pointer_to_struct.pgc"
276 for (r = 0; r < 2; r++)
278 printf(
"name - %s\n", onlyname[r].arr );
282 #line 96 "pointer_to_struct.pgc"
285 #line 96 "pointer_to_struct.pgc"
288 #line 96 "pointer_to_struct.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
struct customer::varchar_1 name