*** empty log message ***
[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.3  1994-08-17 14:10:41  quinn
8  * *** empty log message ***
9  *
10  * Revision 1.2  1994/08/17  14:09:32  quinn
11  * Compiles cleanly (still only dummy).
12  *
13  * Revision 1.1  1994/08/17  13:55:08  quinn
14  * New blocksystem. dummy only
15  *
16  */
17
18 #include <util.h>
19 #include <bfile.h>
20 #include <sys/types.h>
21 #include <fcntl.h>
22 #include <unistd.h>
23
24 int bf_close (BFile bf)
25 {
26     close(bf->fd);
27     xfree(bf);
28     return(0);
29 }
30
31 BFile bf_open (const char *name, int block_size, int wflag)
32 {
33     BFile tmp = xmalloc(sizeof(BFile_struct));
34
35     if ((tmp->fd = open(name, wflag ? O_RDWR : O_RDONLY, 0666)) < 0)
36     {
37         log(LOG_FATAL, "open: %s"); 
38         return(0);
39     }
40     return(tmp);
41 }
42
43 int bf_read (BFile bf, int no, int offset, int num, void *buf)
44 {
45 }
46
47 int bf_write (BFile bf, int no, int offset, int num, const void *buf)
48 {
49 }