X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=include%2Fidzebra%2Fbfile.h;h=d1b25c17851042cbf6b8fd05e078f923166d7834;hp=4ec3923f1d114c87257990fc89c0acf02c2f9bdd;hb=deff57cfa9d9b39c4a4f1c9b82a64c6e61d821a4;hpb=8374209906a1ff4f2b0f9a855f67af2b460dfea4 diff --git a/include/idzebra/bfile.h b/include/idzebra/bfile.h index 4ec3923..d1b25c1 100644 --- a/include/idzebra/bfile.h +++ b/include/idzebra/bfile.h @@ -1,4 +1,4 @@ -/* $Id: bfile.h,v 1.3 2005-01-15 19:38:24 adam Exp $ +/* $Id: bfile.h,v 1.4 2005-03-30 09:25:23 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -24,7 +24,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define BFILE_H #include -#include +#include YAZ_BEGIN_CDECL @@ -40,6 +40,9 @@ void bfs_destroy (BFiles bfiles); YAZ_EXPORT int bf_close (BFile); +YAZ_EXPORT +int bf_xclose (BFile bf, int version, const char *more_info); + /* bf_open: opens bfile. opens bfile with name 'name' and with 'block_size' as block size. returns bfile handle is successful; NULL otherwise @@ -47,6 +50,11 @@ int bf_close (BFile); YAZ_EXPORT BFile bf_open (BFiles bfs, const char *name, int block_size, int wflag); +YAZ_EXPORT +BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wrflag, + const char *magic, int *read_version, + const char **more_info); + /* bf_read: reads bytes from bfile 'bf'. reads 'nbytes' bytes (or whole block if 0) from offset 'offset' from block 'no'. stores contents in buffer 'buf'. @@ -83,6 +91,14 @@ void bf_commitClean (BFiles bfs, const char *spec); YAZ_EXPORT void bf_reset (BFiles bfs); +/* bf_alloc: allocate one or more blocks */ +YAZ_EXPORT +int bf_alloc(BFile bf, int no, zint *blocks); + +/* bf_alloc: allocate one or more blocks */ +YAZ_EXPORT +int bf_free(BFile bf, int no, const zint *blocks); + YAZ_END_CDECL #endif