History log of /freebsd-10.1-release/usr.sbin/crunch/crunchgen/crunched_main.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


# 237625 27-Jun-2012 obrien

Some amount of style(9)
-- function definitions, header ordering, and $FreeBSD$.


# 173067 27-Oct-2007 yar

Include <stdlib.h> for the right prototype for exit(3).


# 173065 27-Oct-2007 yar

Set the program name if the crunched program is selected through
argv[1] to mimic crt0 behaviour. Do the job by a direct assignment
to __progname in order to stay compatible with NetBSD, whose
setprogname() is a deliberate no-op.

The reason for this change is that some programs (usually those
imported from NetBSD) use getprogname() to distinguish between their
aliases. (See pkill aka pgrep for example.)

This change can be useful, and applicable, to NetBSD, too.


# 101550 09-Aug-2002 gshapiro

Apply the envp fix to the other call to main() as well.

Submitted by: Peter Edwards <pmedwards@eircom.net>


# 101341 04-Aug-2002 gshapiro

Pass envp to crunched program's main() routines as some depend on it.
Note that crunchgen's stub .c programs already have the code to use it:

"int _crunched_%s_stub(int argc, char **argv, char **envp)"
"{return main(argc,argv,envp);}\" >%s_stub.c\n",

Add $FreeBSD$ to allow the commit.

Reviewed by: luigi
MFC after: 3 days


# 29453 15-Sep-1997 charnier

Use err(3).


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 8664 20-May-1995 phk

Added a crunched_here(char *path) function so crunched programs can find out
who they share bed and breakfast with.


# 1771 24-Jun-1994 jkh

Just talked with James - there's another, better way to go about this.
Back out my earlier change. Note that this is just for the 1.1.5R floppies;
the 1.1.5A ones still have the work-around method (which works fine and
doesn't hurt anything, it's just kludge!).


# 1770 24-Jun-1994 jkh

This is a kludge. Unless I make a link from sh to - (which would leave a file
called `-' lying around on the users system forever) login shells will fail.
Just special-case the handling of `-' for now until/unless I find a more
palatable solution.


# 1723 15-Jun-1994 jkh

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


# 1722 15-Jun-1994 jkh

This is the new crunch utility for making distribution floppies from
James da Silva. We need to integrate this before 1.1.5 so that we can
actually make the boot floppies.