chickadee » fmt » cpp-define

cpp-define <macro> #!optional <value>procedure

Defines a preprocessor macro, which may be just a name or a list of name and parameters. Properly wraps the value in parenthesis and escapes newlines. A dotted parameter list will use the C99 variadic macro syntax, and will also substitute any references to the dotted name with __VA_ARGS__:

(fmt #t (cpp-define '(eprintf . args) '(fprintf stderr args)))
 #define eprintf(...) (fprintf(stderr, __VA_ARGS__))