Split the documentation on string syntax, as a lexical entity, out of
the section about character constants. It was confusing to have
discussion that apply more to string constants than character
constants, and they use the same syntax anyway.
The dependency list tail pointer wasn't actually updated correctly.
Fix that. We may want to make this a structure of some sort to make
the code a bit cleaner, but this seems to be the cleanest hack for
now.
Some pseudo-instructions (RESB and EQU) seem to make it into the
instruction table. This also generates an instruction table for
zero-length instructions, which of course can never actually be
accessed. Quiet a compiler warning by simply not emitting this
useless table. Ideally we shouldn't emit the pseudo-instructions
either, but that is a bigger change, and it's hardly a lot of memory
involved.
Ownership of the filename string was a bit fuzzy, with the result that
we were freeing it even though it was retained for use by __FILE__.
Clean up a number of other memory management issues with the new
quoting code, and change the stdscan implementation to one pass over
the string.
Semi-arbitrary change of the definition of escp to the beginning of
the argument sequence instead of the initiator character. This may
avoid an add in some code paths, and looks slightly cleaner to me.
We used numbers in nasm_unquote and C escapes in nasm_quote - use
numbers in both places, just in case some C compiler does something
weird with '\r' and (especially) '\n'.
Make the code a bit more consistent:
- ndig is now always a countdown, and we always to the (p > escp+1)
test to see if we got anything at all (this is to deal with stuff
like \x without a digit.)
- Add missing break; after 'v' (bug!).
- Preinitialize nval to zero.
Greatly simplify nasm_skip_string() by observing that for the purpose
of string skipping, all states other than st_backslash are equivalent
to st_start.
ASCII specifically refers to characters <= 127, so to use "ASCII" for
literal bytes is really confusing in a multibyte environment. Give an
example of using Unicode escapes.
Move all the date/time macros to a common section so we can give a
common example. We don't have support for a fourth level of headers,
so just use a bulleted list.