Deleted
[idzebra-moved-to-github.git] / bfile / bfile.c
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: bfile.c,v $
7  * Revision 1.1  1994-08-17 13:55:08  quinn
8  * Deleted
9  *
10  */
11
12 #include <util.h>
13 #include <sys/types.h>
14 #include <fcntl.h>
15 #include <unistd.h>
16
17 int bf_close (BFile bf)
18 {
19     close(bf->fd);
20     xfree(bf);
21     return(0);
22 }
23
24 BFile bf_open (const char *name, int block_size, int cache, wflag)
25 {
26     BFile tmp = xmalloc(sizeof(BFile_struct));
27
28     if ((tmp->fd = open(name, wflag ? O_RDWR : O_RDONLY, 0666)) < 0)
29     {
30         log(LOG_FATAL, "open: %s"); 
31         return(-1);
32     }
33     return(tmp);
34 }
35
36 int bf_read (BFile bf, int no, int offset, int no, void *buf);
37 {
38     if (seek
39 }
40 int bf_write (BFile bf, int no, int offset, int no, const void *buf);