-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.8 2009/08/07 10:51:20 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.9 2009/09/08 04:25:00 tgl Exp $ */
/* Copyright comment */
%{
static char *
make_name(void)
{
- char * name = (char *)mm_alloc(yyleng + 1);
-
- strncpy(name, yytext, yyleng);
- name[yyleng] = '\0';
- return(name);
+ return mm_strdup(yytext);
}
static char *
for (; count > 0; count --)
{
sprintf(pacounter_buffer, "$%d", pacounter++);
- result = cat_str(3, result, strdup(pacounter_buffer), make_str(" , "));
+ result = cat_str(3, result, mm_strdup(pacounter_buffer), make_str(" , "));
}
/* removed the trailing " ," */
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.74 2009/07/14 20:24:10 tgl Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.75 2009/09/08 04:25:00 tgl Exp $ */
#ifndef _ECPG_PREPROC_EXTERN_H
#define _ECPG_PREPROC_EXTERN_H
#ifdef YYDEBUG
extern int yydebug;
#endif
-extern int yylineno,
- yyleng;
+extern int yylineno;
extern FILE *yyin,
*yyout;
extern char *output_filename;