#ifndef CACHE_H_INCLUDED #define CACHE_H_INCLUDED /* $Id: cache.h,v 1.1 1996/10/13 23:02:33 mb Exp mb $ * * Copyright (c) 1994-96 Martin Buck * Read COPYING for more information */ #include typedef struct cache_s { /* For internal use only! */ byte_t buf[VTX_PAGESIZE]; vtx_pageinfo_t info; int subpages_complete; /* Only used in first element of linked list */ struct cache_s *next; } cache_t; typedef struct { int page; cache_t *subpg_ptr; } cache_loop_t; void cache_insert(const byte_t *buffer, const vtx_pageinfo_t *info); void cache_mark_complete(int page); int cache_query(int page, int subpage, int offset, byte_t *buffer, vtx_pageinfo_t *info); int cache_count_subpg(int page); int cache_next_subpage(int page, int subpage); void cache_reset(void); int cache_loop(cache_loop_t *last, byte_t *buffer, vtx_pageinfo_t *info); #endif /* CACHE_H_INCLUDED */