]> mj.ucw.cz Git - libucw.git/commitdiff
Introduced SKIP_TAGGED_CHAR.
authorMartin Mares <mj@ucw.cz>
Tue, 18 Jun 2002 17:37:53 +0000 (17:37 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 18 Jun 2002 17:37:53 +0000 (17:37 +0000)
lib/index.h

index 6579fc4d09aec556531726687a2ef1a3715272f0..3cc0d908d232296948d2114e01d2cfc2dff6a062 100644 (file)
@@ -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)
 {