Commit Graph

66 Commits

Author SHA1 Message Date
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
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +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
thorpej ffe66c84f5 Need <string.h> for strcmp() prototype (noticed by gcc 3.1). 2001-12-31 18:34:52 +00:00
wiz aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
tv 650b2f0a52 Get first getopt string right; provide better usage message. 2001-11-14 14:57:04 +00:00
tv edef067add Document -o. 2001-11-14 14:49:38 +00:00
tv f69c13a649 Whitespace nit. 2001-11-14 14:44:29 +00:00
tv 428a14fd18 Make this buildable as a reachover host tool. 2001-11-14 14:22:09 +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 800af334f2 Uppercase Dt argument, correct AUTHORS section name. 2001-06-05 11:57:40 +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
jdolecek deaf9ad4a4 Fix unconsistent spacing/tabs. Adresses bin/11158 by Nathan Ahlstrom. 2000-10-17 18:51:32 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
tv 8676e4b69a Add -P to the usage message (forgot this, long ago). 2000-05-08 00:52: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
matthias f251445b74 make eval() recognize hexadecimal constant as specified in the man page. 1999-04-14 09:38:37 +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
enami daede63067 Check __NetBSD__ prior to unix. 1998-08-30 22:51:44 +00:00
kleink 1246e2b1df Need <stdlib.h> for mktemp() prototype. 1998-06-01 13:54:49 +00:00
lukem 74576ae63b fix richard o'keefe's email address (will have to change for his new job, but the one i've used is at least valid...) 1998-01-23 23:05:34 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +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 8ba07ab0b3 use CPPFLAGS instead of CFLAGS 1997-10-24 09:00:17 +00:00
lukem 6f9ec05a98 WARNSify, fix .Nm usage, getopt returns -1 not EOF, deprecate register 1997-10-19 04:39:51 +00:00
mikel 68be8c5d1a fix typo reported by Saitoh Masanobu in PR misc/3214.
also fixed .Nm usage, other typos
1997-02-12 07:09:07 +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
cgd 8b1ea567b0 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().
Fix dodiv() so that divert(<out-of-range stream>) doesn't cause "divnum" to
    return 0, but rather the stream number specified to divert().  Macros
    like PUSHDIVERT/POPDIVERT rely on this.  The new behaviour is compatible
    with vendor m4 implementations.
1997-02-08 23:50:40 +00:00
cgd 2c5dcba13b i don't know why this was still here, but it does not belong. It appears
to have been in Lite2, but with a Net/2 SCCS id.  It's unnecessary (it's
not used), so it's going away.
1997-02-08 23:42:48 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
pk e0648652c2 Sync with eval.c. (What's this file doing here, anyway?). 1996-11-10 21:23:53 +00:00
pk b70febb8c1 Use COMMA in stead of ',' when pushing items back on the stack, for
consistency with the macro parsing routine. Suggested by Brian Grayson.
1996-11-10 21:21:29 +00:00
pk 0bc3b758b9 Implement `$@' macro, as promised by the manual page (PR#2914). 1996-11-06 00:11:56 +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
jtc fbd6724aad Fix spelling error (Michael K. Sanders; PR #1617) 1995-10-19 07:52:46 +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
cgd 87eebf70fe oops; used ifdef instead of if. 1995-04-26 01:21:08 +00:00
cgd b74ff41786 treat __NetBSD__ like 'unix' 1995-04-24 07:39:28 +00:00