From 7cd34c7db28627f5eabab94059e56965e3bf8727 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 21 Nov 2011 14:42:38 +0800 Subject: begin to write gen double pinyin header --- scripts/double_pinyin_table.h.in | 56 ++++++++++++++++++++++++++++++++++++++++ scripts/gendoublepinyinheader.py | 23 +++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 scripts/gendoublepinyinheader.py (limited to 'scripts') diff --git a/scripts/double_pinyin_table.h.in b/scripts/double_pinyin_table.h.in index e2f3fff..7ad1abc 100644 --- a/scripts/double_pinyin_table.h.in +++ b/scripts/double_pinyin_table.h.in @@ -1,3 +1,59 @@ /* This file is generated by python scripts. Don't edit this file directly. */ +#ifndef DOUBLE_PINYIN_TABLE_H +#define DOUBLE_PINYIN_TABLE_H + +namespace pinyin{ + +const double_pinyin_scheme_shengmu_item_t double_pinyin_mspy_sheng[] = { +@MSPY_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_mspy_yun[] = { +@MSPY_YUN@ +}; + +const double_pinyin_scheme_shengmu_item_t double_pinyin_zrm_sheng[] = { +@ZRM_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_zrm_yun[] = { +@ZRM_YUN@ +}; + +const double_pinyin_scheme_shengmu_item_t double_pinyin_abc_sheng[] = { +@ABC_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_abc_yun[] = { +@ABC_YUN@ +}; + +const double_pinyin_scheme_shengmu_item_t double_pinyin_zgpy_sheng[] = { +@ZGPY_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_zgpy_yun[] = { +@ZGPY_YUN@ +}; + +const double_pinyin_scheme_shengmu_item_t double_pinyin_pyjj_sheng[] = { +@PYJJ_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_pyjj_yun[] = { +@PYJJ_YUN@ +}; + +const double_pinyin_scheme_shengmu_item_t double_pinyin_xhe_sheng[] = { +@XHE_SHENG@ +}; + +const double_pinyin_scheme_yunmu_item_t double_pinyin_xhe_yun[] = { +@XHE_YUN@ +}; + +}; + +#endif diff --git a/scripts/gendoublepinyinheader.py b/scripts/gendoublepinyinheader.py new file mode 100644 index 0000000..61fb249 --- /dev/null +++ b/scripts/gendoublepinyinheader.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# vim:set et sts=4 sw=4: +# +# libpinyin - Library to deal with pinyin. +# +# Copyright (C) 2011 Peng Wu +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +import pinyin -- cgit