X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bfile%2Fbfile.c;h=3ba061e17a1be4250b5934e5d658ecc1b26258c0;hb=39cb125e7755c6058a93dada8d5172804213cf8e;hp=b9372fe3ace11da4dffebdc6130c449e29f1369c;hpb=896c0427df9d8eff5de6a1735dcd992e067df844;p=idzebra-moved-to-github.git diff --git a/bfile/bfile.c b/bfile/bfile.c index b9372fe..3ba061e 100644 --- a/bfile/bfile.c +++ b/bfile/bfile.c @@ -1,4 +1,4 @@ -/* $Id: bfile.c,v 1.35 2002-08-02 19:26:55 adam Exp $ +/* $Id: bfile.c,v 1.37 2004-11-19 10:26:53 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Index Data Aps @@ -34,6 +34,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include + #include "cfile.h" struct BFiles_struct { @@ -88,7 +89,7 @@ void bf_cache (BFiles bfs, const char *spec) { if (spec) { - yaz_log (LOG_LOG, "enabling cache spec=%s", spec); + yaz_log (YLOG_LOG, "enabling cache spec=%s", spec); if (!bfs->commit_area) bfs->commit_area = mf_init ("shadow", spec, bfs->base); if (bfs->commit_area) @@ -97,7 +98,7 @@ void bf_cache (BFiles bfs, const char *spec) 8); strcpy (bfs->cache_fname, bfs->commit_area->dirs->name); strcat (bfs->cache_fname, "/cache"); - yaz_log (LOG_LOG, "cache_fname = %s", bfs->cache_fname); + yaz_log (YLOG_LOG, "cache_fname = %s", bfs->cache_fname); } } else @@ -132,7 +133,7 @@ BFile bf_open (BFiles bfs, const char *name, int block_size, int wflag) outf = open_cache (bfs, "ab"); if (!outf) { - logf (LOG_FATAL|LOG_ERRNO, "open %s", bfs->cache_fname); + yaz_log (YLOG_FATAL|YLOG_ERRNO, "open %s", bfs->cache_fname); exit (1); } fprintf (outf, "%s %d\n", name, block_size); @@ -146,7 +147,7 @@ BFile bf_open (BFiles bfs, const char *name, int block_size, int wflag) } if (!tmp->mf) { - logf (LOG_FATAL, "mf_open failed for %s", name); + yaz_log (YLOG_FATAL, "mf_open failed for %s", name); xfree (tmp); return 0; } @@ -154,7 +155,7 @@ BFile bf_open (BFiles bfs, const char *name, int block_size, int wflag) return(tmp); } -int bf_read (BFile bf, int no, int offset, int nbytes, void *buf) +int bf_read (BFile bf, zint no, int offset, int nbytes, void *buf) { int r; @@ -170,7 +171,7 @@ int bf_read (BFile bf, int no, int offset, int nbytes, void *buf) return r; } -int bf_write (BFile bf, int no, int offset, int nbytes, const void *buf) +int bf_write (BFile bf, zint no, int offset, int nbytes, const void *buf) { int r; zebra_lock_rdwr_wlock (&bf->rdwr_lock); @@ -215,7 +216,7 @@ void bf_commitExec (BFiles bfs) assert (bfs->commit_area); if (!(inf = open_cache (bfs, "rb"))) { - logf (LOG_LOG, "No commit file"); + yaz_log (YLOG_LOG, "No commit file"); return ; } while (fscanf (inf, "%s %d", path, &block_size) == 2)