summaryrefslogtreecommitdiff
path: root/usr.bin/m4/eval.c
AgeCommit message (Collapse)Author
2003-04-05say goodbye to strcpy, okay deraadt@Marc Espie
2002-04-28Implement -s.Marc Espie
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@
2002-04-26use ansi function declarations. ok millert@Marc Espie
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-28Kill yet another hardcoded size. Ok fries@Marc Espie
and flush(stdout) on debugging mode, as a vicious coredump can leave you without info otherwise.
2001-10-10Handle macro expansion even if argc==2, which can happen in indir() calls.Marc Espie
Problem encountered by obecian@.
2001-10-10Fix indentMarc Espie
2001-09-29Synchronize comment with reality.Marc Espie
In gnu-m4 mode, pass the real number of arguments to changequote/changecom, since those distinguish changequote() from changequote.
2001-09-27pass all properties of builtins when defn...Marc Espie
2001-09-27traceon/traceoff built-ins.Marc Espie
2001-09-19inline some very common putback/chrsave. Worth roughly 10%Marc Espie
2001-09-18Tracing facilities. Same style as gnu-m4, because it's mostly used forMarc Espie
autoconf right now.
2001-09-18instrumentation for tracing mode: macro expansionMarc Espie
2001-09-18better gnu m4 emulation for dumpdefMarc Espie
2001-09-18let dumpdef go thru dump_one_def for each def.Marc Espie
2001-09-18let defn(builtin) work enough so thatMarc Espie
define(`newmacro', defn(builtin)) will work, as it should.
2001-09-18One single point for all macros/builtin expansion.Marc Espie
2001-06-13Fix PR 1868. MAXSTR has no place there.Marc Espie
MAXSTR is still a hard limit, but only for token length, where 512 characters seems reasonable. Ok millert@
2000-07-27Handle unlimited diverts for m4 -g.Marc Espie
Problem with autoconf noticed by d@
2000-07-24Implement esyscmdMarc Espie
2000-03-18Last needed m4 changes to bootstrap autoconf without gnu-m4.Marc Espie
2000-03-11Add a few builtins for greater compatibility with gnu-m4, and extendedMarc Espie
functionality. * regular expressions, * line-number reporting * `meta'-macros, builtin and indir. Reviewed by pjanzen@, tested by fries@ and a few others.
2000-01-12Use a proper abstract interface for file accesses, so that we can recordMarc Espie
the file name and line number. This yields more meaningful error messages, and the possibility for yet more.
2000-01-05Close PR-1021. make unix or vms `special' macros that expand toMarc Espie
themselves, with the proper quotes added. Matches gnu-m4, not Solaris nor FreeBSD... better for robustness, as it makes for more transparent expansions.
1999-12-21Recursive definitions are not the real problem.Marc Espie
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.
1999-11-30Clean up comment/quote recognition a little bit:Marc Espie
- 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...
1999-11-17Turn warnings on,Marc Espie
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.
1999-11-17Ensure translit works with accented characters.Marc Espie
1999-11-16Close PR 961, approved by millert@Marc Espie
1999-09-14Style: kill register and indent properly.Marc Espie
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.
1999-09-14mktemp -> mkstempMarc Espie
1999-09-14Implement -I option and M4PATH environment variableMarc Espie
1999-09-06Use EOS pervasively.Marc Espie
1999-09-06Get rid of mktemp in the handling of diversion.Marc Espie
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.
1999-09-06Misc minor changes:Marc Espie
- use err.h and kill oops, - use __progname and kill basename, - let indx use strstr - proper EOS decl
1998-04-25-WallTodd C. Miller
1997-12-20Simplify some push-back code (e.g. for left and right quotes) so thatTheo de Raadt
it uses pbstr() instead of doing the characters individually (in reverse order) with putback(); cgd
1997-08-31wish i had testedTheo de Raadt
1997-08-31from jlemon@freebsd; divnum is no longer silently restricted to theTheo de Raadt
range 0..9, changequote(,) is now a synonym for changequote, buffer size for translit() enlarged to handle a full string
1996-11-25Sync with NetBSD.Todd C. Miller
Implement `$@' macro, as promised by the manual page (NetBSD PR#2914).
1996-09-15Slightly safer temp file open.Todd C. Miller
1996-07-01undo mktemp cleanup until i get it rightTheo de Raadt
1996-06-26rcsidTheo de Raadt
1996-06-25mktemp open + fdopenTheo de Raadt
1996-01-15from netbsd:Theo de Raadt
Handle multichar comment and quote delimiters (up to 5 characters, per the manual page). Takes care of PR#485.
1995-10-18initial import of NetBSD treeTheo de Raadt