1- /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.266 2003/11/29 19:52:08 pgsql Exp $*/
1+ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.267 2003/12/17 15:23:45 meskes Exp $*/
22
33/* Copyright comment*/
44%{
@@ -271,12 +271,12 @@ add_additional_variables(char *name, bool insert)
271271/* add all those input variables that were given earlier
272272 * note that we have to append here but have to keep the existing order*/
273273for (p = ptr->argsinsert ; p; p = p->next )
274- append_variable (&argsinsert, p->variable , p->indicator );
274+ add_variable_to_tail (&argsinsert, p->variable , p->indicator );
275275}
276276
277277/* add all those output variables that were given earlier*/
278278for (p = ptr->argsresult ; p; p = p->next )
279- add_variable (&argsresult, p->variable , p->indicator );
279+ add_variable_to_tail (&argsresult, p->variable , p->indicator );
280280
281281return ptr;
282282}
@@ -4385,7 +4385,7 @@ ECPGCursorStmt: DECLARE name cursor_options CURSOR opt_hold FOR prepared_name
43854385sprintf (thisquery->name," ECPGprepared_statement(%s)" , $7 );
43864386
43874387this ->argsinsert =NULL ;
4388- add_variable (&(this ->argsinsert), thisquery, &no_indicator);
4388+ add_variable_to_head (&(this ->argsinsert), thisquery, &no_indicator);
43894389
43904390cur =this ;
43914391
@@ -5211,7 +5211,7 @@ ECPGExecute : EXECUTE IMMEDIATE execstring
52115211thisquery->next =NULL ;
52125212thisquery->name =$3 ;
52135213
5214- add_variable (&argsinsert, thisquery, &no_indicator);
5214+ add_variable_to_head (&argsinsert, thisquery, &no_indicator);
52155215
52165216$$ = make_str(" ?" );
52175217}
@@ -5225,7 +5225,7 @@ ECPGExecute : EXECUTE IMMEDIATE execstring
52255225thisquery->name = (char *) mm_alloc(sizeof (" ECPGprepared_statement()" ) + strlen($2 ));
52265226sprintf (thisquery->name," ECPGprepared_statement(%s)" , $2 );
52275227
5228- add_variable (&argsinsert, thisquery, &no_indicator);
5228+ add_variable_to_head (&argsinsert, thisquery, &no_indicator);
52295229}
52305230execute_rest
52315231{
@@ -5270,14 +5270,14 @@ ecpg_using:USING using_list { $$ = EMPTY; }
52705270
52715271using_descriptor :USING opt_sql SQL_DESCRIPTOR quoted_ident_stringvar
52725272{
5273- add_variable (&argsresult, descriptor_variable($4 ,0 ), &no_indicator);
5273+ add_variable_to_head (&argsresult, descriptor_variable($4 ,0 ), &no_indicator);
52745274$$ = EMPTY;
52755275}
52765276;
52775277
52785278into_descriptor :INTO opt_sql SQL_DESCRIPTOR quoted_ident_stringvar
52795279{
5280- add_variable (&argsresult, descriptor_variable($4 ,0 ), &no_indicator);
5280+ add_variable_to_head (&argsresult, descriptor_variable($4 ,0 ), &no_indicator);
52815281$$ = EMPTY;
52825282}
52835283;
@@ -5301,7 +5301,7 @@ UsingConst: AllConst
53015301char *length = mm_alloc(32 );
53025302
53035303sprintf (length," %d" , (int ) strlen($1 ));
5304- add_variable (&argsinsert, new_variable($1 , ECPGmake_simple_type(ECPGt_const, length), 0), &no_indicator);
5304+ add_variable_to_head (&argsinsert, new_variable($1 , ECPGmake_simple_type(ECPGt_const, length), 0), &no_indicator);
53055305}
53065306}
53075307;
@@ -6147,9 +6147,9 @@ c_args: /*EMPTY*/{ $$ = EMPTY; }
61476147;
61486148
61496149coutputvariable :CVARIABLE indicator
6150- {add_variable (&argsresult, find_variable($1 ), find_variable($2 )); }
6150+ {add_variable_to_head (&argsresult, find_variable($1 ), find_variable($2 )); }
61516151| CVARIABLE
6152- {add_variable (&argsresult, find_variable($1 ), &no_indicator); }
6152+ {add_variable_to_head (&argsresult, find_variable($1 ), &no_indicator); }
61536153;
61546154
61556155
@@ -6158,14 +6158,14 @@ civarind: CVARIABLE indicator
61586158if (find_variable($2 )->type->type == ECPGt_array)
61596159mmerror (PARSE_ERROR, ET_ERROR," arrays of indicators are not allowed on input" );
61606160
6161- add_variable (&argsinsert, find_variable($1 ), find_variable($2 ));
6161+ add_variable_to_head (&argsinsert, find_variable($1 ), find_variable($2 ));
61626162$$ = create_questionmarks($1 ,false );
61636163}
61646164;
61656165
61666166civar :CVARIABLE
61676167{
6168- add_variable (&argsinsert, find_variable($1 ), &no_indicator);
6168+ add_variable_to_head (&argsinsert, find_variable($1 ), &no_indicator);
61696169$$ = create_questionmarks($1 ,false );
61706170}
61716171;