Path: utzoo!attcan!uunet!convex!killer!tness7!tness1!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Numerical Recipes in C for Macintosh Keywords: Numerical Recipes C Macintosh Message-ID: <1415@ficc.uu.net> Date: 7 Sep 88 15:44:20 GMT References: <422@arisia.Xerox.COM> <8416@smoke.ARPA> <3834@bsu-cs.UUCP> Organization: SCADA Lines: 37 In article <3834@bsu-cs.UUCP>, dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: > Actually, for each book on, about, or in, the C programing language, > you need a separate Macintosh version, or at least an appendix. The > reason is that on the Macintosh there is no provision for supplying > argc and argv to a program. Well since there is stdio emulation (according to recent articles): #ifndef MAC main(argc, argv) int argc; char *argv[]; #else main() { char args[80], *argv[80]; int argc; printf("Args: "); gets(args) argc = 1; while(*args) { while(isspace(*args)) args++; if(*args) { argv[argc++] = args; while(*args && !isspace(*args)) args++; if(*args) *args++ = 0; } } argv[argc] = 0; #endif -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" peter@ficc.uu.net