@@ -204,11 +204,11 @@ static void ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, l
204
204
void
205
205
ECPGdump_a_type (FILE * o , const char * name , struct ECPGtype * typ , const char * ind_name , struct ECPGtype * ind_typ , const char * prefix , const char * ind_prefix )
206
206
{
207
- if (ind_typ == NULL )
207
+ /* if (ind_typ == NULL)
208
208
{
209
209
ind_typ = &ecpg_no_indicator;
210
210
ind_name = "no_indicator";
211
- }
211
+ }*/
212
212
213
213
switch (typ -> typ )
214
214
{
@@ -228,17 +228,20 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * typ, const char *in
228
228
229
229
ECPGdump_a_simple (o , name , typ -> u .element -> typ ,
230
230
typ -> u .element -> size , typ -> size , NULL , prefix );
231
- if (ind_typ -> typ == ECPGt_NO_INDICATOR )
232
- ECPGdump_a_simple (o , ind_name , ind_typ -> typ , ind_typ -> size , -1 , NULL , ind_prefix );
233
- else
231
+ if (ind_typ != NULL )
234
232
{
235
- if (ind_typ -> typ != ECPGt_array )
233
+ if (ind_typ -> typ == ECPGt_NO_INDICATOR )
234
+ ECPGdump_a_simple (o , ind_name , ind_typ -> typ , ind_typ -> size , -1 , NULL , ind_prefix );
235
+ else
236
236
{
237
- fprintf (stderr , "Indicator for an array has to be array too.\n" );
238
- exit (INDICATOR_NOT_ARRAY );
237
+ if (ind_typ -> typ != ECPGt_array )
238
+ {
239
+ fprintf (stderr , "Indicator for an array has to be array too.\n" );
240
+ exit (INDICATOR_NOT_ARRAY );
241
+ }
242
+ ECPGdump_a_simple (o , ind_name , ind_typ -> u .element -> typ ,
243
+ ind_typ -> u .element -> size , ind_typ -> size , NULL , prefix );
239
244
}
240
- ECPGdump_a_simple (o , ind_name , ind_typ -> u .element -> typ ,
241
- ind_typ -> u .element -> size , ind_typ -> size , NULL , prefix );
242
245
}
243
246
}
244
247
break ;
0 commit comments