Commit graph

8 commits

Author SHA1 Message Date
H. Peter Anvin
312445a316 quote: fix termination condition for hexadecimal escapes
Fix reversed test for hexadecimal escape sequence termination.
2008-06-14 21:09:39 -07:00
H. Peter Anvin
88c9e1f88c Fix memory management issues with expanded %include
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.
2008-06-04 11:26:59 -07:00
H. Peter Anvin
fbdd36cf72 quote: Change the definition of escp
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.
2008-06-02 13:59:09 -07:00
H. Peter Anvin
2dff954903 quote: be consistent in not using C escapes for bytes
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'.
2008-06-02 10:38:54 -07:00
H. Peter Anvin
e46fec66ca nasm_unquote: make code a little more uniform
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.
2008-06-02 10:02:36 -07:00
H. Peter Anvin
1df123bdbf quote: massively simplify nasm_skip_string()
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.
2008-06-02 09:57:46 -07:00
H. Peter Anvin
6ecc159a54 qstring: backquoted strings seem to work now...
Hopefully backquoted strings should work correctly now.
2008-06-01 21:34:49 -07:00
H. Peter Anvin
8cad14bbcf qstring: first cut at full quoted string support in the preprocessor
First attempt at properly handle quoted strings in the preprocessor.
This also adds range support in %substr.

No support in the assembler yet.
2008-06-01 17:23:51 -07:00