X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Fdcompact.c;h=489e79f3f15363b6e49c01a22a5e7f3c3f792a90;hb=d284fe71faaa02d3e066d7f1db7d884fe0f8b0ee;hp=70a167be32a745a150050497a84710e30a32ff43;hpb=e150e51a7e20a902e9fd2f11f00811f94f67d529;p=idzebra-moved-to-github.git diff --git a/dict/dcompact.c b/dict/dcompact.c index 70a167b..489e79f 100644 --- a/dict/dcompact.c +++ b/dict/dcompact.c @@ -1,31 +1,26 @@ -/* - * Copyright (C) 1994-1999, Index Data - * All rights reserved. - * Sebastian Hammer, Adam Dickmeiss - * - * $Log: dcompact.c,v $ - * Revision 1.7 1999-11-30 13:48:03 adam - * Improved installation. Updated for inclusion of YAZ header files. - * - * Revision 1.6 1999/09/07 08:13:08 adam - * Removed log messages. - * - * 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 - * First version of ISAMS. - * - * Revision 1.2 1999/03/09 16:27:49 adam - * More work on SDRKit integration. - * - * Revision 1.1 1999/03/09 13:07:06 adam - * Work on dict_compact routine. - * - */ +/* $Id: dcompact.c,v 1.9 2004-09-09 09:07:12 adam Exp $ + Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 + Index Data Aps + +This file is part of the Zebra server. + +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 +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + + #include #include @@ -98,13 +93,13 @@ int dict_copy_compact (BFiles bfs, const char *from_name, const char *to_name) int no_dir = 0; Dict dict_from, dict_to; int *map, i; - dict_from = dict_open (bfs, from_name, 0, 0, 0); + dict_from = dict_open (bfs, from_name, 0, 0, 0, 4096); if (!dict_from) return -1; 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); + dict_to = dict_open (bfs, to_name, 0, 1, 1, 4096); if (!dict_to) return -1; map[0] = 0;