summaryrefslogtreecommitdiff
path: root/usr.bin/m4
AgeCommit message (Collapse)Author
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-30Recognizes comments while parsing macros arguments, as every otherMarc Espie
m4 implementation does (including DEC/OSF, Solaris, HP/UX, Aix, and gnu-m4). Checked with millert@.
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-25From espie@openbsd.org:Todd C. Miller
o Add a missing 'unsigned' to 'h' in remhash() o Say 'unsigned int' not just 'unsigned'
1999-11-20Optimization: cache the hashed value to avoid negative comparisons.Marc Espie
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...
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-17TypoMarc Espie
1999-11-17Ensure translit works with accented characters.Marc Espie
1999-11-17Night of the moronic coder, part 2.Marc Espie
repairs patterns such as divert(6) divert(7) undivert(6) divert(6) which are not that frequent, but were *quite* thoroughly broken...
1999-11-16Close PR 961, approved by millert@Marc Espie
1999-11-15I'm a moron...Marc Espie
Bug found by dugsong@. I can't believe it wasn't found before.
1999-11-09remove really lame bug espie created; ca@zardoc.endmail.orgTheo de Raadt
1999-09-16Do something sensible with division by 0 in expr.Marc Espie
Noticed by aaron@.
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-14-I works better when activated...Marc Espie
Fuss with prototypes.
1999-09-14Add support for hex constants.Marc Espie
Not the same code as NetBSD.
1999-09-14mktemp -> mkstempMarc Espie
1999-09-14Implement -I option and M4PATH environment variableMarc Espie
1999-09-09Bug-fix: thinkoMarc Espie
1999-09-06Remove STRSPACE limitations.Marc Espie
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.
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-06synchMarc Espie
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
1999-09-06Optimize STREQ/STREQN some moreMarc Espie
1999-09-06TypoMarc Espie
1998-09-26usr.bin/ man page fixes, f-m.Aaron Campbell
1998-06-02no, the code is correct as it is, and you did the wrong thing based on a gcc ↵Theo de Raadt
warning
1998-06-02shut up -WallMichael Shalayeff
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-12-10cgd: add a typedef which describes elements in the push-back buffer. MakeTheo de Raadt
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.)
1997-10-24Use int not char in two places. Noted by Dale.Todd C. Miller
1997-09-21$OpenBSD$Theo de Raadt
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
1997-07-25#if __STDC__ --> #ifdef __STDC__Michael Shalayeff
1997-04-04when mktemp() is hard to fix, use 10 XTheo de Raadt
1997-02-12typo, msaitoh@spa.is.uec.ac.jpTheo de Raadt
1997-02-08excessTheo de Raadt
1997-01-15getopt(3) returns -1 when out of args, not EOF, whee!Todd C. Miller
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-09-15Slightly safer temp file open.Todd C. Miller
1996-08-22__OpenBSD__Theo de Raadt
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-12-14fix a typoTheo de Raadt