Commit 2daba666 authored by Pontus Hagland's avatar Pontus Hagland
Browse files

initial checkin

parent e6c008be
This diff is collapsed.
/*
* cache-database - header
*
* cache: Database low-level driver
*
* Pontus Hagland 1993-10-07
*
*/
#define DEFEATSIZE 32
#define DEFEATSTRING "Lyskom from Lysator - PH 931007"
/* 01234567890123456789012345678901 */
struct cachebaseheader
{
unsigned long blocksize;
unsigned long highblock;
unsigned long highnumber;
unsigned long blockgeneration;
time_t ts_created;
time_t ts_written;
unsigned long hex01234567,hex89abcdef,sizeofint,sizeoflong;
};
struct cachebase /* use only internal in cache-database.c */
{
FILE *fp;
FILE *ifp;
char *filename;
char *indexname;
unsigned long writeonblock;
struct cb_blocklist *freelist;
struct cb_blocklist *regenlist;
struct cachebaseheader header;
unsigned long active_records;
};
/* function definitions */
struct cachebase *
cb_open(char *filename,char *indexname,unsigned int blocksize);
void
cb_close(struct cachebase *cb);
void
cb_writerecord(struct cachebase *cb,
unsigned long no,
void *buffert,
unsigned int size);
void *
cb_getrecord(struct cachebase *cb,
unsigned long no);
void
cb_eraserecord(struct cachebase *cb,
unsigned long no);
unsigned long
cb_nextnumber(struct cachebase *cb);
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment