From 70b0535507439c074bbe6a3b6bb6ad5f7b2db86c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 22 Mar 2022 21:34:01 -0700 Subject: README: revise bullet 3. --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 08fce62..5e16a7f 100644 --- a/README.md +++ b/README.md @@ -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 `/*...*/`. -- cgit v1.2.3