Age | Commit message (Collapse) | Author |
|
up of patching it away in various autoconf derivatives.
okay miod@
|
|
Inline some macros/functions for speed.
So, this achieves the goal of one single lookup for macro/trace status,
which does speed up m4 in partial tracing situations somewhat.
This does also speed up m4 in large pushdef situations, since it no longer
has to lookup large chains of macros.
okay millert@
|
|
make the stack structure of macro definitions explicit.
okay millert@
|
|
in the frame for the macro expansion.
(This will allow one single lookup to grab the macro definition and
the trace status)
okay millert@
|
|
define an interface with explicit define/pushdef/popdef... and use it.
That way, most details of the hashtable are no longer visible.
okay millert@
|
|
speeds up recent autoconf somewhat, since it traces a large set
of individual macro.
(more rework of m4 internal interfaces to unify lookup tables in order)
okay fries@
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
Triggered by recent FreeBSD changes.
- emits #line directives at every file change (like FreeBSD)
- maintains a synch_lineno variable to verify when the output gets out
of synch with the input, so that it can emit #line to re-synch as well
(unlike FreeBSD)
To do: either handle \end-of-line, or recognize when a macro expansion
is in progress, so that line synch don't perturb cpp on multi-line
expansions.
With this, we should have a fully POSIX-compliant m4.
ok miod@
|
|
|
|
|
|
|
|
Define MAXTOK directly.
|
|
|
|
|
|
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.
|
|
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.
|
|
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...
|
|
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.
|
|
- 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.
|
|
|