/* Debugging */
#ifdef DEBUG_THRU_UART0
# define DEBUG(...) printString (__VA_ARGS__)
#else
void dummyFunc(void);
# define DEBUG(...) dummyFunc()
#endif
The dots are called, together with the __VA_ARGS__
, variadic macros
When the macro is invoked, all the tokens in its argument list [...], including any commas, become the variable argument. This sequence of tokens replaces the identifier VA_ARGS in the macro body wherever it appears.
source, bold emphasis of mine.
A sample of usage:
#ifdef DEBUG_THRU_UART0
# define DEBUG(...) printString (__VA_ARGS__)
#else
void dummyFunc(void);
# define DEBUG(...) dummyFunc()
#endif
DEBUG(1,2,3); //calls printString(1,2,3) or dummyFunc() depending on
//-DDEBUG_THRU_UART0 compiler define was given or not, when compiling.