e66b96a888610f98821886ac34a800da5bf3ac8f
[idzebra-moved-to-github.git] / dict / dclose.c
1 /*
2  * Copyright (C) 1994-1999, Index Data
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: dclose.c,v $
7  * Revision 1.5  1999-02-02 14:50:16  adam
8  * Updated WIN32 code specific sections. Changed header.
9  *
10  * Revision 1.4  1997/09/09 13:38:01  adam
11  * Partial port to WIN95/NT.
12  *
13  * Revision 1.3  1994/09/01 17:49:36  adam
14  * Removed stupid line. Work on insertion in dictionary. Not finished yet.
15  *
16  */
17
18 #include <sys/types.h>
19 #include <fcntl.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22
23 #include <dict.h>
24
25 int dict_bf_close (Dict_BFile dbf)
26 {
27     int i;
28     dict_bf_flush_blocks (dbf, -1);
29     
30     xfree (dbf->all_blocks);
31     xfree (dbf->all_data);
32     xfree (dbf->hash_array);
33     i = bf_close (dbf->bf);
34     xfree (dbf);
35     return i;
36 }