summaryrefslogtreecommitdiff
path: root/usr.bin/m4
AgeCommit message (Collapse)Author
2000-07-27Handle unlimited diverts for m4 -g.Marc Espie
Problem with autoconf noticed by d@
2000-07-24Implement esyscmdMarc Espie
2000-07-06Insert more missing .El directives. Our troff really should identify these andAaron Campbell
spit out a warning.
2000-07-04Back out unwanted testing changeMarc Espie
2000-07-02Make the m4 machine stack dynamically sized.Marc Espie
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@
2000-07-02Long tokens won't be defined macros, but they can still be output.Marc Espie
2000-06-28Fix stupid bug in argument handling. Problem found by fries@Marc Espie
Jason, that's a candidate for stable...
2000-04-17Move some misplaced periods outside of the parentheses.Aaron Campbell
2000-04-12Trailing whitespace begone!Aaron Campbell
2000-04-10Thinko in dobuiltin. Reported by turan@Marc Espie
2000-03-23More pedantic man page formatting insanity, lalalaAaron Campbell
2000-03-23Fix some formatting problems I missed before.Aaron Campbell
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-03-10Various cleanups and standardization.Aaron Campbell
2000-02-02Comment slightly more.Marc Espie
2000-02-02Optimize common case.Marc Espie
outputstr could be called for one character-long string. Looking at profiling output, it WAS called for one-character long strings most of the time, like 95% of calls... Rework logic slightly to know about that case and output the character directly. Worth about 10%. Reviewed by Paul Janzen.
2000-01-15There is no need to waste short for holding EOF in the pushback buffer.Marc Espie
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.
2000-01-13Record 50 levels of open parenthesis, open quotes, to give a post-mortem.Marc Espie
- 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).
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-11Use the same optimization as look_ahead for inspect (don't push back charMarc Espie
we're going to refetch and re-test right away).
2000-01-11Don't recognize built-ins in contexts where they don't make sense.Marc Espie
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.
2000-01-11Show problematic evaluated expression in error messages.Marc Espie
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-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