X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fidzebra%2Fbfile.h;h=d1b25c17851042cbf6b8fd05e078f923166d7834;hb=49d0ee122a9f86ec2967b577dcc297c501785edd;hp=486f868bb8db301e9555f11b6818cac7b2b44e96;hpb=05b9b8ed020c5bfa48a913d6a2e2b50ddf1bab8e;p=idzebra-moved-to-github.git diff --git a/include/idzebra/bfile.h b/include/idzebra/bfile.h index 486f868..d1b25c1 100644 --- a/include/idzebra/bfile.h +++ b/include/idzebra/bfile.h @@ -1,6 +1,6 @@ -/* $Id: bfile.h,v 1.1 2004-12-08 12:23:09 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps +/* $Id: bfile.h,v 1.4 2005-03-30 09:25:23 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -23,7 +23,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef BFILE_H #define BFILE_H -#include +#include +#include YAZ_BEGIN_CDECL @@ -39,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 @@ -46,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'. @@ -82,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