OpenBSD CVS

CVS log for src/usr.bin/m4/eval.c


[BACK] Up to [local] / src / usr.bin / m4

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.79 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:01 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.78 / (download) - annotate - [select for diffs], Fri Jun 28 05:35:34 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

mkstemp() returns -1 on failure

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 11 12:55:59 2017 UTC (6 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.76: +31 -13 lines
Diff to previous 1.76 (colored)

replace sloppy parsing of numeric values with strtonum (incr, decr, divert)
still use integers, so use the natural bounds for these.

POSIX says m4 should error when these use non numeric values, and now they
do.

okay millert@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Oct 23 15:21:19 2017 UTC (6 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.75: +8 -9 lines
Diff to previous 1.75 (colored)

ifelse is special, fix argv parsing to avoid segfault
problem noticed by Matthew Green (netbsd), slightly different fix
so that argc counting makes more sense.

we might want to warn on wrong number of parameters later, but this is
somewhat inconsistent depending on the builtin right now.

okay millert@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jun 15 13:48:42 2017 UTC (6 years, 11 months ago) by bcallah
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.74: +5 -1 lines
Diff to previous 1.74 (colored)

Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+
Help and direction millert@ espie@ anton@ deraadt@

ok espie@

Revision 1.74 / (download) - annotate - [select for diffs], Thu Feb 5 12:59:57 2015 UTC (9 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

Include stdint.h, not limits.h to get SIZE_MAX.  OK guenther@

Revision 1.73 / (download) - annotate - [select for diffs], Fri Jul 11 21:04:17 2014 UTC (9 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.72: +5 -6 lines
Diff to previous 1.72 (colored)

better error handling in mkstemp/unlink/fdopen logic.
from Doug Hogan <doug@acyclic.org>
okay miod@

Revision 1.72 / (download) - annotate - [select for diffs], Mon Apr 28 12:34:11 2014 UTC (10 years ago) by espie
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

check for integer overflows in custom allocs, okay jca@

Revision 1.71 / (download) - annotate - [select for diffs], Thu Nov 14 15:56:50 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.70: +5 -3 lines
Diff to previous 1.70 (colored)

cleanup up a nest of if/if/else

Revision 1.70 / (download) - annotate - [select for diffs], Thu Apr 12 17:00:11 2012 UTC (12 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.69: +8 -3 lines
Diff to previous 1.69 (colored)

new m4 -g stuff:
- expr(`4**3')
- include(`hey I am not there') keeps going.

work with Baptiste Daroussin, who had the idea but didn't nail all details
right.

okay otto@, miod@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Mar 24 11:23:08 2011 UTC (13 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.68: +6 -24 lines
Diff to previous 1.68 (colored)

fix translit() behavior to not be recursive. Fixes autoconf 2.65, matches
behavior of solaris m4 (e.g., posix).

Bug-fix by Nigel Taylor

Okay sthen@, todd@.

Comment amended per sthen@' suggestion.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Sep 7 19:58:09 2010 UTC (13 years, 8 months ago) by marco
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.67: +16 -16 lines
Diff to previous 1.67 (colored)

Remove stray spaces.  No code change.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Mar 25 18:52:29 2010 UTC (14 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.66: +14 -4 lines
Diff to previous 1.66 (colored)

conform to gnum4 AND traditional m4 (solaris) behavior, namely,
translit(`ab',`aa',`cd') -> `cb'
(first occurrence matches)

okay miod@, sthen@
fixes minor autoconf issues, like HAVE_VOID__ instead of HAVE_VOID_P

Revision 1.66 / (download) - annotate - [select for diffs], Thu Aug 21 21:01:47 2008 UTC (15 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.65: +8 -6 lines
Diff to previous 1.65 (colored)

in gnu-m4 mode, allow definition of the empty macro (yes, autoconf 2.62
actually uses this, bleh)

okay otto@

Revision 1.65 / (download) - annotate - [select for diffs], Sat Aug 16 12:25:21 2008 UTC (15 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.64: +5 -7 lines
Diff to previous 1.64 (colored)

revert eval.c

Revision 1.64 / (download) - annotate - [select for diffs], Sat Aug 16 12:21:46 2008 UTC (15 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.63: +8 -6 lines
Diff to previous 1.63 (colored)

argument parsing should only skip spaces outside of parenthesis.
Inside matching parenthesis, keep spaces as is (use chrsave instead of
pbstr, since there's no way it can be a further macro expansion).
Fixes a long-standing issue with autoconf (   --option -> --option),
matches other m4 than gnum4

okay millert@, fries@

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 24 08:03:44 2006 UTC (18 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

oops, noticed by David Hill.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 23 08:03:25 2006 UTC (18 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.61: +2 -5 lines
Diff to previous 1.61 (colored)

... and remove extra test that is no longer needed.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Mar 20 20:27:45 2006 UTC (18 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.60: +7 -1 lines
Diff to previous 1.60 (colored)

add limited support for format builtin in gnu-m4 mode, because I'm fed
up of patching it away in various autoconf derivatives.

okay miod@

Revision 1.60 / (download) - annotate - [select for diffs], Mon Mar 20 10:55:19 2006 UTC (18 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.59: +8 -14 lines
Diff to previous 1.59 (colored)

report function m4errx, that shows app-specific data (filename/linenumber)
before the error message. Use it to simplify code.

okay miod@

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 20 23:10:19 2006 UTC (18 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

use stdint.h where appropriate. okay millert@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Sep 6 15:33:21 2005 UTC (18 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.57: +34 -80 lines
Diff to previous 1.57 (colored)

finally make our m4 SusV3-compliant.

- 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@

Revision 1.57 / (download) - annotate - [select for diffs], Sat Aug 6 16:22:26 2005 UTC (18 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.56: +1 -9 lines
Diff to previous 1.56 (colored)

zap rcsid. It's not ramdisk, but they still take space.

Revision 1.56 / (download) - annotate - [select for diffs], Sun May 29 18:44:36 2005 UTC (18 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.55: +48 -13 lines
Diff to previous 1.55 (colored)

fix a few minor compatibility issues.
- 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.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Mar 2 10:12:15 2005 UTC (19 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.54: +22 -3 lines
Diff to previous 1.54 (colored)

let m4wrap handle multiple wraps, both in normal and gnu-mode.
based on Noah Misch's bug report.
okay otto, jmc.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Jan 31 16:06:54 2005 UTC (19 years, 3 months ago) by robert
Branch: MAIN
Changes since 1.53: +5 -3 lines
Diff to previous 1.53 (colored)

use fflush(stdout) before system() so we won't miss any
wanted output; from Andreas Burmester <buster_hh@gmx.net>

ok espie@

Revision 1.53 / (download) - annotate - [select for diffs], Fri Jan 21 19:11:02 2005 UTC (19 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.52: +4 -2 lines
Diff to previous 1.52 (colored)

more portable code, stderr is not necessarily a constant.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jan 20 23:47:04 2005 UTC (19 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.51: +2 -3 lines
Diff to previous 1.51 (colored)

remove unused variables, extra declarations.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Nov 17 17:12:10 2003 UTC (20 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Modify xalloc so that it also takes err(3)-like arguments.
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@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jun 30 21:47:21 2003 UTC (20 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored)

Make the trace status of a macro an actual argument that gets pushed
in the frame for the macro expansion.

(This will allow one single lookup to grab the macro definition and
the trace status)

okay millert@

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 30 21:42:50 2003 UTC (20 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.48: +20 -64 lines
Diff to previous 1.48 (colored)

clean up internal lookup interface:
define an interface with explicit define/pushdef/popdef... and use it.
That way, most details of the hashtable are no longer visible.

okay millert@

Revision 1.48 / (download) - annotate - [select for diffs], Wed Jun 18 21:08:07 2003 UTC (20 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.47: +31 -28 lines
Diff to previous 1.47 (colored)

- store builtin name as definition for builtin macros.
this removes the need for code->name conversion, in exchange for
systematically testing the definition type, since we can no longer
rely on the defn being NULL.

- commonnalize the builtin-detection code, so that we can use it for pushdef
as well with define, so that pushdef handles builtins correctly as well.

okay fries@, millert@.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:10 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.46: +3 -7 lines
Diff to previous 1.46 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Apr 5 14:42:11 2003 UTC (21 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

say goodbye to strcpy, okay deraadt@

Revision 1.45 / (download) - annotate - [select for diffs], Sun Apr 28 14:37:12 2002 UTC (22 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.44: +5 -2 lines
Diff to previous 1.44 (colored)

Implement -s.
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@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Apr 26 16:15:16 2002 UTC (22 years ago) by espie
Branch: MAIN
Changes since 1.43: +23 -67 lines
Diff to previous 1.43 (colored)

use ansi function declarations. ok millert@

Revision 1.43 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:48 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.42: +21 -21 lines
Diff to previous 1.42 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Dec 28 13:03:05 2001 UTC (22 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.41: +7 -3 lines
Diff to previous 1.41 (colored)

Kill yet another hardcoded size. Ok fries@
and flush(stdout) on debugging mode, as a vicious coredump can leave you
without info otherwise.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Oct 10 23:25:31 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.40: +20 -16 lines
Diff to previous 1.40 (colored)

Handle macro expansion even if argc==2, which can happen in indir() calls.
Problem encountered by obecian@.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 10 11:17:10 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (colored)

Fix indent

Revision 1.39 / (download) - annotate - [select for diffs], Sat Sep 29 15:43:48 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.38: +71 -29 lines
Diff to previous 1.38 (colored)

Synchronize comment with reality.
In gnu-m4 mode, pass the real number of arguments to changequote/changecom,
since those distinguish changequote() from changequote.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Sep 27 22:38:28 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.37: +5 -3 lines
Diff to previous 1.37 (colored)

pass all properties of builtins when defn...

Revision 1.37 / (download) - annotate - [select for diffs], Thu Sep 27 11:40:33 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.36: +29 -2 lines
Diff to previous 1.36 (colored)

traceon/traceoff built-ins.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 19 13:14:18 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.35: +6 -6 lines
Diff to previous 1.35 (colored)

inline some very common putback/chrsave. Worth roughly 10%

Revision 1.35 / (download) - annotate - [select for diffs], Tue Sep 18 14:55:52 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.34: +11 -5 lines
Diff to previous 1.34 (colored)

Tracing facilities. Same style as gnu-m4, because it's mostly used for
autoconf right now.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 18 14:43:22 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.33: +4 -2 lines
Diff to previous 1.33 (colored)

instrumentation for tracing mode: macro expansion

Revision 1.33 / (download) - annotate - [select for diffs], Tue Sep 18 14:17:38 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.32: +15 -3 lines
Diff to previous 1.32 (colored)

better gnu m4 emulation for dumpdef

Revision 1.32 / (download) - annotate - [select for diffs], Tue Sep 18 14:10:55 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.31: +15 -8 lines
Diff to previous 1.31 (colored)

let dumpdef go thru dump_one_def for each def.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 18 14:05:14 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.30: +20 -3 lines
Diff to previous 1.30 (colored)

let defn(builtin) work enough so that
define(`newmacro', defn(builtin))
will work, as it should.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Sep 18 13:52:58 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.29: +28 -9 lines
Diff to previous 1.29 (colored)

One single point for all macros/builtin expansion.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jun 13 12:20:43 2001 UTC (22 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.28: +10 -11 lines
Diff to previous 1.28 (colored)

Fix PR 1868. MAXSTR has no place there.
MAXSTR is still a hard limit, but only for token length, where 512
characters seems reasonable.
Ok millert@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 27 17:44:32 2000 UTC (23 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.27: +12 -5 lines
Diff to previous 1.27 (colored)

Handle unlimited diverts for m4 -g.

Problem with autoconf noticed by d@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jul 24 23:08:24 2000 UTC (23 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.26: +6 -2 lines
Diff to previous 1.26 (colored)

Implement esyscmd

Revision 1.26 / (download) - annotate - [select for diffs], Sat Mar 18 01:06:55 2000 UTC (24 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.25: +58 -2 lines
Diff to previous 1.25 (colored)

Last needed m4 changes to bootstrap autoconf without gnu-m4.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 11 15:54:43 2000 UTC (24 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.24: +26 -2 lines
Diff to previous 1.24 (colored)

Add a few builtins for greater compatibility with gnu-m4, and extended
functionality.
* regular expressions,
* line-number reporting
* `meta'-macros, builtin and indir.

Reviewed by pjanzen@, tested by fries@ and a few others.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 12 17:49:53 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.23: +20 -11 lines
Diff to previous 1.23 (colored)

Use a proper abstract interface for file accesses, so that we can record
the file name and line number.

This yields more meaningful error messages, and the possibility for yet
more.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 5 16:06:14 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.22: +7 -2 lines
Diff to previous 1.22 (colored)

Close PR-1021. make unix or vms `special' macros that expand to
themselves, with the proper quotes added.

Matches gnu-m4, not Solaris nor FreeBSD... better for robustness, as
it makes for more transparent expansions.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Dec 21 22:30:47 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.21: +10 -7 lines
Diff to previous 1.21 (colored)

Recursive definitions are not the real problem.
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.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Nov 30 22:19:50 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.20: +6 -6 lines
Diff to previous 1.20 (colored)

Clean up comment/quote recognition a little bit:
- 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...

Revision 1.20 / (download) - annotate - [select for diffs], Wed Nov 17 15:34:13 1999 UTC (24 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.19: +54 -38 lines
Diff to previous 1.19 (colored)

Turn warnings on,
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.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 17 14:57:21 1999 UTC (24 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.18: +28 -20 lines
Diff to previous 1.18 (colored)

Ensure translit works with accented characters.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Nov 16 17:06:11 1999 UTC (24 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.17: +3 -4 lines
Diff to previous 1.17 (colored)

Close PR 961, approved by millert@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Sep 14 08:35:16 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.16: +47 -47 lines
Diff to previous 1.16 (colored)

Style: kill register and indent properly.
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.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Sep 14 08:23:09 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.15: +11 -4 lines
Diff to previous 1.15 (colored)

mktemp -> mkstemp

Revision 1.15 / (download) - annotate - [select for diffs], Tue Sep 14 08:21:36 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Implement -I option and M4PATH environment variable

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 6 13:24:59 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored)

Use EOS pervasively.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 6 13:20:40 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.12: +8 -4 lines
Diff to previous 1.12 (colored)

Get rid of mktemp in the handling of diversion.

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.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Sep 6 13:10:48 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.11: +12 -11 lines
Diff to previous 1.11 (colored)

Misc minor changes:
- use err.h and kill oops,
- use __progname and kill basename,
- let indx use strstr
- proper EOS decl

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 25 18:47:18 1998 UTC (26 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.10: +3 -4 lines
Diff to previous 1.10 (colored)

-Wall

Revision 1.10 / (download) - annotate - [select for diffs], Sat Dec 20 15:39:13 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.9: +8 -20 lines
Diff to previous 1.9 (colored)

Simplify some push-back code (e.g. for left and right quotes) so that
it uses pbstr() instead of doing the characters individually (in
reverse order) with putback(); cgd

Revision 1.9 / (download) - annotate - [select for diffs], Sun Aug 31 21:34:18 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.8: +7 -5 lines
Diff to previous 1.8 (colored)

wish i had tested

Revision 1.8 / (download) - annotate - [select for diffs], Sun Aug 31 21:33:26 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +13 -17 lines
Diff to previous 1.7 (colored)

from jlemon@freebsd; divnum is no longer silently restricted to the
range 0..9, changequote(,) is now a synonym for changequote, buffer
size for translit() enlarged to handle a full string

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 25 00:19:27 1996 UTC (27 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +16 -5 lines
Diff to previous 1.6 (colored)

Sync with NetBSD.
Implement `$@' macro, as promised by the manual page (NetBSD PR#2914).

Revision 1.6 / (download) - annotate - [select for diffs], Sun Sep 15 18:59:07 1996 UTC (27 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +7 -3 lines
Diff to previous 1.5 (colored)

Slightly safer temp file open.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jul 1 20:40:27 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +3 -10 lines
Diff to previous 1.4 (colored)

undo mktemp cleanup until i get it right

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 26 05:36:11 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

rcsid

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 25 20:50:07 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +8 -1 lines
Diff to previous 1.2 (colored)

mktemp open + fdopen

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 15 01:12:11 1996 UTC (28 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +31 -18 lines
Diff to previous 1.1 (colored)

from netbsd:
Handle multichar comment and quote delimiters (up to 5 characters, per the
manual page). Takes care of PR#485.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:35 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:35 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.