X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fkinput.c;h=9053738a5a193f0d4d6fe8732c749d7e1f3bab09;hb=6e044d5a523bb4363d07af757ebf1bcfe0ad6c04;hp=4ee3dec19c4f63bebeaf28c153bf9a39514e1c76;hpb=ce3907338568fce46c5751e7e1091a5ad1c8e291;p=idzebra-moved-to-github.git diff --git a/index/kinput.c b/index/kinput.c index 4ee3dec..9053738 100644 --- a/index/kinput.c +++ b/index/kinput.c @@ -1,10 +1,19 @@ /* - * Copyright (C) 1994-1998, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: kinput.c,v $ - * Revision 1.28 1998-03-05 08:45:12 adam + * Revision 1.31 1999-02-02 14:50:56 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.30 1998/10/28 10:53:57 adam + * Added type cast to prevent warning. + * + * Revision 1.29 1998/06/11 15:41:39 adam + * Minor changes. + * + * Revision 1.28 1998/03/05 08:45:12 adam * New result set model and modular ranking system. Moved towards * descent server API. System information stored as "SGML" records. * @@ -105,7 +114,7 @@ */ #include -#ifdef WINDOWS +#ifdef WIN32 #include #else #include @@ -154,7 +163,7 @@ void getFnameTmp (char *fname, int no) void key_file_chunk_read (struct key_file *f) { - int nr = 0, r, fd; + int nr = 0, r = 0, fd; char fname[1024]; getFnameTmp (fname, f->no); fd = open (fname, O_BINARY|O_RDONLY); @@ -512,7 +521,7 @@ int heap_inp (struct heap_info *hi) break; memcpy (key_buf + key_buf_ptr, next_key, KEY_SIZE); key_buf_ptr += KEY_SIZE; - if (key_buf_ptr+KEY_SIZE >= key_buf_size) + if (key_buf_ptr+(int) KEY_SIZE >= key_buf_size) { char *new_key_buf; new_key_buf = xmalloc (key_buf_size + INP_BUF_ADD); @@ -524,7 +533,7 @@ int heap_inp (struct heap_info *hi) } no_diffs++; nmemb = key_buf_ptr / KEY_SIZE; - assert (nmemb*KEY_SIZE == key_buf_ptr); + assert (nmemb * (int) KEY_SIZE == key_buf_ptr); if ((info = dict_lookup (hi->dict, cur_name))) { ISAM_P isam_p, isam_p2; @@ -575,8 +584,8 @@ void progressFunc (struct key_file *keyp, void *info) if (now >= p->lastTime+10) { p->lastTime = now; - remaining = (now - p->startTime)* - ((double) p->totalBytes/p->totalOffset - 1.0); + remaining = (time_t) ((now - p->startTime)* + ((double) p->totalBytes/p->totalOffset - 1.0)); if (remaining <= 130) logf (LOG_LOG, "Merge %2.1f%% completed; %ld seconds remaining", (100.0*p->totalOffset) / p->totalBytes, (long) remaining);