2 * Copyright (C) 1995, Index Data I/S
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 1995-12-11 09:03:54 adam
8 * New function: cf_unlink.
9 * New member of commit file head: state (0) deleted, (1) hash file.
11 * Revision 1.3 1995/12/01 16:24:29 adam
12 * Commit files use separate meta file area.
14 * Revision 1.2 1995/12/01 11:37:23 adam
15 * Cached/commit files implemented as meta-files.
17 * Revision 1.1 1995/11/30 08:33:12 adam
18 * Started work on commit facility.
25 #define HASH_BUCKET 63
27 struct CFile_hash_bucket {
28 struct CFile_ph_bucket {
35 struct CFile_hash_bucket *h_next, **h_prev;
36 struct CFile_hash_bucket *lru_next, *lru_prev;
39 #define HASH_BSIZE sizeof(struct CFile_ph_bucket)
41 typedef struct CFile_struct
53 struct CFile_hash_bucket **parray;
54 struct CFile_hash_bucket *bucket_lru_front, *bucket_lru_back;
57 int max_bucket_in_memory;
62 int cf_close (CFile cf);
63 CFile cf_open (MFile mf, MFile_area area, const char *fname, int block_size,
64 int wflag, int *firstp);
65 int cf_read (CFile cf, int no, int offset, int num, void *buf);
66 int cf_write (CFile cf, int no, int offset, int num, const void *buf);
67 void cf_unlink (CFile cf);
68 void cf_commit (CFile cf);