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
Replace old index names "dc_*" with the actual local index names.
[idzebra-moved-to-github.git]
/
bfile
/
bfile.c
diff --git
a/bfile/bfile.c
b/bfile/bfile.c
index
1f6f49d
..
5ee5460
100644
(file)
--- a/
bfile/bfile.c
+++ b/
bfile/bfile.c
@@
-1,8
+1,5
@@
-/* $Id: bfile.c,v 1.52 2006-11-14 08:12:06 adam Exp $
- Copyright (C) 1995-2006
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-20,6
+17,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-55,7
+55,7
@@
struct BFile_struct
struct BFiles_struct {
MFile_area commit_area;
struct BFiles_struct {
MFile_area commit_area;
- MFile_area_struct *register_area;
+ MFile_area register_area;
char *base;
char *cache_fname;
};
char *base;
char *cache_fname;
};
@@
-68,7
+68,7
@@
BFiles bfs_create (const char *spec, const char *base)
bfs->cache_fname = 0;
if (base)
bfs->base = xstrdup(base);
bfs->cache_fname = 0;
if (base)
bfs->base = xstrdup(base);
- bfs->register_area = mf_init("register", spec, base);
+ bfs->register_area = mf_init("register", spec, base, 0);
if (!bfs->register_area)
{
bfs_destroy(bfs);
if (!bfs->register_area)
{
bfs_destroy(bfs);
@@
-108,7
+108,7
@@
ZEBRA_RES bf_cache(BFiles bfs, const char *spec)
{
yaz_log(YLOG_LOG, "enabling shadow spec=%s", spec);
if (!bfs->commit_area)
{
yaz_log(YLOG_LOG, "enabling shadow spec=%s", spec);
if (!bfs->commit_area)
- bfs->commit_area = mf_init("shadow", spec, bfs->base);
+ bfs->commit_area = mf_init("shadow", spec, bfs->base, 1);
if (bfs->commit_area)
{
bfs->cache_fname = xmalloc(strlen(bfs->commit_area->dirs->name)+
if (bfs->commit_area)
{
bfs->cache_fname = xmalloc(strlen(bfs->commit_area->dirs->name)+
@@
-177,7
+177,7
@@
BFile bf_xopen(BFiles bfs, const char *name, int block_size, int wrflag,
bf->alloc_buf_size = HEADER_SIZE;
else
bf->alloc_buf_size = bf->block_size;
bf->alloc_buf_size = HEADER_SIZE;
else
bf->alloc_buf_size = bf->block_size;
-
+
hbuf = bf->alloc_buf = xmalloc(bf->alloc_buf_size);
/* fill-in default values */
hbuf = bf->alloc_buf = xmalloc(bf->alloc_buf_size);
/* fill-in default values */
@@
-243,7
+243,7
@@
int bf_xclose(BFile bf, int version, const char *more_info)
zint pos = 0;
assert(bf->alloc_buf);
assert(bf->magic);
zint pos = 0;
assert(bf->alloc_buf);
assert(bf->magic);
- sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ",
+ sprintf(bf->alloc_buf, "%s %d " ZINT_FORMAT " " ZINT_FORMAT " ",
bf->magic, version, bf->last_block, bf->free_list);
if (more_info)
strcat(bf->alloc_buf, more_info);
bf->magic, version, bf->last_block, bf->free_list);
if (more_info)
strcat(bf->alloc_buf, more_info);
@@
-337,7
+337,7
@@
int bf_read2(BFile bf, zint no, int offset, int nbytes, void *buf)
if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0)
ret = mf_read(bf->mf, no, offset, nbytes, buf);
}
if ((ret = cf_read(bf->cf, no, offset, nbytes, buf)) == 0)
ret = mf_read(bf->mf, no, offset, nbytes, buf);
}
- else
+ else
ret = mf_read(bf->mf, no, offset, nbytes, buf);
zebra_lock_rdwr_runlock(&bf->rdwr_lock);
return ret;
ret = mf_read(bf->mf, no, offset, nbytes, buf);
zebra_lock_rdwr_runlock(&bf->rdwr_lock);
return ret;
@@
-513,6
+513,7
@@
int bfs_shadow_directory_stat(BFiles bfs, int no, const char **directory,
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab