From b91d57b505f560db25b66deff3bae80695c05703 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 5 Aug 2021 00:10:46 +0200 Subject: Standardise @(( )), add -R option, and fix critical bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gpp.1 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'gpp.1') 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 -- cgit v1.2.3-70-g09d2