Commit Graph

42 Commits

Author SHA1 Message Date
christos 3d8af4cc0a Fix wrong loop index leading to infinite loop
ifdef(`FOO',
# FOO
)
XXX: Pullup to 6.
2012-04-25 18:23:58 +00:00
joerg f0f23e661a Move usage and onintr to make them static. Add __dead as needed. 2011-09-06 18:16:01 +00:00
christos 42ff0d2ac9 kill gcc-4.5 warning 2011-08-14 12:59:25 +00:00
joerg 98712b66ed Fix __progname mess. 2009-11-06 15:13:27 +00:00
christos f3efdb75c5 resolve conflicts. 2009-10-26 21:11:28 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
he 07b1fe6a3e Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 09:25:00 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
wiz 228a27c192 Really fix -P.
Fixes regression failure, and thus my PR #16225.
2002-05-02 14:24:06 +00:00
tv c8e92c46c8 Put `klen' and `newk' back in local block so that their scope is limited.
(Reduces 1.31 to a one-line diff from 1.30.)
2002-03-05 15:37:35 +00:00
lukem d1d45ba716 fix -P (which was broken in rev 1.29) 2002-03-04 13:16:03 +00:00
tv 76834aef57 Protect __RCSID and __COPYRIGHT from being invoked if not defined. 2002-01-31 19:36:47 +00:00
tv 279abfc5d2 Make compilable from src/tools/m4 on non-NetBSD hosts. 2002-01-21 21:49:57 +00:00
tv 650b2f0a52 Get first getopt string right; provide better usage message. 2001-11-14 14:57:04 +00:00
tv 4b087712af Pull in various changes from OpenBSD, most from Marc Espie, including:
* Provide some GNUisms as extensions.
* Provide dynamically growable string space.
* Make define(defn(foo)) work correctly for builtins.
(The current version is supposed to be capable of satisfying autoconf.)

All still relevant NetBSD changes have been preserved in this version, and
formatting and style fixes have been applied in various places.

Thanks to Masao Uebayashi <uebayasi@soum.co.jp> for pointing this out.
2001-11-14 06:16:07 +00:00
wiz 9d876c80cc Sprinkle some const, and rename a shadow-variable. 2001-03-05 20:26:17 +00:00
wiz 8e6d01d5a7 Fix appearance of bogus 0xff at EOF reported by me in bin/12287. 2001-03-05 20:19:54 +00:00
jdolecek 313e5bd09f couple more whitespace fixes, by Nathan Ahlstrom 2000-10-18 17:23:18 +00:00
enami f6e5e6544e Always unlink the temporary file created by mkstemp(3). 1999-08-16 02:49:20 +00:00
tv 01a5ecacd3 Implement the very useful `-P' option from GNU's m4 (causes all builtin
macros to be prefixed with the string `m4_').
1999-06-23 19:09:35 +00:00
mrg 7ef0b55f16 use mkstemp. 1999-04-20 08:05:51 +00:00
christos b812d45035 char -> unsigned char 1998-12-19 19:54:26 +00:00
enami 692962babe add -Dunix to CPPFLAGS to suppress cpp warning. 1998-09-01 03:16:48 +00:00
perry e6f7c69f88 try another way of fixing #if defined(unix) issues 1998-08-30 23:50:28 +00:00
enami 768e0ae9d2 Nuke unix symbol warning differently (I've used wrong compiler to check
in previous commit).
1998-08-30 23:22:30 +00:00
kleink 1246e2b1df Need <stdlib.h> for mktemp() prototype. 1998-06-01 13:54:49 +00:00
cgd 86cd94fb5a fix an inconsistency between signed- and unsigned-char machines:
make sure that pushed-back 0xff character isn't accidentally
interpreted as an EOF because of sign extension when chars were being
assigned to pbents.  (signed-char machines lost.)  To do this, make
putback() and pbstr() operate only on unsigned chars, and add a
putbackeof() function to do the obvious thing when necessary.
1997-12-29 19:52:55 +00:00
cgd e4d749962a 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.)
1997-12-02 22:34:00 +00:00
lukem 6f9ec05a98 WARNSify, fix .Nm usage, getopt returns -1 not EOF, deprecate register 1997-10-19 04:39:51 +00:00
cgd af10d1eaff handle quoted strings in quoted strings properly, when using multicharacter
quotes.  E.g. if left quote was "``" and right quote was "''", then
"``foo ``bar'' baz''" would yield "foo `bar' baz" when it should yield
"foo ``bar'' baz".
1997-02-08 23:54:49 +00:00
pk e09468dc31 Handle multichar comment and quote delimiters (up to 5 characters, per the
manual page). Takes care of PR#485.
1996-01-13 23:25:23 +00:00
cgd ce713b1483 change #ifdef unix's to also accept __NetBSD__. After 1.1 (per a
decision made a long time ago), 'unix' will no longer be defined, and
is not currently defined on some architectures.
1995-09-29 00:27:51 +00:00
tls 8ddb734554 Sync with 4.4BSD-Lite2 1995-09-28 05:37:28 +00:00
glass a7c89f0ff9 upgrade to 4.4-lite m4. no local changes of note 1994-06-19 03:58:22 +00:00
cgd 402e6e1c32 'official' patch from Ozan S. Yigit <oz@ursa.sis.yorku.ca>:
bug:if there are multiple files on the command line, file index is not
reset properly, ie. it falls off the side. sigh. also, somewhere along
the line, i again lost the proper m4wrap/autodiversion semantics
[sorry, eric. :-|] but fixed with this patch.
1993-11-03 05:16:21 +00:00
jtc 4678be880f Don't dump core when processing more than one file.
Bugfix has been forwarded to Ozan, and should be in his next release.
1993-11-02 17:42:17 +00:00
glass c33a954998 latest m4 from ozan. now does the right thing w/respect to sendmail 1993-10-30 00:28:42 +00:00
mycroft aee4b07b8a Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
1993-08-02 17:48:44 +00:00
glass 1619a1bb2c fixed compilation, and mktemp usage problem 1993-06-18 22:19:20 +00:00
glass 0d66213fcd baseline of new version of m4 supplied by Ozan Yigit, original author
of the broken m4 we had.  This is his stuff virgin + our Makefile.
1993-06-18 21:50:26 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00