File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/interfaces/ecpg/preproc Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ PostgreSQL documentation
4242 <para>
4343 <command>ecpg</command> will convert each input file given on the
4444 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.
5048 The output file name can also be overridden using the
5149 <option>-o</option> option.
5250 </para>
Original file line number Diff line number Diff line change @@ -313,7 +313,8 @@ main(int argc, char *const argv[])
313313 base_yyout = stdout ;
314314 else
315315 {
316- output_filename = mm_strdup (input_filename );
316+ output_filename = mm_alloc (strlen (input_filename ) + 3 );
317+ strcpy (output_filename , input_filename );
317318
318319 ptr2ext = strrchr (output_filename , '.' );
319320 /* make extension = .c resp. .h */
You can’t perform that action at this time.
0 commit comments