File: bcache.h

package info (click to toggle)
mpsql 2.1-2
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 3,528 kB
  • ctags: 4,886
  • sloc: ansic: 35,184; makefile: 3,761; sh: 44
file content (105 lines) | stat: -rw-r--r-- 4,020 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*  -*- c -*-  */
/* -------------------------------------------------------------------- *
**  copyright (c) 1995 ipvr stuttgart and thomas harrer
** -------------------------------------------------------------------- *
**
**  libhelp
**
**  a comprehensive hypertext help system for OSF/Motif(tm) applications. 
**  based on libhtmlw from NCSA Mosaic(tm) version 2.4
**
**  written by thomas harrer
**  e-mail: Thomas.Harrer@rus.uni-stuttgart.de
**  
** -------------------------------------------------------------------- *
*h  $Id: bcache.h,v 1.3 1995/06/28 12:59:30 thomas Exp $
** -------------------------------------------------------------------- *
**
*h  module:		bcache.h
**
**  contents:		header file for buffer cache (bcache)
**
**  interface:		#include "bcache.h"
**
** -------------------------------------------------------------------- *
**  license and copying issues:
**
**  this software is free; you can redistribute it and/or modify it 
**  under terms similar to the gnu general public license (version 1 
**  or any later version published by the free software foundation). 
**  see the file Licence for more details.
**
**  this program is distributed in the hope that it will be useful,
**  but without any warranty; without even the implied warranty of
**  merchantability or fitness for a particular purpose.  
** -------------------------------------------------------------------- */
#ifndef _BCACHE_H_
#define _BACHE_H_ 1

/* -------------------------------------------------------------------- *
*g  includes
** -------------------------------------------------------------------- */
#include "buffer.h"

/* -------------------------------------------------------------------- *
*g  prototypes
** -------------------------------------------------------------------- */
/* -------------------------------------------------------------------- *
*p  procedure-name:	bcache_current
**
**  purpose:		returns the current path and filename or NULL.
**			the returned buffer must be freed by the caller.
** -------------------------------------------------------------------- *
**  returns:	        if we have a file and a pathname, we concatenate
**			them. if we have either a file or a path, we return 
**			it. else we return NULL.
** -------------------------------------------------------------------- */
char*
bcache_current (void);

/* -------------------------------------------------------------------- *
*p  procedure-name:	bcache_find
**
**  purpose:		returns a cached buffer or NULL
** -------------------------------------------------------------------- *
**  args:		filename
**  return type:	buffer_t*	
**  side effect:	the current path is added to the help path.
**  error handling.:	returns NULL.
** -------------------------------------------------------------------- */
buffer_t*	
bcache_find (/* i  */ char* ref);

/* -------------------------------------------------------------------- *
*p  procedure-name:	bcache_insert
**
**  purpose:		inserts a buffer into the cache.
** -------------------------------------------------------------------- *
**  args:		current_path is a pointer to an allocated string.
**			bcache_free is responsible to free it.
**  side effect:	the current path is added to the help path.
** -------------------------------------------------------------------- */
void
bcache_insert (/* i  */ char* 		ref,
	       /* i  */ char*		current_path,
	       /* i  */ buffer_t* 	buf);


/* -------------------------------------------------------------------- *
*p  procedure-name:	bcache_flush
**
**  purpose:		releases all cached memory.
** -------------------------------------------------------------------- */
void
bcache_flush (void);

#endif /* !_BCACHE_H_ */
/* -------------------------------------------------------------------- *
*l  emacs:
**  local variables:
**  mode:		c
**  outline-regexp:	"\*[HGPLT]"
**  comment-column:	32
**  eval:		(outline-minor-mode t)
**  end:
** -------------------------------------------------------------------- */