-BFile bf_open (const char *name, int block_size, int cache);
-BFile bf_open_w (const char *name, int block_size, int cache);
-int bf_read (BFile bf, int no, void *buf);
-int bf_write (BFile bf, int no, const void *buf);
-
-int bf_readp (BFile bf, int no, void **bufp);
-int bf_newp (BFile bf, int no, void **bufp);
-int bf_touch (BFile bf, int no);
-void bf_flush_blocks (BFile bf, int no_to_flush);
-
-void *xmalloc_f (size_t size);
-#define xmalloc(x) xmalloc_f(x)
-
-extern char *prog;
+BFile bf_open (const char *name, int block_size, int wflag);
+int bf_read (BFile bf, int no, int offset, int num, void *buf);
+int bf_write (BFile bf, int no, int offset, int num, const void *buf);
+void bf_cache (void);
+void bf_commit (void);