Age | Commit message (Collapse) | Author |
|
|
|
as it should.
|
|
|
|
|
|
|
|
|
|
Define MAXTOK directly.
|
|
MAXSTR is still a hard limit, but only for token length, where 512
characters seems reasonable.
Ok millert@
|
|
machines.
Problem reported by naddy.
|
|
exists only for compatibility reasons); espie@ ok. This issue was brought to
my attention by mpech@prosoft.org.lv
|
|
|
|
|
|
- Some .Nm trimming.
- .Sh AUTHOR -> .Sh AUTHORS
- Other miscellaneous fixes here and there.
|
|
pages just needed their -width parameter tweaked to "Ds", which provides
a nice width of 6 constant characters. For consistency more than anything.
|
|
Problem with autoconf noticed by d@
|
|
|
|
spit out a warning.
|
|
|
|
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@
|
|
|
|
Jason, that's a candidate for stable...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
functionality.
* regular expressions,
* line-number reporting
* `meta'-macros, builtin and indir.
Reviewed by pjanzen@, tested by fries@ and a few others.
|
|
|
|
|
|
outputstr could be called for one character-long string.
Looking at profiling output, it WAS called for one-character long strings
most of the time, like 95% of calls...
Rework logic slightly to know about that case and output the character
directly.
Worth about 10%.
Reviewed by Paul Janzen.
|
|
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.
|
|
- no need to record more, as this is just for diagnosis purpose. This
doesn't affect m4's main engine.
- don't free file names as a compromise: the only other options would be
to ref count them (not worth the complexity) or dup them systematically (ick).
|
|
the file name and line number.
This yields more meaningful error messages, and the possibility for yet
more.
|
|
we're going to refetch and re-test right away).
|
|
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.
|
|
|
|
themselves, with the proper quotes added.
Matches gnu-m4, not Solaris nor FreeBSD... better for robustness, as
it makes for more transparent expansions.
|
|
Trying to expand them is.
So flag obvious recursive definitions for later, and give an error
only if we expand them.
(Some gnu-m4 files, including autoconf, do define some macros with
themselves as the replacement text, for use in test-if-set patterns)
Since type is no longer MACRTYPE, those macros end up in builtins...
but this is not a problem, since expanding them is an error.
|
|
m4 implementation does (including DEC/OSF, Solaris, HP/UX, Aix,
and gnu-m4).
Checked with millert@.
|
|
- 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...
|
|
o Add a missing 'unsigned' to 'h' in remhash()
o Say 'unsigned int' not just 'unsigned'
|
|
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.
|
|
|
|
|
|
repairs patterns such as
divert(6)
divert(7)
undivert(6)
divert(6)
which are not that frequent, but were *quite* thoroughly broken...
|
|
|
|
Bug found by dugsong@. I can't believe it wasn't found before.
|
|
|