cdecl-18.3
no
option autocompletion
Since the "no" options are of the form nofoo
and not no-foo
, if the user types:
cdecl> set no-<tab>
i.e., includes -
, it's changed to just "no" so cdecl will still present all the "no" options.
Dynamic __FILE__
& __LINE__
macros
The value of __FILE__
is now the current input file, if any, or stdin
. The value of __LINE__
is the line numer within that file, if any.
language
option
The lang
option has been replaced by language
to match the --language
command-line option.
Fixed set
lang
Giving a value for a language for the set
command is now correctly forbidden, e.g.:
cdecl> set c=x
^
7: error: "x": set option "c" takes no value
##
whitespace
Fixed incorrect deletion of whitespace when concatenating tokens in some cases.
__VA_ARGS__
as ##
argument
__VA_ARGS__
as a ##
argument is now correctly not further expanded, e.g.:
cdecl> #define XPASTE(...) x ## __VA_ARGS__
cdecl> expand XPASTE(__LINE__)
...
XPASTE(__LINE__) => x__LINE__
__VA_OPT__
expanding to nothing
When __VA_OPT__
expands to nothing, it needs to expand into a placemarker.
__VA_OPT__
whitespace
Leading & trailing whitespace in __VA_OPT__()
tokens is now trimmed, e.g.:
cdecl> #define CALL_QUOTE(x) QUOTE(x)
cdecl> #define QUOTE(X) #X
cdecl> #define TILDAS(...) ~__VA_OPT__( ~ )~
cdecl> expand CALL_QUOTE(TILDAS(x))
...
CALL_QUOTE(~~~) => "~~~"