home *** CD-ROM | disk | FTP | other *** search
- /***
- *
- * Filesys.api
- *
- * C language definitions for Clipper low level file I/O system
- *
- * Copyright (c) 1992-1993, Computer Associates International, Inc.
- * All rights reserved.
- *
- * CA-Clipper uses Microsoft C large model calling conventions
- *
- */
-
- /*
- * Standard Clipper defines
- */
- #ifndef _CLIPDEFS_H
- #include "clipdefs.h"
- #endif
-
-
- /*
- * Make sure HANDLE is defined
- */
- #ifndef FHANDLE_DEFINED
-
- typedef USHORT FHANDLE;
- typedef FHANDLE fhandle;
- typedef FHANDLE far * FHANDLEP;
-
- #define FHANDLE_DEFINED
- #endif
-
-
-
- /*
- * DOS predefined standard handles
- */
-
- #define STDIN 0
- #define STDOUT 1
- #define STDERR 2
- #define STDAUX 3
- #define STDPRN 4
-
-
-
- /*
- * OPEN modes
- */
-
- // access flags
- #define FO_READ 0x0000
- #define FO_WRITE 0x0001
- #define FO_READWRITE 0x0002
-
- // sharing flags
- #define FO_COMPAT 0x0000
- #define FO_EXCLUSIVE 0x0010
- #define FO_DENYWRITE 0x0020
- #define FO_DENYREAD 0x0030
- #define FO_DENYNONE 0x0040
- #define FO_SHARED 0x0040
-
- // inheritance flags
- #define FO_INHERITED 0x0000
- #define FO_PRIVATE 0x0080
-
-
- /*
- * CREATE attributes
- */
-
- #define FC_NORMAL 0x0000
- #define FC_READONLY 0x0001
- #define FC_HIDDEN 0x0002
- #define FC_SYSTEM 0x0004
-
-
-
- /*
- * SEEK modes
- */
-
- #define FS_SET 0x0000
- #define FS_RELATIVE 0x0001
- #define FS_END 0x0002
-
-
-
- /*
- * LOCK modes
- */
-
- #define FL_LOCK 0x0000
- #define FL_UNLOCK 0x0001
-
-
- /*
- * Function prototypes
- */
-
- extern FHANDLE _fsCreate( BYTEP filename, USHORT attribute );
- extern void _fsDelete( BYTEP filename );
- extern FHANDLE _fsOpen( BYTEP filename, USHORT flags );
- extern void _fsClose( FHANDLE h );
- extern USHORT _fsRead( FHANDLE h, BYTEP buff, USHORT count );
- extern USHORT _fsWrite( FHANDLE h, BYTEP buff, USHORT count );
- extern ULONG _fsSeek( FHANDLE h, LONG loc, USHORT mode );
- extern void _fsRename( BYTEP oldname, BYTEP newname );
- extern BOOL _fsLock( FHANDLE h, ULONG start, ULONG length, USHORT mode );
- extern void _fsCommit( FHANDLE h );
- extern USHORT _fsError(void);
-
-
-