diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-22 21:34:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-22 21:34:01 -0700 |
commit | 70b0535507439c074bbe6a3b6bb6ad5f7b2db86c (patch) | |
tree | 212b5ea2006679a9d128fcf69ca60996b1781744 | |
parent | a104327c2fb1b04f14473c713e289e832239c9e3 (diff) | |
download | cppawk-70b0535507439c074bbe6a3b6bb6ad5f7b2db86c.tar.gz cppawk-70b0535507439c074bbe6a3b6bb6ad5f7b2db86c.tar.bz2 cppawk-70b0535507439c074bbe6a3b6bb6ad5f7b2db86c.zip |
README: revise bullet 3.
-rw-r--r-- | README.md | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -51,12 +51,20 @@ and go get it! files, which easily find each other in the same directory or relative path. Or macros, for some syntactic sugars. -3. Though GNU Awk has `@include`, that feature provides no preprocessor - features and works with GNU Awk only. `cppawk` calls `gawk`, but can - easily be tweaked to target any Awk; any Awk can have file inclusion. - There is the possibility of using `#ifdef` to make code - work on different Awks from one file. (The default cppawk installation uses - gawk, and also defines `__gawk__` as 1, which you can test for.) +3. `cppawk` calls `gawk`, but can easily be tweaked to target any Awk; any Awk + can have file inclusion. There is the possibility of using `#ifdef` to + make code work with different Awks, using their nonportable constructs: + + #if __gawk__ + GNU Awk specific code + #else + ... + #endif + + The default cppawk installation uses gawk, and also defines `__gawk__` + with a value of `1`. (If an installation of `cppawk` is prepared which uses + a different awk, it is strongly recommended to define a different symbol to + `1`, based on the name: `__mawk__`, and so forth.) 4. Comments. Awk has no comments that don't end at the end of the line; `cppawk` gives you `/*...*/`. |