1
- /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.84 2009/08/07 10:51 :20 meskes Exp $ */
1
+ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.85 2009/09/03 09:59 :20 meskes Exp $ */
2
2
3
3
#include "postgres_fe.h"
4
4
@@ -228,7 +228,7 @@ static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
228
228
char * varcharsize ,
229
229
char * arrsiz , const char * siz , const char * prefix , int );
230
230
static void ECPGdump_a_struct (FILE * o , const char * name , const char * ind_name , char * arrsiz ,
231
- struct ECPGtype * type , struct ECPGtype * ind_type , const char * offset , const char * prefix , const char * ind_prefix );
231
+ struct ECPGtype * type , struct ECPGtype * ind_type , const char * prefix , const char * ind_prefix );
232
232
233
233
void
234
234
ECPGdump_a_type (FILE * o , const char * name , struct ECPGtype * type ,
@@ -254,7 +254,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
254
254
type -> size ,
255
255
type -> u .element ,
256
256
(ind_type == NULL ) ? NULL : ((ind_type -> type == ECPGt_NO_INDICATOR ) ? ind_type : ind_type -> u .element ),
257
- NULL , prefix , ind_prefix );
257
+ prefix , ind_prefix );
258
258
break ;
259
259
default :
260
260
if (!IS_SIMPLE_TYPE (type -> u .element -> type ))
@@ -280,7 +280,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type,
280
280
if (indicator_set && ind_type -> type != ECPGt_struct )
281
281
mmerror (INDICATOR_NOT_STRUCT , ET_FATAL , "indicator for struct has to be a struct" );
282
282
283
- ECPGdump_a_struct (o , name , ind_name , make_str ("1" ), type , ind_type , NULL , prefix , ind_prefix );
283
+ ECPGdump_a_struct (o , name , ind_name , make_str ("1" ), type , ind_type , prefix , ind_prefix );
284
284
break ;
285
285
case ECPGt_union : /* cannot dump a complete union */
286
286
base_yyerror ("type of union has to be specified" );
@@ -459,26 +459,16 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
459
459
460
460
/* Penetrate a struct and dump the contents. */
461
461
static void
462
- ECPGdump_a_struct (FILE * o , const char * name , const char * ind_name , char * arrsiz , struct ECPGtype * type , struct ECPGtype * ind_type , const char * offsetarg , const char * prefix , const char * ind_prefix )
462
+ ECPGdump_a_struct (FILE * o , const char * name , const char * ind_name , char * arrsiz , struct ECPGtype * type , struct ECPGtype * ind_type , const char * prefix , const char * ind_prefix )
463
463
{
464
464
/*
465
465
* If offset is NULL, then this is the first recursive level. If not then
466
466
* we are in a struct in a struct and the offset is used as offset.
467
467
*/
468
468
struct ECPGstruct_member * p ,
469
469
* ind_p = NULL ;
470
- char obuf [BUFSIZ ];
471
470
char pbuf [BUFSIZ ],
472
471
ind_pbuf [BUFSIZ ];
473
- const char * offset ;
474
-
475
- if (offsetarg == NULL )
476
- {
477
- sprintf (obuf , "sizeof(%s)" , name );
478
- offset = obuf ;
479
- }
480
- else
481
- offset = offsetarg ;
482
472
483
473
if (atoi (arrsiz ) == 1 )
484
474
sprintf (pbuf , "%s%s." , prefix ? prefix : "" , name );
0 commit comments