39 for (p = str; *p && isspace(*(
unsigned char *)p); p++)
41 for (pe = p + strlen(p) - 1;
42 pe > p && strchr(rm_chars, *pe); pe--)
49 char *p = buf, *pout = buf;
52 while (*p && !isalnum(*(
unsigned char *)p))
54 while (isalnum(*(
unsigned char *)p))
55 *(pout++) = tolower(*(
unsigned char *)(p++));
58 while (*p && !isalnum(*(
unsigned char *)p))
65 while (pout > buf && *pout ==
' ');
82 while (*buf && !isdigit(*(
unsigned char *)buf))
85 for (e = buf; *e && isdigit(*(
unsigned char *)e); e++)
87 if ((len == 4 && !longdate) || (longdate && len >= 4 && len <= 8))
89 int value = atoi(buf);
90 if (longdate && len == 4)
92 if (*first < 0 || value < *first)
94 if (*last < 0 || value > *last)
char * normalize7bit_generic(char *str, const char *rm_chars)
removes leading whitespace.. Removes suffix cahrs in rm_chars
int extract7bit_dates(const char *buf, int *first, int *last, int longdate)
char * normalize7bit_mergekey(char *buf)