diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-23 18:30:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-23 18:30:09 -0700 |
commit | 4f5117aaa411d7fae8b7133a3089ae8e3e158d07 (patch) | |
tree | 1fdea0b7106faa4eec16727c9ec7945448ad9886 | |
parent | 40b3e280c473c2e0e0a65cea49fe38f8f53a8625 (diff) | |
download | cppawk-4f5117aaa411d7fae8b7133a3089ae8e3e158d07.tar.gz cppawk-4f5117aaa411d7fae8b7133a3089ae8e3e158d07.tar.bz2 cppawk-4f5117aaa411d7fae8b7133a3089ae8e3e158d07.zip |
get rid of <stdver.h> header.
cppawk internally defines __cppawk_ver now.
-rwxr-xr-x | cppawk | 6 | ||||
-rw-r--r-- | cppawk-include/stdver.h | 1 | ||||
-rw-r--r-- | cppawk.1 | 36 | ||||
-rw-r--r-- | testcases | 7 |
4 files changed, 25 insertions, 25 deletions
@@ -29,9 +29,9 @@ # site configuration prepro=cpp -incopt=-iquote # GNU cpp feature: use -I if unavailable -awk=gawk # Use GNU awk -prepro_opts="-D__gawk__=1" # Blank out for generic or use __mawk__, etc. +incopt=-iquote # GNU extension: must be changed to -I for traditional cpp +awk=gawk +prepro_opts="-D__gawk__=1 -D__cppawk_ver=20220321" # globals awk_file= diff --git a/cppawk-include/stdver.h b/cppawk-include/stdver.h deleted file mode 100644 index 468b993..0000000 --- a/cppawk-include/stdver.h +++ /dev/null @@ -1 +0,0 @@ -#define __cppawk_ver 20220318 @@ -40,15 +40,6 @@ executed as .B awk code. -When -.B cppawk -installation is configured to use GNU Awk, which is the default, the -preprocessor symbol -.BI __gawk__ -is predefined with a value of 1. See the -.BI --awk -option. - .SH OPTIONS Any option not described here is assumed to be an Awk option which takes no argument, and is consequently passed through to the @@ -131,17 +122,30 @@ Options which match these patterns are passed to the program instead of .BR awk . +.SH PREDEFINED SYMBOLS +.IP \fB__gawk__\fR +When +.B cppawk +installation is configured to use GNU Awk, which is the default, the +preprocessor symbol +.BI __gawk__ +is predefined with a value of 1. See the +.BI --awk +option. + +.IP \fB__cppawk_ver\fR +This preprocessor symbol gives the version of +.BR cppawk . +Its value is a is an eight digit decimal integer the form +.IR YYYYMMDD , +such as 20220321. + .SH STANDARD HEADERS .B cppawk points the preprocessor to look for .BI "#include <...>" -files in its own directory. The -.BI "<stdver.h>" -header defines a preprocessor symbol -.BI __cppawk_ver -whose value is a decimal integer the form -.IR YYYYMMDD , -such as 20220318. +files in its own directory. There are currently no files +in this directory. .SH EXAMPLES Print the larger of field 1 or 2: @@ -155,10 +155,7 @@ abc abc'def -- 29: -./cppawk ' -#include <stdver.h> - -BEGIN { print __cppawk_ver >= 20220318 }' +./cppawk 'BEGIN { print __cppawk_ver >= 20220321 }' : 1 -- @@ -187,7 +184,7 @@ foo_bar 33: ./cppawk --prepro-only --prepro=./testdir/testcpp abc : -[-iq][-D_][-I.][-] +[-iq][-D_][-D_][-I.][-] -- 34: ./cppawk --prepro-only --awk=mawk mawk=__mawk__ | grep mawk |