source: main/tags/2.26/gsdl/packages/wingdbm/proto.h@ 28875

Last change on this file since 28875 was 525, checked in by rjmcnab, 25 years ago

added need_filelock option to open

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* proto.h - The prototypes for the dbm routines. */
2
3/* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
4 Copyright (C) 1990, 1991, 1993 Free Software Foundation, Inc.
5
6 GDBM is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GDBM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GDBM; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 You may contact the author by:
21 e-mail: [email protected]
22 us-mail: Philip A. Nelson
23 Computer Science Department
24 Western Washington University
25 Bellingham, WA 98226
26
27*************************************************************************/
28
29
30/* Define our _PROTOTYPE macro. */
31
32#ifdef _ARGS
33#undef _ARGS
34#endif
35
36#ifdef __STDC__
37#define _ARGS(args) args
38#else
39#define _ARGS(args) ()
40#endif
41
42
43/* From bucket.c */
44void _gdbm_new_bucket _ARGS((gdbm_file_info *dbf, hash_bucket *bucket,
45 int bits ));
46void _gdbm_get_bucket _ARGS((gdbm_file_info *dbf, word_t dir_index ));
47void _gdbm_split_bucket _ARGS((gdbm_file_info *dbf, word_t next_insert ));
48void _gdbm_write_bucket _ARGS((gdbm_file_info *dbf, cache_elem *ca_entry ));
49
50/* From falloc.c */
51off_t _gdbm_alloc _ARGS((gdbm_file_info *dbf, int num_bytes ));
52void _gdbm_free _ARGS((gdbm_file_info *dbf, off_t file_adr,
53 int num_bytes ));
54int _gdbm_put_av_elem _ARGS((avail_elem new_el, avail_elem av_table [],
55 int *av_count ));
56
57/* From findkey.c */
58char *_gdbm_read_entry _ARGS((gdbm_file_info *dbf, int elem_loc));
59int _gdbm_findkey _ARGS((gdbm_file_info *dbf, datum key, char **dptr,
60 word_t *new_hash_val));
61
62/* From hash.c */
63word_t _gdbm_hash _ARGS((datum key ));
64
65/* From update.c */
66void _gdbm_end_update _ARGS((gdbm_file_info *dbf ));
67int _gdbm_fatal _ARGS((gdbm_file_info *dbf, char *val ));
68
69/* From gdbmopen.c */
70int _gdbm_init_cache _ARGS((gdbm_file_info *dbf, int size));
71
72/* The user callable routines.... */
73void gdbm_close _ARGS((gdbm_file_info *dbf ));
74int gdbm_delete _ARGS((gdbm_file_info *dbf, datum key ));
75datum gdbm_fetch _ARGS((gdbm_file_info *dbf, datum key ));
76gdbm_file_info *gdbm_open _ARGS((char *file, int block_size,
77 int flags, int mode,
78 void (*fatal_func) (void), int need_filelock));
79int gdbm_reorganize _ARGS((gdbm_file_info *dbf ));
80datum gdbm_firstkey _ARGS((gdbm_file_info *dbf ));
81datum gdbm_nextkey _ARGS((gdbm_file_info *dbf, datum key ));
82int gdbm_store _ARGS((gdbm_file_info *dbf, datum key,
83 datum content, int flags ));
84int gdbm_exists _ARGS((gdbm_file_info *dbf, datum key));
85void gdbm_sync _ARGS((gdbm_file_info *dbf));
86int gdbm_setopt _ARGS((gdbm_file_info *dbf, int optflag,
87 int *optval, int optlen));
Note: See TracBrowser for help on using the repository browser.