+ if (skip_article)
+ {
+ const char *p = buf;
+ char firstword[64];
+ char *pout = firstword;
+ char articles[] = "the den der die des an a "; // must end in space
+
+ while (*p && !isalnum(*(unsigned char *)p))
+ p++;
+ for (; *p && *p != ' ' && pout - firstword < (sizeof(firstword)-2); p++)
+ *pout++ = tolower(*(unsigned char *)p);
+ *pout++ = ' ';
+ *pout++ = '\0';
+ if (strstr(articles, firstword))
+ buf = p;
+ }
+