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