Path: utzoo!utgpu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!fafnir.la.locus.com!geoff From: geoff@ITcorp.com (Geoff Kuenning) Newsgroups: alt.sources.d Subject: Re: is there a c program which outputs itself? Message-ID: <1991Mar22.235745.1809094@locus.com> Date: 22 Mar 91 23:57:45 GMT References: <1991Mar21.190907.9789@ux1.cso.uiuc.edu> Sender: geoff@locus.com (Geoff Kuenning) Reply-To: geoff@ITcorp.com (Geoff Kuenning) Organization: Locus Computing Corporation, Inglewood, CA Lines: 15 In article <1991Mar21.190907.9789@ux1.cso.uiuc.edu> peltz@cerl.uiuc.edu (Steve Peltz) writes: > Here's a version which doesn't use excessively cute tricks, assume that > certain characters have fixed numeric values, or such. In other words, > it is an HONEST self-printing program. It is also a self-starter, in > that there are really two programs involved. The first one writes the > second one, based on a shell, which is the actual self-printing > program. Both "makeself.c" and "selfstart.c" forgot to end with "return 0;" so that they would return a success status to the invoker (and thus work reliably with make). A neat package, especially since it's so easily extensible! -- Geoff Kuenning geoff@la.locus.com geoff@ITcorp.com