File: cache.h

package info (click to toggle)
ratbox-services 1.2.4%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,760 kB
  • ctags: 6,989
  • sloc: ansic: 76,435; sh: 17,527; cpp: 3,029; perl: 1,048; makefile: 740; pascal: 607; yacc: 256; lex: 232
file content (33 lines) | stat: -rw-r--r-- 622 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* $Id: cache.h 23906 2007-05-02 19:13:03Z leeh $ */
#ifndef INCLUDED_filecache_h
#define INCLUDED_filecache_h

#define CACHELINELEN	81
#define CACHEFILELEN	30

struct lconn;

struct BlockHeap *cacheline_heap;

struct cachefile
{
	char name[CACHEFILELEN];
	dlink_list contents;
};

struct cacheline
{
	char data[CACHELINELEN];
	dlink_node linenode;
};

extern struct cacheline *emptyline;

extern void init_cache(void);
extern struct cachefile *cache_file(const char *, const char *, int add_blank);
extern void free_cachefile(struct cachefile *);

extern void send_cachefile(struct cachefile *, struct lconn *);

#endif