home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19692 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1.4 KB  |  47 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!csn!news.den.mmc.com!weiser@pogo.den.mmc.com
  3. From: weiser@pogo.den.mmc.com (Matt Weiser)
  4. Subject: Re: Porting simple UNIX programs to the MAC??
  5. Message-ID: <1992Dec11.214417.21082@den.mmc.com>
  6. Sender: news@den.mmc.com (News)
  7. Nntp-Posting-Host: 129.243.25.22
  8. Organization: Martin Marietta WIS
  9. References: <1992Dec11.161544.12668@news.eng.convex.com>
  10. Distribution: na
  11. Date: Fri, 11 Dec 1992 21:44:17 GMT
  12. Lines: 33
  13.  
  14. In article <1992Dec11.161544.12668@news.eng.convex.com>, graham@convex.com (Marv Graham) writes:
  15. > I have has a MAC for a while and have ThinkC 4.  I have just started trying to port
  16. > simple UNIX programs to the MAC.  How does one port programs that need command line
  17. > arguments? NOTE_ I am running System 6.0.7.
  18. > I have a modest example - fabricated for this question:
  19. > #include    <stdio.h>
  20. > void main(int argc, char **argv)
  21. > {
  22. >   ++argv ;
  23. >   if ( argc < 2 ) {
  24. >     fprintf(stderr, "usage: how number\n") ;
  25. >     exit(1) ;
  26. >   }
  27. >   printf("The number is %d\n", atoi(*argv)) ;
  28. > }
  29. > The MAC is not real-computer-like enough to admit the notion of a command line.
  30. > Marv Graham; Convex Computer Corp.  graham@bach.convex.com
  31.  
  32. One way would be to write a little dialog that takes the parameters in at
  33. the start.
  34.  
  35. Other than that, I have never seen any example of this on a mac.
  36.  
  37. Matt Weiser
  38. weiser@pogo.den.mmc.com
  39.  
  40.  
  41.