X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fkinput.c;h=23d9366b6548da1201f2a81ab00ad4c842ddc68e;hb=44082770642275dd993aa621d9dc5c5b0dc454d3;hp=eeb610daf54ac138515c269183edee83d51c4c40;hpb=5437b50633032595afe6f87dc0f989bc92a5aea8;p=idzebra-moved-to-github.git diff --git a/index/kinput.c b/index/kinput.c index eeb610d..23d9366 100644 --- a/index/kinput.c +++ b/index/kinput.c @@ -1,6 +1,6 @@ -/* $Id: kinput.c,v 1.63 2004-11-19 10:26:57 heikki Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps +/* $Id: kinput.c,v 1.66 2005-06-14 20:28:54 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -23,7 +23,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #ifdef WIN32 #include -#else +#endif +#if HAVE_UNISTD_H #include #endif #include @@ -546,7 +547,7 @@ int heap_inpc (struct heap_info *hi) while (hci.more) { char this_name[INP_NAME_MAX]; - ISAMC_P isamc_p, isamc_p2; + ISAM_P isamc_p, isamc_p2; char *dict_info; strcpy (this_name, hci.cur_name); @@ -554,8 +555,9 @@ int heap_inpc (struct heap_info *hi) hi->no_diffs++; if ((dict_info = dict_lookup (hi->reg->dict, hci.cur_name))) { - memcpy (&isamc_p, dict_info+1, sizeof(ISAMC_P)); - isamc_p2 = isc_merge (hi->reg->isamc, isamc_p, isamc_i); + memcpy (&isamc_p, dict_info+1, sizeof(ISAM_P)); + isamc_p2 = isamc_p; + isamc_merge (hi->reg->isamc, &isamc_p2, isamc_i); if (!isamc_p2) { hi->no_deletions++; @@ -567,14 +569,15 @@ int heap_inpc (struct heap_info *hi) hi->no_updates++; if (isamc_p2 != isamc_p) dict_insert (hi->reg->dict, this_name, - sizeof(ISAMC_P), &isamc_p2); + sizeof(ISAM_P), &isamc_p2); } } else { - isamc_p = isc_merge (hi->reg->isamc, 0, isamc_i); + isamc_p = 0; + isamc_merge (hi->reg->isamc, &isamc_p, isamc_i); hi->no_insertions++; - dict_insert (hi->reg->dict, this_name, sizeof(ISAMC_P), &isamc_p); + dict_insert (hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p); } } xfree (isamc_i); @@ -626,7 +629,7 @@ int heap_inpb (struct heap_info *hi) while (hci.more) { char this_name[INP_NAME_MAX]; - ISAMC_P isamc_p, isamc_p2; + ISAM_P isamc_p, isamc_p2; char *dict_info; strcpy (this_name, hci.cur_name); @@ -638,8 +641,9 @@ int heap_inpb (struct heap_info *hi) #endif if ((dict_info = dict_lookup (hi->reg->dict, hci.cur_name))) { - memcpy (&isamc_p, dict_info+1, sizeof(ISAMC_P)); - isamc_p2 = isamb_merge (hi->reg->isamb, isamc_p, isamc_i); + memcpy (&isamc_p, dict_info+1, sizeof(ISAM_P)); + isamc_p2 = isamc_p; + isamb_merge (hi->reg->isamb, &isamc_p2, isamc_i); if (!isamc_p2) { hi->no_deletions++; @@ -651,14 +655,15 @@ int heap_inpb (struct heap_info *hi) hi->no_updates++; if (isamc_p2 != isamc_p) dict_insert (hi->reg->dict, this_name, - sizeof(ISAMC_P), &isamc_p2); + sizeof(ISAM_P), &isamc_p2); } } else { - isamc_p = isamb_merge (hi->reg->isamb, 0, isamc_i); + isamc_p = 0; + isamb_merge (hi->reg->isamb, &isamc_p, isamc_i); hi->no_insertions++; - dict_insert (hi->reg->dict, this_name, sizeof(ISAMC_P), &isamc_p); + dict_insert (hi->reg->dict, this_name, sizeof(ISAM_P), &isamc_p); } } xfree (isamc_i); @@ -687,7 +692,7 @@ int heap_inps (struct heap_info *hi) while (hci.more) { char this_name[INP_NAME_MAX]; - ISAMS_P isams_p; + ISAM_P isams_p; char *dict_info; strcpy (this_name, hci.cur_name); @@ -697,7 +702,7 @@ int heap_inps (struct heap_info *hi) { isams_p = isams_merge (hi->reg->isams, isams_i); hi->no_insertions++; - dict_insert (hi->reg->dict, this_name, sizeof(ISAMS_P), &isams_p); + dict_insert (hi->reg->dict, this_name, sizeof(ISAM_P), &isams_p); } else {