Make sure that the buffer is always null-terminated, even though we do
have to use the length, since the string can (and often will) have
embedded nulls.
Another case of the RTF backend corrupting global state. "Fix" it by
only outputting one format at a time; this also makes it possible to
run in parallel.
Switch the main font to 10 points Times Roman, but leave the leading
at 11 points. This produces, in my opinion, a much more legible and
printable document.
On some platforms, tolower() is implemented as a function call, in
order to handle locale support. We never change locales, so can the
result of tolower() into a table, so we don't have to sit through the
function call every time.
~1.3% overall performance improvement on a macro-heavy benchmark under
Linux x86-64.
- Add %warning directive
- Only unquote an %error or %warning string if it is the only thing on
the directive line.
- Don't expand macros inside a quoted string, even for %error.
Introduce the likely() and unlikely() macros, as used in Linux.
They are compiler-dependent hints that a particular boolean expression
is likely to be true or false, respectively.
Currently only implemented for gcc.
Make strings a proper, first-class token type, instead of relying on
the "TOKEN_NUM with tv_charptr" hack. Only convert a string to a
number if requested in an expression context; this also makes it
possible to actually issue a warning when it overflows.
The handling of %? in multi-line macros was broken when the macro name
was preceeded by a label; it would expand to the label instead of the
macro name. This was particularly serious since this was used in
the macro implementation of INCBIN.
Use autoconf to detect littleendian word order, and use
WORDS_LITTLEENDIAN instead of X86_MEMORY when we don't require
unaligned memory accesses to be permitted.
Make the WSAA macros contain their own buffer definitions. This
eliminates the need to have a separate "workbuf" declared in the
outelf backends, which isn't even used for anything else, except for a
few completely redundant strcpys.
Note: these macros probably should be replaced with actual
functions. The overhead of the function call is likely to be more
than offset by lower icache footprint.
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.