summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4/mdef.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* There really is no double standard. Treat m4 just like openssl, byderaadt2015-11-031-5/+1
| | | | | removing VMS and MSDOS support. ok espie
* fix test-redef2:espie2014-12-211-4/+17
| | | | | | | - introduce explicit STORAGE classes for the shadow stack entries - delay freeing definitions if they're in-use, keep them in a simple array. okay millert@
* zap dead stuffespie2011-09-271-2/+1
| | | | from Michael W. Bombardieri
* Remove stray spaces. No code change.marco2010-09-071-30/+30
|
* add limited support for format builtin in gnu-m4 mode, because I'm fedespie2006-03-201-1/+2
| | | | | | up of patching it away in various autoconf derivatives. okay miod@
* Fold trace status into the single hash table that's left.espie2003-06-301-5/+8
| | | | | | | | | | 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@
* replace old hash structure with open hashing.espie2003-06-301-1/+2
| | | | | make the stack structure of macro definitions explicit. okay millert@
* Make the trace status of a macro an actual argument that gets pushedespie2003-06-301-4/+5
| | | | | | | | | in the frame for the macro expansion. (This will allow one single lookup to grab the macro definition and the trace status) okay millert@
* clean up internal lookup interface:espie2003-06-301-8/+4
| | | | | | | define an interface with explicit define/pushdef/popdef... and use it. That way, most details of the hashtable are no longer visible. okay millert@
* switch from linked list to hash table for traced macros.espie2003-06-121-1/+7
| | | | | | | | | 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@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Implement -s.espie2002-04-281-1/+2
| | | | | | | | | | | | | | | | | 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@
* traceon/traceoff built-ins.espie2001-09-271-1/+4
|
* slightly buggy macrosespie2001-09-181-4/+4
|
* Remove STATIC memory optimization. It's buggy (see regression test trip)espie2001-09-171-2/+1
|
* Kill MAXSTR, it's no longer used at all.espie2001-06-151-3/+2
| | | | Define MAXTOK directly.
* Implement esyscmdespie2000-07-241-1/+2
|
* Back out unwanted testing changeespie2000-07-041-2/+2
|
* Make the m4 machine stack dynamically sized.espie2000-07-021-6/+27
| | | | | | | | | | | | | 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@
* Add a few builtins for greater compatibility with gnu-m4, and extendedespie2000-03-111-1/+7
| | | | | | | | | functionality. * regular expressions, * line-number reporting * `meta'-macros, builtin and indir. Reviewed by pjanzen@, tested by fries@ and a few others.
* There is no need to waste short for holding EOF in the pushback buffer.espie2000-01-151-3/+1
| | | | | 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.
* Use a proper abstract interface for file accesses, so that we can recordespie2000-01-121-2/+11
| | | | | | | the file name and line number. This yields more meaningful error messages, and the possibility for yet more.
* Don't recognize built-ins in contexts where they don't make sense.espie2000-01-111-1/+3
| | | | | | | | | | | 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.
* Close PR-1021. make unix or vms `special' macros that expand toespie2000-01-051-1/+2
| | | | | | | themselves, with the proper quotes added. Matches gnu-m4, not Solaris nor FreeBSD... better for robustness, as it makes for more transparent expansions.
* Recursive definitions are not the real problem.espie1999-12-211-8/+10
| | | | | | | | | | | | | 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.
* Optimization: cache the hashed value to avoid negative comparisons.espie1999-11-201-1/+2
| | | | | | 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...
* Style: kill register and indent properly.espie1999-09-141-2/+2
| | | | | | 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.
* Remove STRSPACE limitations.espie1999-09-061-11/+11
| | | | | | | | | 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.
* Misc minor changes:espie1999-09-061-2/+2
| | | | | | | - use err.h and kill oops, - use __progname and kill basename, - let indx use strstr - proper EOS decl
* cgd: add a typedef which describes elements in the push-back buffer. Makederaadt1997-12-101-1/+3
| | | | | | | | | | 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.)
* rcsidderaadt1996-06-261-0/+1
|
* from netbsd:deraadt1996-01-151-1/+2
| | | | | Handle multichar comment and quote delimiters (up to 5 characters, per the manual page). Takes care of PR#485.
* initial import of NetBSD treederaadt1995-10-181-0/+178