www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/21/06:45:44

From: "David" <nobody AT bogus DOT org>
Newsgroups: comp.os.msdos.djgpp
References: <44An5.13355$Gs DOT 66133 AT news4 DOT atl> <7QWn5.142399$Fw6 DOT 3484407 AT afrodite DOT telenet-ops DOT be>
Subject: Re: DJGPP port of WHICH
Lines: 34
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <jz7o5.1187$Mw.11451@news2.atl>
Date: Mon, 21 Aug 2000 06:28:18 -0400
NNTP-Posting-Host: 209.214.202.78
X-Trace: news2.atl 966853967 209.214.202.78 (Mon, 21 Aug 2000 06:32:47 EDT)
NNTP-Posting-Date: Mon, 21 Aug 2000 06:32:47 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Tim 'Zastai' Van Holder wrote in message
<7QWn5.142399$Fw6 DOT 3484407 AT afrodite DOT telenet-ops DOT be>...
>Damn - I've had that lying around for a while now (used the bash
exec-
>finding code to make it work right). Guess I should have released
it and
>saved you the trouble. Sorry.
>Will you release it as a DJGPP distribution, or shall I?


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

I did this so that people could add other extensions later (".pl",
".cmd", etc.).   But if there's and easier way, let me know...

Thanks,
David



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019