Mail Archives: djgpp/2000/08/24/13:19:04
-: > I played around with the __dosexec_find_on_path function, but it
-: > would require major changes to the original "which.c" source code
-: > to support the "-a" switch.
Would something like this work?
Call __dosexec_find_on_path with a local copy of the
environment variable PATH;
if non NULL, retrieve and display the result from *buf;
replace the local copy of the path string with the substring
starting at the end of the path for the command just found;
call __dosexec_find_on_path again with the substring;
continue subsetting your local path string until
__dosexec... returns NULL.
- Raw text -