OpenBSD CVS

CVS log for src/usr.bin/m4/mdef.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.34 / (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.33: +2 -2 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Tue Nov 3 16:21:47 2015 UTC (8 years, 6 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, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.32: +1 -5 lines
Diff to previous 1.32 (colored)

There really is no double standard. Treat m4 just like openssl, by
removing VMS and MSDOS support.
ok espie

Revision 1.32 / (download) - annotate - [select for diffs], Sun Dec 21 09:33:12 2014 UTC (9 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.31: +17 -4 lines
Diff to previous 1.31 (colored)

fix test-redef2:
- 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@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 27 07:24:02 2011 UTC (12 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

zap dead stuff
from Michael W. Bombardieri

Revision 1.30 / (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_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.29: +30 -30 lines
Diff to previous 1.29 (colored)

Remove stray spaces.  No code change.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Mar 20 20:27:45 2006 UTC (18 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, 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.28: +2 -1 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Mon Jun 30 22:13:33 2003 UTC (20 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.27: +8 -5 lines
Diff to previous 1.27 (colored)

Fold trace status into the single hash table that's left.
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@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jun 30 22:10:21 2003 UTC (20 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

replace old hash structure with open hashing.
make the stack structure of macro definitions explicit.
okay millert@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jun 30 21:47:21 2003 UTC (20 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.25: +5 -4 lines
Diff to previous 1.25 (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.25 / (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.24: +4 -8 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Thu Jun 12 14:36:43 2003 UTC (20 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.23: +7 -1 lines
Diff to previous 1.23 (colored)

switch from linked list to hash table for traced macros.
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@

Revision 1.23 / (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.22: +2 -6 lines
Diff to previous 1.22 (colored)

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

Revision 1.22 / (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.21: +2 -1 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Thu Sep 27 11:40:33 2001 UTC (22 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.20: +4 -1 lines
Diff to previous 1.20 (colored)

traceon/traceoff built-ins.

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

slightly buggy macros

Revision 1.19 / (download) - annotate - [select for diffs], Mon Sep 17 08:11:13 2001 UTC (22 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored)

Remove STATIC memory optimization. It's buggy (see regression test trip)

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jun 15 14:01:39 2001 UTC (22 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.17: +2 -3 lines
Diff to previous 1.17 (colored)

Kill MAXSTR, it's no longer used at all.
Define MAXTOK directly.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 24 23:08:25 2000 UTC (23 years, 10 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.16: +2 -1 lines
Diff to previous 1.16 (colored)

Implement esyscmd

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jul 4 17:28:38 2000 UTC (23 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Back out unwanted testing change

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 2 01:17:00 2000 UTC (23 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.14: +27 -6 lines
Diff to previous 1.14 (colored)

Make the m4 machine stack dynamically sized.

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@

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 11 15:54:44 2000 UTC (24 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.13: +7 -1 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Sat Jan 15 14:26:00 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.12: +1 -3 lines
Diff to previous 1.12 (colored)

There is no need to waste short for holding EOF in the pushback buffer.
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.

Revision 1.12 / (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.11: +11 -2 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Tue Jan 11 14:06:12 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

Don't recognize built-ins in contexts where they don't make sense.
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.

Revision 1.10 / (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.9: +2 -1 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Tue Dec 21 22:30:48 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.8: +10 -8 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Sat Nov 20 17:49:00 1999 UTC (24 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

Optimization: cache the hashed value to avoid negative comparisons.
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...

Revision 1.7 / (download) - annotate - [select for diffs], Tue Sep 14 08:35:17 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Mon Sep 6 13:29:32 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.5: +10 -10 lines
Diff to previous 1.5 (colored)

Remove STRSPACE limitations.
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.

Revision 1.5 / (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.4: +2 -2 lines
Diff to previous 1.4 (colored)

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

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 10 20:24:16 1997 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

cgd: add a typedef which describes elements in the push-back buffer.  Make
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.)

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 05:36:14 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +1 -0 lines
Diff to previous 1.2 (colored)

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 15 01:12:21 1996 UTC (28 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +2 -1 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.