]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fts: Moved IS_APOSTROPHE() to fts-common.h
authorTimo Sirainen <tss@iki.fi>
Tue, 2 Jun 2015 21:39:11 +0000 (00:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 2 Jun 2015 21:39:11 +0000 (00:39 +0300)
src/lib-fts/Makefile.am
src/lib-fts/fts-common.h [new file with mode: 0644]
src/lib-fts/fts-tokenizer-generic.c

index 67f528282c2d3ba5de3b62b1e7aa449e3edc3a45..0b0fc5d2af9a32af331ba504c7f4d6e3561ff936 100644 (file)
@@ -73,6 +73,7 @@ libfts_la_SOURCES = \
        $(ICU_SOURCES)
 
 noinst_HEADERS = \
+       fts-common.h \
        fts-filter.h \
        fts-filter-private.h \
        fts-icu.h \
diff --git a/src/lib-fts/fts-common.h b/src/lib-fts/fts-common.h
new file mode 100644 (file)
index 0000000..1cfd9bc
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef FTS_COMMON_H
+#define FTS_COMMON_H
+
+#define IS_NONASCII_APOSTROPHE(c) \
+       ((c) == 0x2019 || (c) == 0xFF07)
+#define IS_APOSTROPHE(c) \
+       ((c) == 0x0027 || IS_NONASCII_APOSTROPHE(c))
+
+#endif
index 1d9e46bd20211e6d4d90a8a3ca143300e489b269..68e8aba6534b8bbbc4bb857d5f6040ff9fd82f41 100644 (file)
@@ -4,6 +4,7 @@
 #include "buffer.h"
 #include "unichar.h"
 #include "bsearch-insert-pos.h"
+#include "fts-common.h"
 #include "fts-tokenizer-private.h"
 #include "fts-tokenizer-generic-private.h"
 #include "word-boundary-data.c"
 
 #define FTS_DEFAULT_TOKEN_MAX_LENGTH 30
 
-#define IS_NONASCII_APOSTROPHE(c) \
-       ((c) == 0x2019 || (c) == 0xFF07)
-#define IS_APOSTROPHE(c) \
-       ((c) == 0x0027 || IS_NONASCII_APOSTROPHE(c))
-
 static unsigned char fts_ascii_word_breaks[128] = {
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0-15 */
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 16-31 */