home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!smurf.sub.org!artcom0!hb.maus.de!hh2.maus.de!Ulf_Moeller
- From: Ulf_Moeller@hh2.maus.de (Ulf Moeller)
- Newsgroups: comp.sys.atari.st.tech
- Subject: Re: argv
- Message-ID: <A11876@HH2.maus.de>
- Date: 24 Aug 92 21:19:00 GMT
- References: <A50943@HB.maus.de>
- Organization: MausNet
- Lines: 17
- X-Gateway: MausGate/News 1.11
-
- marshall@cs.uq.oz.au (Marshall Harris) wrote:
-
- >I can't work out how to use argv on my Ste (can it be used at all?).
-
- Any decent library should use ARGV. The gcc and mint libs do, and the Pure C
- lib does if you use the pcvstart.o startup code.
-
- >Can anyone enlighten me on how to access a C program's own name from within
- >the program?
-
- main(int argc, char *argv[])
- {
- char *progname = "unknown";
- if (argv[0][0] != '\0')
- progname = argv[0];
- /* ... */
- }
-