File tree 2 files changed +5
-6
lines changed
src/interfaces/ecpg/preproc
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ PostgreSQL documentation
42
42
<para>
43
43
<command>ecpg</command> will convert each input file given on the
44
44
command line to the corresponding C output file. Input files
45
- preferably have the extension <filename>.pgc</filename>, in which
46
- case the extension will be replaced by <filename>.c</filename> to
47
- determine the output file name. If the extension of the input file
48
- is not <filename>.pgc</filename>, then the output file name is
49
- computed by appending <literal>.c</literal> to the full file name.
45
+ preferably have the extension <filename>.pgc</filename>.
46
+ The extension will be replaced by <filename>.c</filename> to
47
+ determine the output file name.
50
48
The output file name can also be overridden using the
51
49
<option>-o</option> option.
52
50
</para>
Original file line number Diff line number Diff line change @@ -313,7 +313,8 @@ main(int argc, char *const argv[])
313
313
base_yyout = stdout ;
314
314
else
315
315
{
316
- output_filename = mm_strdup (input_filename );
316
+ output_filename = mm_alloc (strlen (input_filename ) + 3 );
317
+ strcpy (output_filename , input_filename );
317
318
318
319
ptr2ext = strrchr (output_filename , '.' );
319
320
/* make extension = .c resp. .h */
You can’t perform that action at this time.
0 commit comments