projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many public functions returns ZEBRA_RES rather than int to avoid
[idzebra-moved-to-github.git]
/
include
/
idzebra
/
bfile.h
diff --git
a/include/idzebra/bfile.h
b/include/idzebra/bfile.h
index
486f868
..
d1b25c1
100644
(file)
--- 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.
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
#ifndef BFILE_H
#define BFILE_H
-#include <idzebra/version.h>
+#include <yaz/yconfig.h>
+#include <idzebra/util.h>
YAZ_BEGIN_CDECL
YAZ_BEGIN_CDECL
@@
-39,6
+40,9
@@
void bfs_destroy (BFiles bfiles);
YAZ_EXPORT
int bf_close (BFile);
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
/* 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_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'.
/* 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);
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
YAZ_END_CDECL
#endif