🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11410

Re: Any good makes out there?

#11410
From: Mike (I'll think of something ye...
Date: Fri, 10 Feb 1989 20:25
62 lines
2950 bytes
In article <7381@batcomputer.tn.cornell.edu> riley@tcgould.tn.cornell.edu (Daniel S. Riley) writes:
<After calling Execute(), IoErr() returns the DOS exit code.  If I remember
<correctly, this was added in 1.2, and Andy Finkel discussed it some on BIX.
<I don't remember seeing it documented anywhere else.

It must have been documented somewhere else, because I knew about it,
and don't ever read BIX. I can't remember where, though.

<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.

<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.

Finally, Lattice has the obnoxious habit of throwing away the value
returned from main.

<So, Jimm is asking for something completely reasonable.  It works with
<Lattice 5.0.

I'd like to see a version of system that actually worked - with _any_
compiler. Can you provide that code for Lattice 5.0.

	<mike

P.S - here's the code I used to test Execute and IoErr. I'd like a
to use Execute for the same reasons that JimM would. Any help making
it work would be appreciated.


#include <stdio.h>

main() {
        int     status ;
        char    buffer[1000] ;
		
        putchar('>') ;
        while (gets(buffer)) {
		status = Execute(buffer, (char *) 0, (char *) 0) ;
		printf("%d:%d>", IoErr(), status) ;
                }
        }
--
He was your reason for living				Mike Meyer
So you once said					mwm@berkeley.edu
Now your reason for living				ucbvax!mwm
Has left you half dead					mwm@ucbjade.BITNET
Technical Details
Message-ID: <20212@agate.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eris.berkeley.edu!mwm
References: <8902100715.AA16566@postgres.Berkeley.EDU> <7381@batcomputer.tn.cornell.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eris.berkeley.edu!mwm
From: mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Any good makes out there?
Message-ID: <20212@agate.BERKELEY.EDU>
Date: 10 Feb 89 20:25:31 GMT
References: <8902100715.AA16566@postgres.Berkeley.EDU> <7381@batcomputer.tn.cornell.edu>
Sender: usenet@agate.BERKELEY.EDU
Organization: Missionaria Phonibalonica
Lines: 62