Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!rochester!bullwinkle!uw-beaver!ubc-vision!molihp!robt From: robt@molihp.UUCP (Robert L Thurlow) Newsgroups: net.micro.atari16 Subject: Re: How do I get the program name (argv[0])? Message-ID: <166@molihp.UUCP> Date: Mon, 2-Jun-86 13:31:08 EDT Article-I.D.: molihp.166 Posted: Mon Jun 2 13:31:08 1986 Date-Received: Thu, 5-Jun-86 19:16:57 EDT References: <520@snow.warwick.UUCP> Reply-To: robt@molihp.UUCP (Robert L Thurlow) Organization: Moli Energy, Vancouver, B.C., CANADA Lines: 20 In article <520@snow.warwick.UUCP> fkc@snow.UUCP (Frank K Carver) writes: >Does anyone know any way to read the name of an application or accessory >once it has been started (argv[0] to traditional `C' programmers). Don't have the books handy, but there are some routines to do this. The 'gemlib' startup code with the dev kit pulls things off the command line and puts it into the char *argv[] array like a UNIX system would, but it ALWAYS puts the string 'C Runtime' into *argv[0]. This is a pain, so the AES has a routine called SHEL_READ which allows you to pull stuff off the 'command line' or wherever the command came from, and I think they DO have the ability to get at the command name. There is also a SHEL_WRITE which allows you to generate a new 'command line' for Pexec()'ing another process, plus a couple of other routines. Check the Abacus GEM Reference Manual. Now if you could make multiple links to the same executable, you'd be in business! # UUCP : ...!ubc_vision!molihp!robt Robert Thurlow # # My thoughts are my own, and are void where prohibited by law. # # "There was something fishy about the butler. I think he was a # # Pisces, probably working for scale." -Nick Danger, 3rd Eye #