X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fkinput.c;h=4da946072bf3d479c103a50a0157e3ec0834e759;hb=5f8ba9f35bd3c9aeafe26613021f2edd141b8611;hp=8a9fb0edefbcf3b3c10afbc4b41872b22464f67e;hpb=0b5d38bc84d5261aaed3bce3be748c5d7008f2ff;p=idzebra-moved-to-github.git diff --git a/index/kinput.c b/index/kinput.c index 8a9fb0e..4da9460 100644 --- a/index/kinput.c +++ b/index/kinput.c @@ -4,7 +4,18 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: kinput.c,v $ - * Revision 1.21 1996-11-08 11:10:23 adam + * Revision 1.24 1997-09-09 13:38:07 adam + * Partial port to WIN95/NT. + * + * Revision 1.23 1997/09/04 13:57:39 adam + * Added O_BINARY for open calls. + * + * Revision 1.22 1997/02/12 20:39:45 adam + * Implemented options -f that limits the log to the first + * records. + * Changed some log messages also. + * + * Revision 1.21 1996/11/08 11:10:23 adam * Buffers used during file match got bigger. * Compressed ISAM support everywhere. * Bug fixes regarding masking characters in queries. @@ -80,7 +91,11 @@ */ #include +#ifdef WINDOWS +#include +#else #include +#endif #include #include #include @@ -128,7 +143,7 @@ void key_file_chunk_read (struct key_file *f) int nr = 0, r, fd; char fname[1024]; getFnameTmp (fname, f->no); - fd = open (fname, O_RDONLY); + fd = open (fname, O_BINARY|O_RDONLY); if (fd == -1) { logf (LOG_FATAL|LOG_ERRNO, "cannot open %s", fname); @@ -560,6 +575,10 @@ void progressFunc (struct key_file *keyp, void *info) p->totalOffset += keyp->buf_size; } +#ifndef R_OK +#define R_OK 4 +#endif + void key_input (int nkeys, int cache) { @@ -640,7 +659,7 @@ void key_input (int nkeys, int cache) is_close (isam); if (isamc) isc_close (isamc); - + for (i = 1; i<=nkeys; i++) { getFnameTmp (rbuf, i);