home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / atari / st / tech / 4585 < prev    next >
Encoding:
Text File  |  1992-08-26  |  852 b   |  29 lines

  1. 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
  2. From: Ulf_Moeller@hh2.maus.de (Ulf Moeller)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Re: argv
  5. Message-ID: <A11876@HH2.maus.de>
  6. Date: 24 Aug 92 21:19:00 GMT
  7. References: <A50943@HB.maus.de>
  8. Organization: MausNet
  9. Lines: 17
  10. X-Gateway: MausGate/News 1.11
  11.  
  12. marshall@cs.uq.oz.au (Marshall Harris) wrote:
  13.  
  14. >I can't work out how to use argv on my Ste (can it be used at all?).
  15.  
  16. Any decent library should use ARGV. The gcc and mint libs do, and the Pure C
  17. lib does if you use the pcvstart.o startup code.
  18.  
  19. >Can anyone enlighten me on how to access a C program's own name from within
  20. >the program?
  21.  
  22. main(int argc, char *argv[])
  23. {
  24.     char *progname = "unknown";
  25.     if (argv[0][0] != '\0')
  26.         progname = argv[0];
  27.     /* ... */
  28. }
  29.