aboutsummaryrefslogtreecommitdiffstats
path: root/gpp.1
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-08-05 00:10:46 +0200
committerMattias Andrée <maandree@kth.se>2021-08-05 00:10:50 +0200
commitb91d57b505f560db25b66deff3bae80695c05703 (patch)
tree45ff5b9570d8c3d82ff7c434110e81fdf7219837 /gpp.1
parentUpdate config.mk (diff)
downloadgpp-b91d57b505f560db25b66deff3bae80695c05703.tar.gz
gpp-b91d57b505f560db25b66deff3bae80695c05703.tar.bz2
gpp-b91d57b505f560db25b66deff3bae80695c05703.tar.xz
Standardise @(( )), add -R option, and fix critical bug2.1
The bug was that if the code buffered was increased, the new character that should have been pushed to it was not pushed into the code buffer, leaving out some characters before preprocessing takes place. Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'gpp.1')
-rw-r--r--gpp.123
1 files changed, 20 insertions, 3 deletions
diff --git a/gpp.1 b/gpp.1
index 8841a2e..bf4b982 100644
--- a/gpp.1
+++ b/gpp.1
@@ -14,6 +14,8 @@ gpp - Bash-based preprocessor for anything
.IR output-file ]]
[-n
.IR count ]
+[-R
+.IR macroline-replacement-text ]
[-s
.IR symbol ]
[-u [-u]]
@@ -77,12 +79,20 @@ will be replaces by the value if the variable
.B gpp
supports all modifiers that
.BR bash (1)
-supports. For example, if you want the value to be
-included but uppercase you can write
+(or which ever
+.I shell
+is selected) supports. For example, if you want the
+value to be included but uppercase you can write
.BR @{ \fIVARIABLE\fP ^^} ,
or
.BI @{ VARIABLE ,,}
for lowercase.
+.B gpp
+also supports mathematical expressions that the via
+the shells
+.BI $(( EXPRESSION ))
+syntax, by using
+.BR @(( \fIEXPRESSION\fP )) .
.PP
Everything that is not a preprocessing directive is
echo verbatim, except all
@@ -130,6 +140,13 @@ Select output file. If
is specified, /dev/stdout will be used.
Default value is /dev/stdout.
.TP
+.BI \-R\ macroline-replacement-text
+Text to replace macrolines with in the output.
+You may for example want to use
+.B %
+for TeX files.
+Default value is the empty string.
+.TP
.BI \-s\ symbol
Set the prefix symbol for preprocessor directives.
Default value is
@@ -336,7 +353,7 @@ preprocessors.
.SH NOTES
None.
-.SH BUS
+.SH BUGS
None.
.SH FUTURE DIRECTIONS