Age | Commit message (Collapse) | Author |
|
OK espie@, moritz@, and jaredy@.
|
|
|
|
before the error message. Use it to simplify code.
okay miod@
|
|
|
|
- changecom and changequote have a simple definition (that matches gnu-m4,
coincidentally, so we no longer need two distinct modes for these)
- off-by-one bug in -s, this finally works.
- reorder main parser loop, so that we can use alphabetic constructs in
quotes/comments.
- rename putback to pushback, this matches comments, and makes more sense.
- more uniform (and updated) description of changequote/changecom.
- new, systematic regression tests of comments/quotes.
- framework to test -s: one perl script to reconstitute `full' files with
all line numbers, so that we can verify the output without needing a
complete match.
okay otto@, fries@
|
|
|
|
- let eval() handle a base and number of digits, like it's advertized to.
- in gnu-mode, undivert can take file names as arguments.
- in gnu-mode, map can handle reversed charsets.
Suggestions and okay otto@, mostly prompted by looking at the regress
tests in newer gnu-m4.
|
|
Write an xrealloc wrapper that works the same way, and use it as well.
People who feel like it may want to add more explicit error messages to
all the places m4 can fail allocating memory...
okay tedu@
|
|
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
- 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.
|
|
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...
|
|
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.)
|
|
|
|
|
|
|
|
|
|
|