dovecot-2.2: lib-fts: Moved IS_APOSTROPHE() to fts-common.h
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 2 22:07:10 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/a13ce2bce9cd
changeset: 18812:a13ce2bce9cd
user: Timo Sirainen <tss at iki.fi>
date: Wed Jun 03 00:39:11 2015 +0300
description:
lib-fts: Moved IS_APOSTROPHE() to fts-common.h
diffstat:
src/lib-fts/Makefile.am | 1 +
src/lib-fts/fts-common.h | 9 +++++++++
src/lib-fts/fts-tokenizer-generic.c | 6 +-----
3 files changed, 11 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r 8c5fce2ff6f8 -r a13ce2bce9cd src/lib-fts/Makefile.am
--- a/src/lib-fts/Makefile.am Tue Jun 02 23:46:28 2015 +0300
+++ b/src/lib-fts/Makefile.am Wed Jun 03 00:39:11 2015 +0300
@@ -73,6 +73,7 @@
$(ICU_SOURCES)
noinst_HEADERS = \
+ fts-common.h \
fts-filter.h \
fts-filter-private.h \
fts-icu.h \
diff -r 8c5fce2ff6f8 -r a13ce2bce9cd src/lib-fts/fts-common.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lib-fts/fts-common.h Wed Jun 03 00:39:11 2015 +0300
@@ -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
diff -r 8c5fce2ff6f8 -r a13ce2bce9cd src/lib-fts/fts-tokenizer-generic.c
--- a/src/lib-fts/fts-tokenizer-generic.c Tue Jun 02 23:46:28 2015 +0300
+++ b/src/lib-fts/fts-tokenizer-generic.c Wed Jun 03 00:39:11 2015 +0300
@@ -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"
@@ -11,11 +12,6 @@
#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 */
More information about the dovecot-cvs
mailing list