From: Dennis Schafroth Date: Mon, 21 May 2012 14:48:36 +0000 (+0000) Subject: Remove hard-coded right trim. Use icuchain instead X-Git-Tag: v1.6.13~1^2~4 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=9ca12b83de76e7b30b71e8b8c504deb21d8a09fd;p=pazpar2-moved-to-github.git Remove hard-coded right trim. Use icuchain instead --- diff --git a/src/termlists.c b/src/termlists.c index ea93130..54e5f67 100644 --- a/src/termlists.c +++ b/src/termlists.c @@ -112,16 +112,11 @@ void termlist_insert(struct termlist *tl, const char *display_term, { unsigned int bucket; struct termlist_bucket **p; - char buf[256], *cp; + char buf[256]; if (strlen(norm_term) > 255) return; strcpy(buf, norm_term); - /* chop right */ - /* - for (cp = buf + strlen(buf); cp != buf && strchr(",. -", cp[-1]); cp--) - cp[-1] = '\0'; - */ bucket = jenkins_hash((unsigned char *)buf) % tl->hash_size; for (p = &tl->hashtable[bucket]; *p; p = &(*p)->next) {