Commit Graph

52 Commits

Author SHA1 Message Date
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
mycroft a5381ee7f4 There were several places where m4 did not conform to the specification
in `The M4 Macro Processor', by Kernighan and Ritchie.

* `|' and `||' are both logical or.  There is no binary or.
* `&' and `&&' are both logical and.  There is no binary and.
* `!' has a much higher precedence.
* The equal and relation operators have the same precedence.
* `**' is implemented, and `^' is for exponentation (not xor).
* Unary `+' in implemented.

I've coded exponentiation to return what appears to be the same results
that other versions of m4 return.
1995-04-14 23:10:25 +00:00
cgd 7bcf9338df specify man pages the new way. 1994-12-22 12:29:38 +00:00
mycroft 39c2e4f00f Remove temporary files on m4exit, from Thomas Eberhardt. 1994-08-29 03:24:44 +00:00
glass a0d7250bd5 upgrade to 4.4-lite m4. no local changes of note 1994-06-19 03:58:48 +00:00
mycroft be4e0f6790 Clean up deleted files. 1994-06-19 03:58:47 +00:00
glass a7c89f0ff9 upgrade to 4.4-lite m4. no local changes of note 1994-06-19 03:58:22 +00:00
cgd 725ed31e82 copyright foo 1994-05-17 04:13:48 +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
mycroft c3e42d1c64 Add RCS indentifiers. 1993-08-01 07:22:47 +00:00
mycroft 690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
glass 1619a1bb2c fixed compilation, and mktemp usage problem 1993-06-18 22:19:20 +00:00