Fix printf
[idzebra-moved-to-github.git] / isamc / isamd.c
index 46b22ba..21d90a9 100644 (file)
@@ -1,15 +1,26 @@
-/*
- * Copyright (c) 1995-1998, Index Data.
- * See the file LICENSE for details.
- * $Id: isamd.c,v 1.22 2002-07-12 18:12:21 heikki Exp $ 
- *
- * Isamd - isam with diffs 
- * Programmed by: Heikki Levanto
- *
- * Todo
- *  - Statistics are missing and/or completely wrong
- *  - Lots of code stolen from isamc, not all needed any more
- */
+/* $Id: isamd.c,v 1.25 2003-03-05 16:41:10 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 <stdlib.h>
@@ -590,10 +601,6 @@ ISAMD_PP isamd_pp_open (ISAMD is, const char *dictbuf, int dictlen)
     char *src;
     int sz = is->method->filecat[is->max_cat].bsize;
                  /* always allocate for the largest blocks, saves trouble */
-    struct it_key singlekey;
-    char *c_ptr; /* for fake encoding the singlekey */
-    char *i_ptr;
-    int ofs;
     int dictnum;
     
     pp->numKeys = 0;
@@ -609,7 +616,7 @@ ISAMD_PP isamd_pp_open (ISAMD is, const char *dictbuf, int dictlen)
     pp->diffinfo=0;
     pp->decodeClientData = (*is->method->code_start)(ISAMD_DECODE);
     
-    dictnum=*dictbuf;  // numkeys for internals, 0 for externals
+    dictnum=*dictbuf;  /* numkeys for internals, 0 for externals */
 
     if (0==dictnum)
     {
@@ -787,6 +794,8 @@ int isamd_pp_num (ISAMD_PP pp)
     return pp->numKeys;
 }
 
+#if 0
+/* for testing .. */
 static char *hexdump(unsigned char *p, int len, char *buff) {
   static char localbuff[128];
   char bytebuff[8];
@@ -800,7 +809,7 @@ static char *hexdump(unsigned char *p, int len, char *buff) {
   }
   return buff;
 }
-
+#endif
 
 #ifdef SKIPTHIS
   /* needs different arguments, or something */
@@ -870,7 +879,16 @@ void isamd_pp_dump (ISAMD is, ISAMD_P ipos)
 
 /*
  * $Log: isamd.c,v $
- * Revision 1.22  2002-07-12 18:12:21  heikki
+ * Revision 1.25  2003-03-05 16:41:10  adam
+ * Fix GCC warnings
+ *
+ * Revision 1.24  2002/11/26 22:18:34  adam
+ * Remove // comments
+ *
+ * Revision 1.23  2002/08/02 19:26:56  adam
+ * Towards GPL
+ *
+ * Revision 1.22  2002/07/12 18:12:21  heikki
  * Isam-D now stores small entries directly in the dictionary.
  * Needs more tuning and cleaning...
  *