home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / MARK_WC2.LZH / INCLUDE / PATH.H < prev    next >
C/C++ Source or Header  |  1988-04-27  |  1KB  |  47 lines

  1. /*
  2.  * path.h -- information for path lookup
  3.  *
  4.  * Copyright (c) 1987, Mark Williams Company, Chicago.
  5.  * This file and its contents may not be copied or distributed
  6.  * without permission.
  7.  *
  8.  * Violators will be towed at own expense.
  9.  */
  10.  
  11. /*
  12.  * path() takes a path search list, a file name, and an access mode,
  13.  * and then searches each directory named in the search list
  14.  * for a file with the given name and access mode.
  15.  * The constructed path name, which is kept in a static buffer,
  16.  * is returned on success.  path() returns NULL if either pointer
  17.  * argument is NULL, or if the search failed.
  18.  */
  19.  
  20. #include <access.h>
  21. #if COHERENT
  22. #define PATHSEP        '/'            /* Path name separator */
  23. #define    PATHSEPSTRING    "/"
  24. #define LISTSEP        ':'            /* Search list separator */
  25. #define DEFPATH        ":/bin:/usr/bin"    /* Default path */
  26. #define DEFLIBPATH    "/lib:/usr/lib"        /* Default lib path */
  27. #define DEFSHELL    "sh"            /* Default shell name */
  28. #endif
  29. #if GEMDOS
  30. #define PATHSEP        '\\'
  31. #define    PATHSEPSTRING    "\\"
  32. #define LISTSEP        ','
  33. #define DEFPATH        ",\\bin,\\usr\\bin"
  34. #define DEFLIBPATH    "\\lib,,\\usr\\lib"
  35. #define DEFSHELL    "msh.prg"
  36. #endif
  37. #if MSDOS
  38. #define PATHSEP        '\\'
  39. #define    PATHSEPSTRING    "\\"
  40. #define LISTSEP        ';'
  41. #define DEFPATH        ";\\bin;\\usr\\bin"
  42. #define DEFLIBPATH    "\\lib;\\usr\\lib"
  43. #define    DEFSHELL    "maybe next release"
  44. #endif
  45. #define MAXPATH    128        /* Size of static path name buffer */
  46. extern char *path();        /* (char *path, *file; int mode) */
  47.