Article View: comp.sys.amiga.tech
Article #11436Re: Any good makes out there?
From: Randell Jesup
Date: Mon, 13 Feb 1989 18:32
Date: Mon, 13 Feb 1989 18:32
39 lines
2427 bytes
2427 bytes
In article <20212@agate.BERKELEY.EDU> mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
><Lattice 5.0 sets the exit code properly. This seems to have been added
><when they added all the support for standard 1.3 resident programs--when
><compatibility with the standards started becoming more important, as
><Jimm pointed out.
>
>The compiler may, but lc/lc1/lc2 don't. They always return 0 for
>IoError. Makes using execute in Make or (a cc command) pretty
>pointless - which is why I don't.
Huh? lc/lc1/lc2 don't have to set IoErr(). They just have to
return a non-0 return code. There was one beta 5.0 that never returned error
codes, you wouldn't be using it, would you?
><I have a version of the make on Fish disk 69 which I modified (trivially)
><to use Execute() instead of the Manx fexec(). It retrieves the exit code
><using IoErr(). To test it, I just wrote a test program (test.c) which
><does nothing but exit(20), and a makefile which invokes test. Typing
><'make' returns a very gratifying "test failed (returncode 20)".
>
>That message _isn't_ from Make; it's from Execute(). For a make, I
>don't want to see that message. Worse yet, you can't get the dos error
>code from IoErr for lc (though real dos commands give it to you),
>and Execute always hands back a -1 - no matter how well the command
>works.
Execute() never prints such a message. Execute returns DOS_TRUE if
the command was executed (== -1), or 0 if it couldn't execute it (usually
because it couldn't load it). LC has NO requirement to set IoErr to the
value of an error IT got while doing an operation, all it has to do is return
a non-0 return code.
>Finally, Lattice has the obnoxious habit of throwing away the value
>returned from main.
That habit is the ANSI standard. main() is void.
--
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID:
<5963@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!cbmvax!jesupReferences:
<8902100715.AA16566@postgres.Berkeley.EDU> <7381@batcomputer.tn.cornell.edu> <20212@agate.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Any good makes out there? Message-ID: <5963@cbmvax.UUCP> Date: 13 Feb 89 18:32:19 GMT References: <8902100715.AA16566@postgres.Berkeley.EDU> <7381@batcomputer.tn.cornell.edu> <20212@agate.BERKELEY.EDU> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 39