From: Adam Dickmeiss Date: Mon, 3 Dec 2007 16:54:49 +0000 (+0000) Subject: Removed unused source symtab.c. X-Git-Tag: ZEBRA.2.0.20~38 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=783dcac27963455215ae4b22864564943f088baa Removed unused source symtab.c. --- diff --git a/index/Makefile.am b/index/Makefile.am index a75caac..7a218e6 100644 --- a/index/Makefile.am +++ b/index/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.67 2007-12-03 13:04:04 adam Exp $ +## $Id: Makefile.am,v 1.68 2007-12-03 16:54:49 adam Exp $ aux_libs = \ ../rset/libidzebra-rset.la \ @@ -95,7 +95,7 @@ libidzebra_2_0_la_SOURCES = \ rank.h rank1.c ranksimilarity.c rankstatic.c \ records.c recindex.c recindex.h reckeys.c reckeys.h \ retrieve.c \ - rpnscan.c rpnsearch.c rpnfacet.c sortidx.c symtab.c stream.c \ + rpnscan.c rpnsearch.c rpnfacet.c sortidx.c stream.c \ update_path.c update_file.c trunc.c untrans.c isam_methods.c \ zaptterm.c zebraapi.c zinfo.c zinfo.h zsets.c key_block.c key_block.h \ check_res.c rset_isam.c diff --git a/index/symtab.c b/index/symtab.c deleted file mode 100644 index bfe6964..0000000 --- a/index/symtab.c +++ /dev/null @@ -1,98 +0,0 @@ -/* $Id: symtab.c,v 1.13 2007-01-15 15:10:17 adam Exp $ - Copyright (C) 1995-2007 - 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 -#include -#include -#include -#include - -struct strentry { - char *name; - void *info; - struct strentry *next; -}; - -#define STR_HASH 401 - -struct strtab { - struct strentry *ar[STR_HASH]; -}; - -struct strtab *strtab_mk (void) -{ - int i; - struct strtab *p = (struct strtab *) xmalloc (sizeof (*p)); - for (i=0; iar[i] = NULL; - return p; -} - -int strtab_src (struct strtab *t, const char *name, void ***infop) -{ - unsigned hash = 0; - int i; - struct strentry *e; - - for (i=0; name[i]; i++) - hash += hash*65519 + name[i]; - hash = hash % STR_HASH; - for (e = t->ar[hash]; e; e = e->next) - if (!strcmp(e->name, name)) - { - *infop = &e->info; - return 1; - } - e = (struct strentry *) xmalloc (sizeof(*e)); - e->name = (char *) xmalloc (strlen(name)+1); - strcpy (e->name, name); - e->next = t->ar[hash]; - t->ar[hash] = e; - *infop = &e->info; - return 0; -} - -void strtab_del (struct strtab *t, - void (*func)(const char *name, void *info, void *data), - void *data) -{ - int i; - struct strentry *e, *e1; - - for (i = 0; iar[i]; e; e = e1) - { - e1 = e->next; - (*func)(e->name, e->info, data); - xfree (e->name); - xfree (e); - } - xfree (t); -} -/* - * Local variables: - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * vim: shiftwidth=4 tabstop=8 expandtab - */ - diff --git a/win/makefile b/win/makefile index cf61eaa..d60493a 100644 --- a/win/makefile +++ b/win/makefile @@ -1,5 +1,5 @@ # Zebra makefile for MS NMAKE -# $Id: makefile,v 1.69 2007-12-03 13:04:04 adam Exp $ +# $Id: makefile,v 1.70 2007-12-03 16:54:49 adam Exp $ ########################################################### ############### Parameters @@ -423,7 +423,6 @@ ZEBRALIB_OBJS= \ $(OBJDIR)\states.obj \ $(OBJDIR)\stream.obj \ $(OBJDIR)\su_codec.obj \ - $(OBJDIR)\symtab.obj \ $(OBJDIR)\trunc.obj \ $(OBJDIR)\untrans.obj \ $(OBJDIR)\update_path.obj \