Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site smcvax Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!convex!smcvax!robert From: robert@smcvax Newsgroups: net.sources Subject: Re: Son of 'which' Message-ID: <28600002@smcvax> Date: Sun, 1-Sep-85 20:29:00 EDT Article-I.D.: smcvax.28600002 Posted: Sun Sep 1 20:29:00 1985 Date-Received: Wed, 4-Sep-85 04:44:47 EDT References: <225@tikal.UUCP> Lines: 25 Nf-ID: #R:tikal.UUCP:-22500:smcvax:28600002:000:487 Nf-From: smcvax!robert Sep 1 19:29:00 1985 > >Here is a fancified version of the original one. > > ..!uw-beaver!teltone!larry > >-------- cut here (duh) ------- > >#include > >char *getenv(); >char *index(); >... >... > while(!quit) { > cp = index(path, ':'); > if (cp == NULL) > quit++; For those of you without "index()", the intent of which is to return a pointer to the first occurrence of str2 in str1 (or NULL if no match), replace then name "index" with "strchr". Robert Wallace infoswx!smcvax!robert