X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Fdcompact.c;h=e5018e13c6f1d932abdbff7e65a1d423de5c89bf;hb=HEAD;hp=1a5e79277eabddfcab4e696ae3ef2a2910bfd0ad;hpb=a66b7d79383ae700f3358731eecfe2aafed0e90d;p=idzebra-moved-to-github.git diff --git a/dict/dcompact.c b/dict/dcompact.c index 1a5e792..e5018e1 100644 --- a/dict/dcompact.c +++ b/dict/dcompact.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2010 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -19,6 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -31,7 +34,7 @@ static void dict_copy_page(Dict dict, char *to_p, char *from_p, int *map) int i, slen, no = 0; short *from_indxp, *to_indxp; char *from_info, *to_info; - + from_indxp = (short*) ((char*) from_p+DICT_bsize(from_p)); to_indxp = (short*) ((char*) to_p+DICT_bsize(to_p)); to_info = (char*) to_p + DICT_infoffset; @@ -67,7 +70,7 @@ static void dict_copy_page(Dict dict, char *to_p, char *from_p, int *map) from_info += sizeof(Dict_ptr); memcpy(&subchar, from_info, sizeof(subchar)); from_info += sizeof(Dict_char); - + memcpy(to_info, &subptr, sizeof(Dict_ptr)); to_info += sizeof(Dict_ptr); memcpy(to_info, &subchar, sizeof(Dict_char)); @@ -100,7 +103,7 @@ int dict_copy_compact(BFiles bfs, const char *from_name, const char *to_name) return -1; map[0] = 0; map[1] = dict_from->head.page_size; - + for (i = 1; i < (int) (dict_from->head.last); i++) { void *buf;