summaryrefslogtreecommitdiffstats
path: root/scripts2
diff options
context:
space:
mode:
Diffstat (limited to 'scripts2')
-rw-r--r--scripts2/Makefile.data1
-rw-r--r--scripts2/templates/pinyin_parser_table.h.in8
-rw-r--r--scripts2/templates/special_table.h.in16
3 files changed, 17 insertions, 8 deletions
diff --git a/scripts2/Makefile.data b/scripts2/Makefile.data
index edae4d1..c60f429 100644
--- a/scripts2/Makefile.data
+++ b/scripts2/Makefile.data
@@ -7,6 +7,7 @@ pinyins.txt:
update-header: pinyins.txt
python3 generateheader.py templates/pinyin_parser_table.h.in > ../src/storage/pinyin_parser_table.h
+ python3 generateheader.py templates/special_table.h.in > ../src/storage/special_table.h
python3 generateheader.py templates/double_pinyin_table.h.in > ../src/storage/double_pinyin_table.h
python3 generateheader.py templates/zhuyin_table.h.in > ../src/storage/zhuyin_table.h
python3 generateheader.py templates/chewing_enum.h.in > ../src/storage/chewing_enum.h
diff --git a/scripts2/templates/pinyin_parser_table.h.in b/scripts2/templates/pinyin_parser_table.h.in
index 9c48395..a244a55 100644
--- a/scripts2/templates/pinyin_parser_table.h.in
+++ b/scripts2/templates/pinyin_parser_table.h.in
@@ -31,14 +31,6 @@ const content_table_item_t content_table[] = {
@CONTENT_TABLE@
};
-const divided_table_item_t divided_table[] = {
-@DIVIDED_TABLE@
-};
-
-const resplit_table_item_t resplit_table[] = {
-@RESPLIT_TABLE@
-};
-
const gint chewing_key_table[CHEWING_NUMBER_OF_INITIALS *
CHEWING_NUMBER_OF_MIDDLES *
CHEWING_NUMBER_OF_FINALS] = {
diff --git a/scripts2/templates/special_table.h.in b/scripts2/templates/special_table.h.in
new file mode 100644
index 0000000..a273b62
--- /dev/null
+++ b/scripts2/templates/special_table.h.in
@@ -0,0 +1,16 @@
+#ifndef SPECIAL_TABLE_H
+#define SPECIAL_TABLE_H
+
+namespace pinyin{
+
+const divided_table_item_t divided_table[] = {
+@DIVIDED_TABLE@
+};
+
+const resplit_table_item_t resplit_table[] = {
+@RESPLIT_TABLE@
+};
+
+};
+
+#endif