X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=dict%2Fdcompact.c;h=3f8999aa11586a25a29c752abbb05f40c22e72cc;hp=800b6545aecd108ee19ce845dc0dc21336e6a112;hb=ef696645cc3b7e0f4027008d1dc589c0f0f90c1f;hpb=4ed5fbcd29d2a98b048d1d94510b262d352b4f7c diff --git a/dict/dcompact.c b/dict/dcompact.c index 800b654..3f8999a 100644 --- a/dict/dcompact.c +++ b/dict/dcompact.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dcompact.c,v $ - * Revision 1.4 1999-05-15 14:36:37 adam + * Revision 1.5 1999-05-26 07:49:12 adam + * C++ compilation. + * + * Revision 1.4 1999/05/15 14:36:37 adam * Updated dictionary. Implemented "compression" of dictionary. * * Revision 1.3 1999/05/12 13:08:06 adam @@ -92,7 +95,7 @@ int dict_copy_compact (BFiles bfs, const char *from_name, const char *to_name) dict_from = dict_open (bfs, from_name, 0, 0, 0); if (!dict_from) return -1; - map = xmalloc ((dict_from->head.last+1) * sizeof(*map)); + map = (int *) xmalloc ((dict_from->head.last+1) * sizeof(*map)); for (i = 0; i <= (int) (dict_from->head.last); i++) map[i] = -1; dict_to = dict_open (bfs, to_name, 0, 1, 1); @@ -131,7 +134,7 @@ int dict_copy_compact (BFiles bfs, const char *from_name, const char *to_name) DICT_backptr(new_p) = map[i-1]; DICT_bsize(new_p) = map[i+1] - map[i]; - dict_copy_page(dict_from, new_p, old_p, map); + dict_copy_page(dict_from, (char*) new_p, (char*) old_p, map); } dict_close (dict_from); dict_close (dict_to);