Remove hard-coded right trim. Use icuchain instead
authorDennis Schafroth <dennis@indexdata.com>
Mon, 21 May 2012 14:48:36 +0000 (14:48 +0000)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 21 May 2012 14:48:36 +0000 (14:48 +0000)
src/termlists.c

index ea93130..54e5f67 100644 (file)
@@ -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)
     {