In my local forked version I have added support for
invoking a
multi-line macro in a way where the invocation gets
replaced
by an explicit return value, i.e. a token list.
The original idea/implementation came from Nickolay (unv).
Attached you can find a cleaned up version.
changes needed to add INVOKE support
getline() split into 3 components, and invoke_mmacro() cloned from it
Logged In: YES
user_id=804543
Fwiw, adding support for invoking a multi-line
macro will expose NASM's left-to-right grouping
of "? and :" operators (see SF RFE #758548) --
which is unlike C's right-to-left grouping.
Logged In: YES
user_id=804543
The first of the two fclose(i->fp) calls
in invoke_mmacro() needs to be guarded by
a NULL pointer check. (Some platforms do
silently ignore fclose(NULL) but others
cause trouble. For example, I got a bunch
of "segmentation fault" errors in Linux,
while Cygwin worked fine.)
Logged In: YES
user_id=804543
The second of the two fclose(i->fp) calls
in invoke_mmacro() needs to be guarded by
a NULL pointer check too.