Date: Mon, 21 Aug 2000 14:31:52 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <5567-Mon21Aug2000143151+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b In-reply-to: (nobody@bogus.org) Subject: Re: DJGPP port of WHICH References: <44An5.13355$Gs DOT 66133 AT news4 DOT atl> <7QWn5.142399$Fw6 DOT 3484407 AT afrodite DOT telenet-ops DOT be> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "David" > Newsgroups: comp.os.msdos.djgpp > Date: Mon, 21 Aug 2000 06:28:18 -0400 > > What is the "bash exec-finding code"? I added this little hack to > search a list of extensions: > > #ifdef DJGPP > // If we didn't find the original command, try looking for a > // version with ".exe", ".com", or ".bat" tacked on the end. > if (!result) { > for (indx = 0; indx < sizeof(exts) / sizeof(const char *); > indx++) { > result = find_alt_command_in_path(cmd, exts[indx], > path_list, old_index, &path_index); > if (result) break; > } > } > #endif There is a library function which will do all this: it's called __dosexec_find_on_path.