home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / dir / srchpath.txh < prev   
Encoding:
C/C++ Source or Header  |  1995-07-10  |  658 b   |  30 lines

  1. @node searchpath, file system
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <dir.h>
  6.  
  7. char * searchpath(const char *file);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Given a name of a file in @var{file}, searches for that file in a list
  13. of directories, including the current working directory and those
  14. defined in the PATH environment variable.
  15.  
  16. @subheading Return Value
  17.  
  18. When successfull, the function returns a pointer to a static buffer
  19. where the full pathname of the found file is stored.  Otherwise, it
  20. returns NULL.
  21.  
  22. @subheading Example
  23.  
  24. @example
  25.   printf("%s was found as %s\n", argv[1], searchpath(argv[1]));
  26.  
  27. @end example
  28.  
  29.  
  30.