IDZEBRA  2.2.7
dclose.c
Go to the documentation of this file.
1 /* This file is part of the Zebra server.
2  Copyright (C) Index Data
3 
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8 
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18 */
19 
20 
21 
22 #if HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25 #include <sys/types.h>
26 #include <fcntl.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29 
30 #include "dict-p.h"
31 
33 {
34  dict_bf_flush_blocks(dbf, -1);
35 
36  xfree(dbf->all_blocks);
37  xfree(dbf->all_data);
38  xfree(dbf->hash_array);
39  bf_close(dbf->bf);
40  xfree(dbf);
41  return 0;
42 }
43 /*
44  * Local variables:
45  * c-basic-offset: 4
46  * c-file-style: "Stroustrup"
47  * indent-tabs-mode: nil
48  * End:
49  * vim: shiftwidth=4 tabstop=8 expandtab
50  */
51 
void bf_close(BFile bf)
closes a Block file (may call exit)
Definition: bfile.c:139
int dict_bf_close(Dict_BFile dbf)
Definition: dclose.c:32
void dict_bf_flush_blocks(Dict_BFile bf, int no_to_flush)
Definition: drdwr.c:82
struct Dict_file_block ** hash_array
Definition: dict-p.h:60
void * all_data
Definition: dict-p.h:64
struct Dict_file_block * all_blocks
Definition: dict-p.h:58