home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR502.DOS / INCLUDE / FILESYS.API < prev    next >
Encoding:
Text File  |  1993-02-15  |  2.1 KB  |  116 lines

  1. /***
  2. *
  3. *   Filesys.api
  4. *
  5. *   C language definitions for Clipper low level file I/O system
  6. *
  7. *   Copyright (c) 1992-1993, Computer Associates International, Inc.
  8. *   All rights reserved.
  9. *
  10. *   CA-Clipper uses Microsoft C large model calling conventions
  11. *
  12. */
  13.   
  14. /*
  15. *  Standard Clipper defines
  16. */
  17. #ifndef _CLIPDEFS_H
  18. #include "clipdefs.h"
  19. #endif
  20.  
  21.  
  22. /*
  23. *  Make sure HANDLE is defined
  24. */
  25. #ifndef FHANDLE_DEFINED
  26.  
  27. typedef USHORT FHANDLE;
  28. typedef FHANDLE fhandle;
  29. typedef FHANDLE far * FHANDLEP;
  30.  
  31. #define FHANDLE_DEFINED
  32. #endif
  33.  
  34.  
  35.  
  36. /*
  37. *   DOS predefined standard handles
  38. */
  39.  
  40. #define STDIN    0
  41. #define STDOUT   1
  42. #define STDERR   2
  43. #define STDAUX   3
  44. #define STDPRN   4
  45.  
  46.  
  47.  
  48. /*
  49. *   OPEN modes
  50. */
  51.  
  52. // access flags
  53. #define FO_READ       0x0000
  54. #define FO_WRITE      0x0001
  55. #define FO_READWRITE  0x0002
  56.  
  57. // sharing flags
  58. #define FO_COMPAT     0x0000
  59. #define FO_EXCLUSIVE  0x0010
  60. #define FO_DENYWRITE  0x0020
  61. #define FO_DENYREAD   0x0030
  62. #define FO_DENYNONE   0x0040
  63. #define FO_SHARED     0x0040
  64.  
  65. // inheritance flags
  66. #define FO_INHERITED  0x0000
  67. #define FO_PRIVATE    0x0080
  68.  
  69.  
  70. /*
  71. *   CREATE attributes
  72. */
  73.  
  74. #define FC_NORMAL     0x0000  
  75. #define FC_READONLY   0x0001
  76. #define FC_HIDDEN     0x0002
  77. #define FC_SYSTEM     0x0004
  78.  
  79.  
  80.  
  81. /*
  82. *  SEEK modes
  83. */
  84.  
  85. #define FS_SET        0x0000
  86. #define FS_RELATIVE   0x0001
  87. #define FS_END        0x0002
  88.  
  89.  
  90.  
  91. /*
  92. *   LOCK modes
  93. */
  94.  
  95. #define FL_LOCK       0x0000
  96. #define FL_UNLOCK     0x0001
  97.  
  98.  
  99. /*
  100. *   Function prototypes
  101. */
  102.  
  103. extern FHANDLE _fsCreate( BYTEP filename, USHORT attribute );
  104. extern void    _fsDelete( BYTEP filename );
  105. extern FHANDLE _fsOpen( BYTEP filename, USHORT flags );
  106. extern void    _fsClose( FHANDLE h );
  107. extern USHORT  _fsRead( FHANDLE h, BYTEP buff, USHORT count );
  108. extern USHORT  _fsWrite( FHANDLE h, BYTEP buff, USHORT count );
  109. extern ULONG   _fsSeek( FHANDLE h, LONG loc, USHORT mode );
  110. extern void    _fsRename( BYTEP oldname, BYTEP newname );
  111. extern BOOL    _fsLock( FHANDLE h, ULONG start, ULONG length, USHORT mode );
  112. extern void    _fsCommit( FHANDLE h );
  113. extern USHORT  _fsError(void);
  114.  
  115.  
  116.