13.1.7 Output File Control
By default the output is sent to the file whose name is obtained by appending
the .pp suffix to the name of the input file
(if the file with this name already exists, it is unconditionally overwritten).
Thus if the input file is my_ada_proc.adb then
gnatpp will produce my_ada_proc.adb.pp
as output file.
The output may be redirected by the following switches:
- -pipe
- Send the output to
Standard_Output
- -o output_file
- Write the output into output_file.
If output_file already exists, gnatpp terminates without
reading or processing the input file.
- -of output_file
- Write the output into output_file, overwriting the existing file
(if one is present).
- -r
- Replace the input source file with the reformatted output, and copy the
original input source into the file whose name is obtained by appending the
.npp suffix to the name of the input file.
If a file with this name already exists, gnatpp terminates without
reading or processing the input file.
- -rf
- Like -r except that if the file with the specified name
already exists, it is overwritten.
- -rnb
- Replace the input source file with the reformatted output without
creating any backup copy of the input source.
- --eol=xxx
- Specifies the format of the reformatted output file. The xxx
string specified with the switch may be either
- “dos” MS DOS style, lines end with CR LF characters
- “crlf”
the same as crlf
- “unix” UNIX style, lines end with LF character
- “lf”
the same as unix
Options -pipe,
-o and
-of are allowed only if the call to gnatpp
contains only one file to reformat.
Option
--eol
cannot be used together
with -pipe option.