home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / OAKDIR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.7 KB  |  75 lines

  1. /*
  2.     oakdir.h
  3.  
  4.     % oakland standard file and directory MACROS (MSC5, TURBOC2)
  5.  
  6.     OWL 1.1
  7.     Copyright (c) 1989, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12. */
  13.  
  14. #ifdef M5    /*          Microsoft C version 5.x Dependent Code     */
  15. #    define OAKDIR
  16.  
  17. #    include <dos.h>
  18. #    include <direct.h>
  19.  
  20. #    define OFFILE_SDIR        _A_SUBDIR
  21.  
  22. typedef    struct find_t ofindfile_struct;
  23.  
  24. #    define oak_findfirst(spec, ofindfilep, a)    _dos_findfirst(spec, a, ofindfilep)
  25. #    define oak_findnext(ofindfilep)            _dos_findnext(ofindfilep)
  26.  
  27. #    define oak_findfile_attr(ofindfile)        ofindfile.attrib
  28. #    define oak_findfile_name(ofindfile)        ofindfile.name
  29.  
  30. #    define oak_getcwd(buf, len)            getcwd(buf, len)
  31.  
  32. #    define oak_remove(file)                remove(file)
  33. #endif
  34.  
  35. #ifdef TC    /*          Turbo C Dependent Code         */
  36. #    define OAKDIR
  37.  
  38. #    include <dos.h>
  39. #    include <dir.h>
  40.  
  41. #    define OFFILE_SDIR        FA_DIREC
  42.  
  43. typedef    struct ffblk ofindfile_struct;
  44.  
  45. #    define oak_findfirst(spec, ofindfilep, a)    findfirst(spec, ofindfilep, a)
  46. #    define oak_findnext(ofindfilep)            findnext(ofindfilep)
  47.  
  48. #    define oak_findfile_attr(ofindfile)        ofindfile.ff_attrib
  49. #    define oak_findfile_name(ofindfile)        ofindfile.ff_name
  50.  
  51. #    define oak_getcwd(buf, len)            getcwd(buf, len)
  52.  
  53. #    define oak_remove(file)                remove(file)
  54. #endif
  55.  
  56. #ifndef OAKDIR         /* for those places we haven't fixed yet */
  57.  
  58. #    define OFFILE_SDIR        0
  59.  
  60. typedef    struct {
  61.     int dummy;
  62. } ofindfile_struct;
  63.  
  64. #    define oak_findfirst(spec, ofindfilep, a)    (-1)
  65. #    define oak_findnext(ofindfilep)                (-1)
  66.  
  67. #    define oak_findfile_attr(ofindfile)        0
  68. #    define oak_findfile_name(ofindfile)        ""
  69.  
  70. #    define oak_getcwd(buf, len)                ""
  71.  
  72. #    define oak_remove(file)
  73.  
  74. #endif
  75.