Previously we only stored letters/numbers. Now we store anything except
punctuation and spaces. Based on a patch from Jason Harris for pks.
end = word;
while (end != NULL && *end != 0) {
start = end;
- while (*start != 0 && !isalnum(*start)) {
+ while (*start != 0 && (ispunct(*start) || isspace (*start))) {
start++;
}
end = start;
- while (*end != 0 && isalnum(*end)) {
+ while (*end != 0 && (!ispunct(*end) && !isspace (*end))) {
*end = tolower(*end);
end++;
}