Deleted Added
full compact
284a285,298
> static int collate_range_cmp(int a, int b)
> {
> int r;
> static char s[2][2];
>
> if ((uschar)a == (uschar)b)
> return 0;
> s[0][0] = a;
> s[1][0] = b;
> if ((r = strcoll(s[0], s[1])) == 0)
> r = (uschar)a - (uschar)b;
> return r;
> }
>
287a302
> int j;
306c321
< if (c > c2) { /* empty; ignore */
---
> if (collate_range_cmp(c, c2) > 0) { /* empty; ignore */
311c326,329
< while (c < c2) {
---
> for (j = 0; j < NCHARS; j++) {
> if ((collate_range_cmp(c, j) > 0) ||
> collate_range_cmp(j, c2) > 0)
> continue;
314c332
< *bp++ = ++c;
---
> *bp++ = j;
697a716,731
>
> /* Because isblank doesn't show up in any of the header files on any
> * system i use, it's defined here. if some other locale has a richer
> * definition of "blank", define HAS_ISBLANK and provide your own
> * version.
> */
>
> #ifndef HAS_ISBLANK
>
> int isblank(int c)
> {
> return c==' ' || c=='\t';
> }
>
> #endif
>
701c735
< const char *cc_expand;
---
> int (*cc_func)(int);
703,714c737,748
< { "alnum", 5, "0-9A-Za-z" },
< { "alpha", 5, "A-Za-z" },
< { "blank", 5, " \t" },
< { "cntrl", 5, "\000-\037\177" },
< { "digit", 5, "0-9" },
< { "graph", 5, "\041-\176" },
< { "lower", 5, "a-z" },
< { "print", 5, " \041-\176" },
< { "punct", 5, "\041-\057\072-\100\133-\140\173-\176" },
< { "space", 5, " \f\n\r\t\v" },
< { "upper", 5, "A-Z" },
< { "xdigit", 6, "0-9A-Fa-f" },
---
> { "alnum", 5, isalnum },
> { "alpha", 5, isalpha },
> { "blank", 5, isblank },
> { "cntrl", 5, iscntrl },
> { "digit", 5, isdigit },
> { "graph", 5, isgraph },
> { "lower", 5, islower },
> { "print", 5, isprint },
> { "punct", 5, ispunct },
> { "space", 5, isspace },
> { "upper", 5, isupper },
> { "xdigit", 6, isxdigit },
727c761
< const uschar *p;
---
> int i;
776,777c810,817
< for (p = (const uschar *) cc->cc_expand; *p; p++)
< *bp++ = *p;
---
> for (i = 0; i < NCHARS; i++) {
> if (!adjbuf((char **) &buf, &bufsz, bp-buf+1, 100, (char **) &bp, 0))
> FATAL("out of space for reg expr %.10s...", lastre);
> if (cc->cc_func(i)) {
> *bp++ = i;
> n++;
> }
> }