From: Martin Mares Date: Tue, 18 Jun 2002 17:37:53 +0000 (+0000) Subject: Introduced SKIP_TAGGED_CHAR. X-Git-Tag: holmes-import~1396 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=95e9dd4f86747dfacc24e990947717979f48cb17;p=libucw.git Introduced SKIP_TAGGED_CHAR. --- diff --git a/lib/index.h b/lib/index.h index 6579fc4d..3cc0d908 100644 --- a/lib/index.h +++ b/lib/index.h @@ -86,6 +86,17 @@ fp_hash(struct fingerprint *fp) p++; \ } while (0) +#define SKIP_TAGGED_CHAR(p) do { \ + if (*p >= 0x80 && *p < 0xc0) \ + { \ + uns u = *p++; \ + if (u >= 0xa0 && u < 0xb0 && *p >= 0x80 && *p < 0xc0) \ + p++; \ + } \ + else \ + UTF8_SKIP(p); \ +} while (0) + static inline uns bget_tagged_char(struct fastbuf *f) {