Commit Graph

12 Commits

Author SHA1 Message Date
Tim J. Robbins
f03b27517b Store a pointer to "null" in struct ndblock's defn member instead of a
duplicate allocated on the heap; the address defn points to is significant,
and is checked against the address of "null" in certain conditionals.

PR:		59883
MFC after:	1 week
2004-08-16 14:18:22 +00:00
Juli Mallett
2c4acd2f49 Kill extraneous whitespace. 2002-07-15 02:15:12 +00:00
Andrey A. Chernov
a2f7d5dc07 Prevent sign extension (again) 2002-04-20 02:04:58 +00:00
Juli Mallett
ccc5b4e6f4 Crank WARNS.
Cast sizeof() to (int), as it's being compared against an int, not a size_t.
If i is changed to a size_t, it means the logic must be slightly changed later
in the flow, where --i is checked to be >= 0.  I am not sure I want to make a
logic change to account for clearing up a warning, when an aesthetic one will
keep from modifying the logic.

Other harmless casts, that I think I've made in the right directions.

Make gpbc() an inline function, rather than an obfuscated macro, make its
scratch space local, rather than global.  The previous macro used a dirty
hack (logical AND in place of a conditional) which would lead GCC to throw
a fit (rightly so) as the logical check, as well as the incrementation of
a variable, were not used for anything.

const'ify a few places where gcc3 yells. xstrdup() some global consts in
places where we xstrdup() when not using consts, but tried to assign them
to non-consts before.

Don't use execv(2) if we don't have the kind of arguments it wants.

Reviewed by:    asmodai obrien tjr
Submitted by:   tjr (a gcc3 build log)
2002-04-20 01:49:10 +00:00
Juli Mallett
acc9d40838 Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,
$FreeBSD$ identifiers, and fix initialisation to stderr to happen in a function
as stderr is not the same in CURRENT as in OpenBSD.

Reviewed by:	obrien
2002-04-19 17:26:21 +00:00
Juli Mallett
b1ea3d46b7 This adds support for -s to the m4(1) utility, which causes #line directives
to be emitted as per the C preprocessor.  It updates the manual page in
regards to standards accordingly.

PR:		standards/36075
Submitted by:	tjr
Reviewed by:	mike
MFC after:	1 week
2002-04-17 17:26:32 +00:00
Warner Losh
d3cb5ded92 remove __P 2002-03-22 01:33:25 +00:00
David E. O'Brien
de9b3b9034 Remove the local basename in favor of the libc version.
Remove xmalloc and xstrdup and do the error checking at the place of use.
2001-07-24 14:09:47 +00:00
Gregory Neil Shapiro
164c01f05b Clean up temporary file(s) and directory when m4 exits without falling
through main() (e.g., signals or calls to errx()).

PR:		conf/25715
2001-04-16 18:36:35 +00:00
Philippe Charnier
9510535891 Use err(3) instead of local redefinition. Remove progname. 1997-07-23 06:50:06 +00:00
Andrey A. Chernov
7c5eeb390e Make m4 more 8bit clean.
Don't use is*(EOF)
This fix core dump when LANG setted to 8bit wide charset
and ENABLE_STARTUP_LOCALE
1994-12-18 23:58:25 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00