(file) Return to tvfs.h CVS log (file) (dir) Up to [RizwankCVS] / group3 / wine / dlls / cabinet / tests

 1 rizwank 1.1 /*--------------------------------------------------------------------------
 2             Trivial virtual file system for cabinet conformance test.
 3             
 4             Provides versions of the filesystem calls needed by cabinet:
 5             open, read, write, lseek, close.  Each returns the same
 6             return values as the corresponding _open, _read, _write, _lseek, _close
 7             calls in Win32, i.e. on error, they return -1,
 8             and on success, open returns a file handle,
 9             read and write return # of bytes transferred,
10             seek returns the position,
11             and close returns 0.
12             
13             Also provides functions for creating whole files from binary arrays,
14             and comparing whole files to binary arrays.
15             
16             --------------------------------------------------------------------------*/
17             
18             #ifndef tvfs_h
19             #define tvfs_h
20             
21             int tvfs_open(const char *fname, int flags, int mode);
22 rizwank 1.1 unsigned int tvfs_read(int h, void *buf, unsigned int len);
23             unsigned int tvfs_write(int h, void *buf, unsigned int len);
24             int tvfs_close(int h);
25 rizwank 1.2 long tvfs_lseek(int h,  long whence, int whither);
26 rizwank 1.1 
27             /* Create given file with given contents, return inode number or -1 on fail */
28             int tvfs_create(const char *fname, const char *buf, int len);
29             
30             /* Compare given file with given contents, return 0 on equal, else nonzero */
31             int tvfs_compare(const char *fname, const char *buf, int len);
32             
33             #endif

Rizwan Kassim
Powered by
ViewCVS 0.9.2