🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #37836

Re: xArgs explained

#37836
From: Marion Hakanson
Date: Fri, 07 Apr 1989 22:56
31 lines
2252 bytes
Thank you for a good description.  This approach (xArgs) is my current
favorite.  All the advantages listed in the article are true, and there
is one more:  It is similar to and compatible with what you run into
on a Unix system.  This is really nice for those of us who port C programs
from Unix to the ST -- these programs can now fiddle around with the
environment and with the arg list (after it's been copied to our address
space by the startup code).

I agree that any approach which stuffs the args into a single
environment variable is going to have problems -- the environment is
either going to be broken (with unexpected nulls in the middle of it),
or you are going to have to parse the thing, including some way of
escaping the separator characters (a waste, since the shell or some
other program already parsed the args anyway).  Since many Unix
programs munge their args in place, it's nice to have them in their
own address space (and not the parent's), too.

So, xArgs is wonderful.  If the Mark Williams Co. is listening, this
is one of your customers requesting that you adopt xArgs over your
current approach (I hate it when child programs get their parents'
args!).  If you don't, the next time I'm doing serious C work on the
ST, I'll just chuck all of your utility programs and replace them with
PD tools like the GNU stuff.

Don't get me wrong, the MWC compiler is my favorite.  But nowadays the
GNU compiler is passing it by, and the price is certainly right.

-- 
Marion Hakanson         Domain: hakanson@cs.orst.edu
                        UUCP  : {hp-pcd,tektronix}!orstcs!hakanson
Technical Details
Message-ID: <9851@orstcs.CS.ORST.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!labrea!rutgers!orstcs!mist!hakanson
References: <1280@sdcc15.ucsd.edu> <748@stag.UUCP> <1405@atari.UUCP> <1424@atari.UUCP> <878@midgard.Midgard.MN.ORG>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!labrea!rutgers!orstcs!mist!hakanson
From: hakanson@mist.CS.ORST.EDU (Marion Hakanson)
Newsgroups: comp.sys.atari.st
Subject: Re: xArgs explained
Keywords: xArgs, dLibs, argv, gemdos, argument passing
Message-ID: <9851@orstcs.CS.ORST.EDU>
Date: 7 Apr 89 22:56:52 GMT
References: <1280@sdcc15.ucsd.edu> <748@stag.UUCP> <1405@atari.UUCP> <1424@atari.UUCP> <878@midgard.Midgard.MN.ORG>
Sender: usenet@orstcs.CS.ORST.EDU
Reply-To: hakanson@mist.CS.ORST.EDU (Marion Hakanson)
Organization: Oregon State Univ. -- Computer Science
Lines: 31