pawn-compiler/source/compiler/tests/gh_206_multiple_inputs.pwn
Zeex 736904b13f Fix bugs related to merging of input files
This patch fixes a couple of bugs related to passing multiple input files
to pawncc, e.g.

pawncc a.pwn b.pwn

Summary of changes:

* One of the specified input files could be deleted by the compiler because
  inpfname was overwritten while parsing the code (#file directives for
  example), but in the end of compilation it thought that inpfname was holding
  the name of the temporary file, so it deleted that file. To fix this we now
  store the temporary file's name separately (in tname).

* During the copying of input source code into a temporary file the last line
  of each input file was duplicated. For some reason feof() returnd zero,
  indicating the there was more data to read, but subsequent call to fgets()
  could not read anything, and the output buffer remained unchanged.

* Added a newline at the end of each input file.

This fixes #206.
2018-11-18 19:05:23 +06:00

6 lines
45 B
Plaintext

#include <console>
main() {
b_main();
}