History log of /freebsd-9.3-release/usr.bin/m4/main.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 259262 12-Dec-2013 tijl

MFC r226422, r227241, r228063, r228697, r228698, r228701, r234310, r234850,
r250226, r250926.

This brings m4 up to date with the version in head and fixes the eval
command when called with a 2nd and 3rd argument. The only differences
remaining are related to the updated flex and byacc in head.

PR: bin/166994


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 133858 16-Aug-2004 tjr

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


# 132004 12-Jul-2004 tjr

Respect locale settings from the environment.


# 102917 03-Sep-2002 jmallett

Die on -D=foo, when parsing options - we can't let someone define (nil).

MFC after: 3 days


# 100014 15-Jul-2002 jmallett

Kill extraneous whitespace.


# 99941 14-Jul-2002 jmallett

Add a default case to the getopt(3) switch, remove a blank line nearby.


# 99939 14-Jul-2002 jmallett

Functions declared as <type> <identifier>(<nil>) should be declared as
<type> <identifier>(<void-type>) in ANSI C.


# 99938 14-Jul-2002 jmallett

Remove prototype for main().


# 98490 20-Jun-2002 jmallett

Cast sp to uintptr_t when doing a compare of it to STACKMAX which is a size_t.

This messes up some indentation in mdef.h for some macros.


# 97296 26-May-2002 tjr

If a file operand cannot be processed, go on to process any remaining files
but exit non-zero.


# 95982 03-May-2002 jmallett

Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.

Add __FBSDID() properly.

Requested by: bde, mike


# 95918 02-May-2002 jmallett

Remove redundant declarations of getopt(3) externals (since <unistd.h> does
take care of them), and add __FreeBSD__ to the defined() checks for the
_PATH_DIVNAME.


# 95887 01-May-2002 jmallett

Merge local changes again, against ANSIfied m4(1).


# 95095 19-Apr-2002 jmallett

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)


# 95060 19-Apr-2002 jmallett

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


# 94957 17-Apr-2002 jmallett

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


# 80289 24-Jul-2001 obrien

Remove the local basename in favor of the libc version.
Remove xmalloc and xstrdup and do the error checking at the place of use.


# 75551 16-Apr-2001 gshapiro

Clean up temporary file(s) and directory when m4 exits without falling
through main() (e.g., signals or calls to errx()).

PR: conf/25715


# 73240 28-Feb-2001 jhay

The secure temporary directory is always created, so always remove it.


# 69030 22-Nov-2000 kris

Create temporary files in a secure directory, instead of using multiple
filenames based on a single invocation of mktemp() in /tmp, which is
easily predictable after the first one.

Audited by: markm


# 65428 04-Sep-2000 imp

getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 27625 23-Jul-1997 charnier

Use err(3) instead of local redefinition. Remove progname.


# 24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 8874 30-May-1995 rgrimes

Remove trailing whitespace.


# 5165 18-Dec-1994 ache

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


# 1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.


# 1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources