Deleted
authorSebastian Hammer <quinn@indexdata.com>
Wed, 17 Aug 1994 13:55:07 +0000 (13:55 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Wed, 17 Aug 1994 13:55:07 +0000 (13:55 +0000)
bfile/Makefile
bfile/bfile.c [new file with mode: 0644]

index b4cee70..2589c53 100644 (file)
@@ -1,11 +1,10 @@
-
 SHELL=/bin/sh
 INCLUDE=-I../include
 TPROG=btest
 CFLAGS=-g -Wall
 DEFS=$(INCLUDE)
 LIB=../lib/bfile.a
 SHELL=/bin/sh
 INCLUDE=-I../include
 TPROG=btest
 CFLAGS=-g -Wall
 DEFS=$(INCLUDE)
 LIB=../lib/bfile.a
-PO = open.o close.o rdwr.o
+PO = bfile.o
 CPP=cc -E
 
 all: $(LIB)
 CPP=cc -E
 
 all: $(LIB)
diff --git a/bfile/bfile.c b/bfile/bfile.c
new file mode 100644 (file)
index 0000000..983929c
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 1994, Index Data I/S 
+ * All rights reserved.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: bfile.c,v $
+ * Revision 1.1  1994-08-17 13:55:08  quinn
+ * Deleted
+ *
+ */
+
+#include <util.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int bf_close (BFile bf)
+{
+    close(bf->fd);
+    xfree(bf);
+    return(0);
+}
+
+BFile bf_open (const char *name, int block_size, int cache, wflag)
+{
+    BFile tmp = xmalloc(sizeof(BFile_struct));
+
+    if ((tmp->fd = open(name, wflag ? O_RDWR : O_RDONLY, 0666)) < 0)
+    {
+        log(LOG_FATAL, "open: %s"); 
+       return(-1);
+    }
+    return(tmp);
+}
+
+int bf_read (BFile bf, int no, int offset, int no, void *buf);
+{
+    if (seek
+}
+int bf_write (BFile bf, int no, int offset, int no, const void *buf);