Closed TerraTech closed 5 years ago
Recall that in GPP's default mode, the character ,
is the argument separator. In your first example, you define CORE
to take one argument. When you write CORE(foo0 { bar0, baz0 })
, you are calling CORE
with two arguments, foo0 { bar0
and baz0 }
. Since CORE
takes only one argument, the second argument is simply gobbled. When you write CORE(foo1 { bar1\, baz1 })
, you quote (i.e., escape) the comma so that GPP does not interpret it as an argument separator. CORE
therefore sees the single argument foo1 { bar1\, baz1 }
.
Does this answer your question?
Thank you for the clarification, much appreciated.
Glad to help! If you don't want the comma to be the argument separator, you can always use a different mode, or define your own custom mode that uses a different character (or none at all) as the argument separator. Check out the man page for the appropriate command-line arguments.
gpp-2.24
I am using gpp to handle Linux nftables config files and ran into the following issue: