fastbuf ff-binary ff-string ff-printf ff-unicode \
fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \
char-cat char-upper char-lower unicode stkstring \
- wildmatch ctmatch regex \
+ wildmatch regex \
prime primetable random timer randomkey \
bit-ffs bit-fls \
db \
+++ /dev/null
-/*
- * UCW Library -- Content-Type Pattern Matching
- *
- * (c) 1997 Martin Mares <mj@ucw.cz>
- *
- * This software may be freely distributed and used according to the terms
- * of the GNU Lesser General Public License.
- */
-
-#include "ucw/lib.h"
-#include "ucw/chartype.h"
-
-int
-match_ct_patt(const char *p, const char *t)
-{
- if (*p == '*' && !p[1]) /* "*" matches everything */
- return 1;
-
- if (*p == '*' && p[1] == '/') /* "*" on the left-hand side */
- {
- while (*t && *t != ' ' && *t != ';' && *t != '/')
- t++;
- p += 2;
- }
- else /* Normal left-hand side */
- {
- while (*p != '/')
- if (Cupcase(*p++) != Cupcase(*t++))
- return 0;
- p++;
- }
- if (*t++ != '/')
- return 0;
-
- if (*p == '*' && !p[1]) /* "*" on the right-hand side */
- return 1;
- while (*p)
- if (Cupcase(*p++) != Cupcase(*t++))
- return 0;
- if (*t && *t != ' ' && *t != ';')
- return 0;
-
- return 1;
-}
void *xmalloc_zero(uns) LIKE_MALLOC;
char *xstrdup(const char *) LIKE_MALLOC;
-/* Content-Type pattern matching and filters */
-
-int match_ct_patt(const char *, const char *);
-
/* prime.c */
int isprime(uns x);