mcpp seems to canonicalise all whitespace to TOK_SEP. The code in
expand.c for dealing with TOK_SEP writes out a space, unless the
previous character was also TOK_SEP. This means that:
'#define foo bar\n'
will expand to:
'TOK_SEP#defineTOK_SEPfooTOK_SEPbarTOK_SEP'
so, a line containing only 'foo', gets converted to 'bar ', because
the \n is also treated as TOK_SEP.
This breaks things very badly when xrdb uses mcpp; resources change
from 'Foo.bar:\t#123456\nBar.baz:\t#654321\n', to
'Foo.bar:\t#123456 \nBar.baz:\t#654321 \n' (note the extra spaces).
X colour lookups then fail, because it doesn't strip spaces.
The way I 'fixed' this in Ubuntu was to just always skip TOK_SEP, but
this means that:
'#define foo bar \n'
will expand 'foo' to 'bar', instead of to 'bar '. I don't know if this
behaviour is either desired or correct, however. So, if always calling
continue in the TOK_SEP case in expand.c is incorrect, then mcpp needs
to differentiate general whitespace from newlines.
Cheers,
Daniel