preproc: don't handle %+ until the final phase of smacro expansion
commitfc30f8c73644f1b02347e0a3b8ef3da53608868c
authorH. Peter Anvin <hpa@zytor.com>
Tue, 7 Jul 2009 01:48:23 +0000 (6 18:48 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 7 Jul 2009 01:48:23 +0000 (6 18:48 -0700)
tree1bb3861a4e96c3636dfde5b4619cb11c6e24dceb
parent740df430058721a51f149b26df0864d01e24ad82
preproc: don't handle %+ until the final phase of smacro expansion

Revert to the earlier behavior of not expanding %+ until the final
phase of smacro expansion.  However, the previous code has:

    if (expanded && paste_tokens(&thead, true)) {

... which would inhibit paste_tokens() if expanded was false on the
first iteration.  However, if expand_mmac_params is not expanding %+,
then we cannot bypass this expansion.  Thus use:

    pasted = paste_tokens(&thead, true);
    if (expanded && pasted) {

... instead.

This seems to work with both Syslinux and x264 usage, and therefore
hopefully should be compatible with earlier versions of NASM.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
preproc.c