From: Adam Dickmeiss Date: Fri, 19 May 2006 23:45:28 +0000 (+0000) Subject: Remove local attribute handling and other dead code. X-Git-Tag: before.bug.529~109 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=e7cf9381a4b902cb2b91053f80ab7899b7d5bb00;ds=sidebyside Remove local attribute handling and other dead code. --- diff --git a/data1/d1_attset.c b/data1/d1_attset.c index 40e1b04..17963e9 100644 --- a/data1/d1_attset.c +++ b/data1/d1_attset.c @@ -1,4 +1,4 @@ -/* $Id: d1_attset.c,v 1.9 2006-05-19 13:49:33 adam Exp $ +/* $Id: d1_attset.c,v 1.10 2006-05-19 23:45:28 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -85,42 +85,24 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) int num; char *name; data1_att *t; - data1_local_attribute *locals; if (argc < 3) { yaz_log(YLOG_WARN, "%s:%d: Bad # of args to att", file, lineno); continue; } + if (argc > 3) + { + yaz_log(YLOG_WARN, "%s:%d: Local attributes not supported", + file, lineno); + } num = atoi (argv[1]); name = argv[2]; - if (argc == 3) /* no local attributes given */ - { - locals = (data1_local_attribute *) - nmem_malloc(mem, sizeof(*locals)); - locals->local = num; - locals->next = 0; - } - else /* parse the string "local{,local}" */ - { - char *p = argv[3]; - data1_local_attribute **ap = &locals; - do - { - *ap = (data1_local_attribute *) - nmem_malloc(mem, sizeof(**ap)); - (*ap)->local = atoi(p); - (*ap)->next = 0; - ap = &(*ap)->next; - } - while ((p = strchr(p, ',')) && *(++p)); - } t = *attp = (data1_att *)nmem_malloc(mem, sizeof(*t)); t->parent = res; t->name = nmem_strdup(mem, name); t->value = num; - t->locals = locals; t->next = 0; attp = &t->next; } diff --git a/include/idzebra/data1.h b/include/idzebra/data1.h index 4151727..58ac8ca 100644 --- a/include/idzebra/data1.h +++ b/include/idzebra/data1.h @@ -1,4 +1,4 @@ -/* $Id: data1.h,v 1.13 2006-05-19 13:49:34 adam Exp $ +/* $Id: data1.h,v 1.14 2006-05-19 23:45:29 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -52,12 +52,6 @@ YAZ_BEGIN_CDECL struct data1_attset; -typedef struct data1_local_attribute -{ - int local; - struct data1_local_attribute *next; -} data1_local_attribute; - typedef struct data1_attset data1_attset; typedef struct data1_att data1_att; typedef struct data1_attset_child data1_attset_child; @@ -67,7 +61,6 @@ struct data1_att data1_attset *parent; /* attribute set */ char *name; /* symbolic name of this attribute */ int value; /* attribute value */ - data1_local_attribute *locals; /* local index values */ data1_att *next; }; diff --git a/index/index.h b/index/index.h index f205d25..f795daf 100644 --- a/index/index.h +++ b/index/index.h @@ -1,4 +1,4 @@ -/* $Id: index.h,v 1.163 2006-05-19 23:20:24 adam Exp $ +/* $Id: index.h,v 1.164 2006-05-19 23:45:29 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -132,10 +132,6 @@ int strtab_src (struct strtab *t, const char *name, void ***infop); void strtab_del (struct strtab *t, void (*func)(const char *name, void *info, void *data), void *data); -int index_char_cvt (int c); -int index_word_prefix (char *string, int attset_ordinal, - int local_attribute, const char *databaseName); - void zebraIndexLockMsg (ZebraHandle zh, const char *str); void zebraIndexUnlock (ZebraHandle zh); @@ -149,8 +145,6 @@ void zebra_lock_prefix (Res res, char *dst); #define FNAME_ORG_LOCK "zebraorg.LCK" #define FNAME_TOUCH_TIME "zebraidx.time" -void zebra_load_atts (data1_handle dh, Res res); - int key_SU_decode (int *ch, const unsigned char *out); int key_SU_encode (int ch, char *out); @@ -363,14 +357,6 @@ int zebra_server_lock (ZebraService zh, int lockCommit); void zebra_server_unlock (ZebraService zh, int commitPhase); int zebra_server_lock_get_state (ZebraService zh, time_t *timep); -#if 1 -typedef struct attent -{ - int attset_ordinal; - data1_local_attribute *local_attributes; -} attent; -#endif - int zebra_record_fetch (ZebraHandle zh, SYSNO sysno, int score, zebra_snippets *hit_snippet, ODR stream, oid_value input_format, Z_RecordComposition *comp, diff --git a/tab/bib1.att b/tab/bib1.att index d90038f..5c8572f 100644 --- a/tab/bib1.att +++ b/tab/bib1.att @@ -1,4 +1,4 @@ -# $Id: bib1.att,v 1.1 2002-10-22 12:51:09 adam Exp $ +# $Id: bib1.att,v 1.2 2006-05-19 23:45:29 adam Exp $ # Bib-1 Attribute Set name bib1 reference Bib-1 @@ -82,7 +82,7 @@ att 1012 Date/time-last-modified att 1013 Authority/format-id att 1014 Concept-text att 1015 Concept-reference -att 1016 Any 1016,4,1005,62 +att 1016 Any att 1017 Server-choice att 1018 Publisher att 1019 Record-source