Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
Noticed by aaron@.
|
|
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.
|
|
Fuss with prototypes.
|
|
Not the same code as NetBSD.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
warning
|
|
|
|
|
|
it uses pbstr() instead of doing the characters individually (in
reverse order) with putback(); cgd
|
|
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.)
|
|
|
|
|
|
|
|
range 0..9, changequote(,) is now a synonym for changequote, buffer
size for translit() enlarged to handle a full string
|
|
|
|
|
|
|
|
|
|
|
|
Implement `$@' macro, as promised by the manual page (NetBSD PR#2914).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Handle multichar comment and quote delimiters (up to 5 characters, per the
manual page). Takes care of PR#485.
|
|
|