ecpg will convert each input file given on the
command line to the corresponding C output file. Input files
- preferably have the extension .pgc, in which
- case the extension will be replaced by .c to
- determine the output file name. If the extension of the input file
- is not .pgc, then the output file name is
- computed by appending .c to the full file name.
+ preferably have the extension .pgc.
+ The extension will be replaced by .c to
+ determine the output file name.
The output file name can also be overridden using the
option.
base_yyout = stdout;
else
{
- output_filename = mm_strdup(input_filename);
+ output_filename = mm_alloc(strlen(input_filename) + 3);
+ strcpy(output_filename, input_filename);
ptr2ext = strrchr(output_filename, '.');
/* make extension = .c resp. .h */