X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=bfile%2Fmfile.c;h=a96820a6d91f8ff8da9e3a8c7b325beadf00e522;hp=52b64cf59e0c9f5d98d804970ee636a939e66221;hb=2e4e9c6def27f1e1463dcb6f205fab6a98054f38;hpb=367b31a1c65ab68ded2db67d9922bf4b36cd5453 diff --git a/bfile/mfile.c b/bfile/mfile.c index 52b64cf..a96820a 100644 --- a/bfile/mfile.c +++ b/bfile/mfile.c @@ -1,4 +1,4 @@ -/* $Id: mfile.c,v 1.52 2003-04-05 12:32:34 adam Exp $ +/* $Id: mfile.c,v 1.53 2004-08-04 08:35:22 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -451,7 +451,7 @@ int mf_close(MFile mf) /* * Read one block from a metafile. Interface mirrors bfile. */ -int mf_read(MFile mf, int no, int offset, int nbytes, void *buf) +int mf_read(MFile mf, zint no, int offset, int nbytes, void *buf) { int rd, toread; @@ -486,7 +486,7 @@ int mf_read(MFile mf, int no, int offset, int nbytes, void *buf) /* * Write. */ -int mf_write(MFile mf, int no, int offset, int nbytes, const void *buf) +int mf_write(MFile mf, zint no, int offset, int nbytes, const void *buf) { int ps, nblocks, towrite; mf_dir *dp; @@ -554,7 +554,7 @@ int mf_write(MFile mf, int no, int offset, int nbytes, const void *buf) mf->files[mf->cur_file].blocks = 0; mf->files[mf->cur_file].bytes = 0; mf->files[mf->cur_file].fd = -1; - sprintf(tmp, "%s/%s-%d.mf", dp->name, mf->name, + sprintf(tmp, "%s/%s-" ZINT_FORMAT ".mf", dp->name, mf->name, mf->files[mf->cur_file].number); mf->files[mf->cur_file].path = xstrdup(tmp); mf->no_files++;