X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Fnormalize7bit.c;h=cfa59bbc95fb63e79a3ec83cbffffdf352cdfd7e;hb=572de728d257c3d2e6b11d0f60713c81b004c406;hp=1f993c9af5a5c4251c8e97221308d051db8798a2;hpb=9267d02c3601122f74bdf3a9d21f30080a4a1a9a;p=pazpar2-moved-to-github.git diff --git a/src/normalize7bit.c b/src/normalize7bit.c index 1f993c9..cfa59bb 100644 --- a/src/normalize7bit.c +++ b/src/normalize7bit.c @@ -44,29 +44,9 @@ char * normalize7bit_generic(char * str, const char * rm_chars) return p; } - - -char * normalize7bit_mergekey(char *buf, int skiparticle) +char *normalize7bit_mergekey(char *buf) { char *p = buf, *pout = buf; - - if (skiparticle) - { - char firstword[64]; - char articles[] = "the den der die des an a "; // must end in space - - while (*p && !isalnum(*(unsigned char *)p)) - p++; - pout = firstword; - while (*p && *p != ' ' && pout - firstword < 62) - *(pout++) = tolower(*(unsigned char *)(p++)); - *(pout++) = ' '; - *(pout++) = '\0'; - if (!strstr(articles, firstword)) - p = buf; - pout = buf; - } - while (*p) { while (*p && !isalnum(*(unsigned char *)p))