Age | Commit message (Collapse) | Author |
|
Problem with autoconf noticed by d@
|
|
|
|
Fix strspace automatic extension.
The assumption that simply updating the current pointer works is false,
there are cases where previous entries on the stack would absorp vast
amounts of string space, and overload the non-updated entries.
To fix it, we use a shadow copy of the stack, which only records which
entries are pointers within strspace, so that a resize can adjust all
those pointers at once.
Reviewed by millert@
|
|
|
|
functionality.
* regular expressions,
* line-number reporting
* `meta'-macros, builtin and indir.
Reviewed by pjanzen@, tested by fries@ and a few others.
|
|
Now that the input_file structure is sufficiently fleshed out, just stop
EOF at the putback level, and make sure files at EOF STAY at EOF.
|
|
the file name and line number.
This yields more meaningful error messages, and the possibility for yet
more.
|
|
Namely, it doesn't help to try and expand include if it's not followed
by parenthesis and a filename.
This should make applications like sendmail m4 scripts more sturdy for
unquoted machine names that happen to collide with built-ins.
The only drawback is that our m4 may now do intelligent things with scripts
that don't work on other systems.
|
|
- use strlcpy to make clear that the strings are line terminated,
- remove the number of magic constants,
- use assert() for preconditions,
- use puts instead of looping over array of chars...
|
|
With 2^32 possible hash values, this means that collisions no longer
incur supplementary string compares, which was most of the reason for
STREQ in the first place...
|
|
Add missing prototypes,
Make local functions static,
Sort extern.h by file,
Constify all char * that can be,
Copy temp file name so that eval does not modify its arguments.
|
|
Let indx match netbsd flavor, to simplify diffs.
Show how many quotes were not closed.
Increase stack slightly, now that we're no longer bound by argspace.
|
|
|
|
A bit wasteful, but not too intrusive.
Also remove pushback buffer limitations, as this would be mostly useless
otherwise.
Incidentally, pushback buffer overflow detection in pbstr was wrong.
|
|
Simply put, mkstemp/unlink/rewind has the proper semantics under Unix,
and so we don't have to keep track about temp file names and remove them.
|
|
|
|
- use err.h and kill oops,
- use __progname and kill basename,
- let indx use strstr
- proper EOS decl
|
|
that typedef 'short'. 'char' (which was previously used) because char
may be unsigned and ((char)EOF) != EOF if that is the case. That was
causing the (char)EOF (0xff) pushed back in main to be interepreted as
a character, and, in some cases, to be written to the output. 'short'
was used rather than 'signed char' because if the latter is used,
0xff characters in the input would confuse m4. (No point in introducing
(more?) 8-bit lossage.)
|
|
|
|
Handle multichar comment and quote delimiters (up to 5 characters, per the
manual page). Takes care of PR#485.
|
|
|