-/*
- * 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.8.2.2 2006-12-05 21:14:40 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 this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <yaz/xmalloc.h>
#include <yaz/log.h>
#include <dict.h>
void *buf;
int size;
#if 0
- logf (LOG_LOG, "map[%d] = %d", i, map[i]);
+ yaz_log(YLOG_LOG, "map[%d] = %d", i, map[i]);
#endif
dict_bf_readp (dict_from->dbf, i, &buf);
size = ((DICT_size(buf)+sizeof(short)-1)/sizeof(short) +
no_dir += DICT_nodir(buf);
}
#if 0
- logf (LOG_LOG, "map[%d] = %d", i, map[i]);
- logf (LOG_LOG, "nodir = %d", no_dir);
+ yaz_log(YLOG_LOG, "map[%d] = %d", i, map[i]);
+ yaz_log(YLOG_LOG, "nodir = %d", no_dir);
#endif
dict_to->head.root = map[1];
dict_to->head.last = map[i];
void *old_p, *new_p;
dict_bf_readp (dict_from->dbf, i, &old_p);
- logf (LOG_LOG, "dict_bf_newp no=%d size=%d", map[i],
+ yaz_log(YLOG_LOG, "dict_bf_newp no=%d size=%d", map[i],
map[i+1] - map[i]);
dict_bf_newp (dict_to->dbf, map[i], &new_p, map[i+1] - map[i]);