Commit Graph

11 Commits

Author SHA1 Message Date
David E. O'Brien
02c751922e Some amount of style(9)
-- function definitions, header ordering, and $FreeBSD$.
2012-06-27 04:39:30 +00:00
Yaroslav Tykhiy
5e8bbdf131 Include <stdlib.h> for the right prototype for exit(3). 2007-10-27 16:16:02 +00:00
Yaroslav Tykhiy
a7aebe893d 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.
2007-10-27 16:13:31 +00:00
Gregory Neil Shapiro
b0c70f811b Apply the envp fix to the other call to main() as well.
Submitted by:	Peter Edwards <pmedwards@eircom.net>
2002-08-09 02:39:38 +00:00
Gregory Neil Shapiro
8f3548b29f 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
2002-08-04 22:14:44 +00:00
Philippe Charnier
b17e90a9c9 Use err(3). 1997-09-15 06:41:09 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Poul-Henning Kamp
7d150b7705 Added a crunched_here(char *path) function so crunched programs can find out
who they share bed and breakfast with.
1995-05-21 01:50:13 +00:00
Jordan K. Hubbard
a62f0e65da 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!).
1994-06-24 15:14:16 +00:00
Jordan K. Hubbard
a47d4a467d 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.
1994-06-24 14:32:36 +00:00
Jordan K. Hubbard
de5663609e 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.
1994-06-15 10:33:49 +00:00