home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mm / mm-ccmd-0.91-20031009.tar.gz / mm-ccmd-0.91-20031009.tar / work / ccmd / cmfil.cnf < prev    next >
Text File  |  2002-02-20  |  2KB  |  61 lines

  1. _
  2. _ Copyright (c) 1986, 1990 by The Trustees of Columbia University in
  3. _ the City of New York.  Permission is granted to any individual or
  4. _ institution to use, copy, or redistribute this software so long as it
  5. _ is not sold for profit, provided this copyright notice is retained.
  6. _
  7. _ Author: Howie Kaye
  8.  
  9. /* filename parse errors */
  10.  
  11. fnerror(NM, `Does not match filename')
  12. fnerror(AMB,`Ambiguous')
  13. fnerror(NWLD,`Cannot specify wildcards in nonwild parse')
  14. fnerror(INV,`Invalid combination of parse flags')
  15. fnerror(BAD,`Invalid file spec')
  16. fnerror(PMA,`Ambiguous')
  17.  
  18. /*
  19.  * FILBLK structure describes a data block to be passed to the file
  20.  * name parser
  21.  */
  22. typedef struct FILBLK {
  23.     char **pathv;        /* NULL terminated vector of dirs */
  24.     char *exceptionspec;    /* regexp of exceptions */
  25.     char **def_extension;   /* list of extensions to use */
  26. } filblk;
  27.  
  28. /*
  29.  * flags that can be present in a filename fdb 
  30.  */
  31.  
  32. fnflag(OLD)            /* existing file */
  33. fnflag(PO)            /* nonexisting file */
  34. fnflag(VAL)            /* "validate" on PO parse */
  35. fnflag(DIR)            /* a directory */
  36. fnflag(RD)            /* a readable file */
  37. fnflag(WR)            /* a writable file */
  38. fnflag(EXEC)            /* an executable file */
  39. fnflag(WLD)            /* wild cards allowed */
  40. fnflag(NOPTH)            /* only display filename in help */
  41. fnflag(NOEXT)            /* don't display extention in help */
  42. fnflag(TYPE)            /* display the type of file in help */
  43. fnflag(NODIR)            /* don't complete on directories */
  44. #if CCMD_OS_MSDOS
  45. fnflag(HID)            /* a hidden file (MSDOS) */
  46. fnflag(SYS)            /* a system file (MSDOS) */
  47. #endif /* CCMD_OS_MSDOS */
  48. #ifdef undef
  49. fnflag(REGEXP)            /* regexp's allowed */
  50. #endif 
  51. #if CCMD_OS_MSDOS
  52. #define FIL_ALL (FIL_DIR|FIL_RD|FIL_WR|FIL_EXEC|FIL_HID|FIL_SYS)
  53. #else
  54. #define FIL_ALL (FIL_DIR|FIL_RD|FIL_WR|FIL_EXEC)
  55. #endif /* CCMD_OS_MSDOS */
  56.  
  57. typedef char **pvfil;        /* return a NULL terminated string vector */
  58.  
  59. pvtype(pvfil)_            /* FIL returns a list of file structures */
  60.  
  61.