A space character will be inserted in front of a leading '#' pp-token as the result of macro expansion.
This commit is contained in:
@@ -2216,6 +2216,13 @@ static unsigned ReplaceMacros (StrBuf* Source, StrBuf* Target, MacroExp* E, unsi
|
|||||||
InitLine (TmpTarget);
|
InitLine (TmpTarget);
|
||||||
PushRescanLine (CurRescanStack, TmpTarget, LastTokLen);
|
PushRescanLine (CurRescanStack, TmpTarget, LastTokLen);
|
||||||
|
|
||||||
|
/* Add a space before a '#' at the beginning of the line */
|
||||||
|
if (CurC == '#' &&
|
||||||
|
NextC != '#' &&
|
||||||
|
(SB_IsEmpty (Target) || SB_LookAtLast (Target) == '\n')) {
|
||||||
|
SB_AppendChar (Target, ' ');
|
||||||
|
}
|
||||||
|
|
||||||
/* Switch the buffers */
|
/* Switch the buffers */
|
||||||
TmpTarget = NewStrBuf ();
|
TmpTarget = NewStrBuf ();
|
||||||
} else if (PendingNewLines > 0 && MultiLine) {
|
} else if (PendingNewLines > 0 && MultiLine) {
|
||||||
|
|||||||
Reference in New Issue
Block a user