diff --git a/libchewing-0.3.0-9.bz200694.patch b/libchewing-0.3.0-9.bz200694.patch new file mode 100644 index 0000000..e7166d2 --- /dev/null +++ b/libchewing-0.3.0-9.bz200694.patch @@ -0,0 +1,81 @@ +diff -up libchewing-0.3.0/src/chewingio.c.8-bz220694 libchewing/trunk/src/chewingio.c +--- libchewing-0.3.0/src/chewingio.c.8-bz220694 2008-01-03 07:49:12.000000000 +1000 ++++ libchewing-0.3.0/src/chewingio.c 2008-01-03 07:49:12.000000000 +1000 +@@ -187,6 +187,11 @@ CHEWING_API int chewing_set_KBType( Chew + return 0; + } + ++CHEWING_API int chewing_get_KBType( ChewingContext *ctx ) ++{ ++ return ctx->data->zuinData.kbtype; ++} ++ + CHEWING_API void chewing_Terminate() + { + int i; +diff -up libchewing-0.3.0/src/porting_layer/src/plat_mmap_posix.c.8-bz220694 libchewing/trunk/src/porting_layer/src/plat_mmap_posix.c +--- libchewing-0.3.0/src/porting_layer/src/plat_mmap_posix.c.8-bz220694 2008-01-03 07:49:52.000000000 +1000 ++++ libchewing-0.3.0/src/porting_layer/src/plat_mmap_posix.c 2008-01-03 07:50:07.000000000 +1000 +@@ -48,7 +48,7 @@ size_t plat_mmap_create( plat_mmap *hand + if ( FLAG_ATTRIBUTE_READ & fileAccessAttr ) + handle->fd = open( file, O_RDONLY ); + else +- handle->fd = open( file, O_RDWR | O_CREAT ); ++ handle->fd = open( file, O_RDWR ); + + if ( handle->fd == -1 ) + return 0; +diff -up libchewing-0.3.0/include/global.h.8-bz220694 libchewing/trunk/include/global.h +--- libchewing-0.3.0/include/global.h.8-bz220694 2006-05-15 16:49:41.000000000 +1000 ++++ libchewing-0.3.0/include/global.h 2008-01-03 07:49:12.000000000 +1000 +@@ -32,6 +32,18 @@ + #define FULLSHAPE_MODE 1 + #define HALFSHAPE_MODE 0 + ++#define DEFAULT_KBTYPE 0 ++#define HSU_KBTYPE 1 ++#define IBM_KBTYPE 2 ++#define GINYIEH_KBTYPE 3 ++#define ETEN_KBTYPE 4 ++#define ETEN26_KBTYPE 5 ++#define DVORAK_KBTYPE 6 ++#define DVORAKHSU_KBTYPE 7 ++#define HANYU_KBTYPE 8 ++#define FIRST_KBTYPE DEFAULT_KBTYPE ++#define LAST_KBTYPE HANYU_KBTYPE ++ + #define MAX_KBTYPE 10 + #define MAX_SELKEY 10 + #define WCH_SIZE 4 +diff -up libchewing-0.3.0/include/chewingio.h.8-bz220694 libchewing/trunk/include/chewingio.h +--- libchewing-0.3.0/include/chewingio.h.8-bz220694 2008-01-03 07:49:12.000000000 +1000 ++++ libchewing-0.3.0/include/chewingio.h 2008-01-03 07:49:12.000000000 +1000 +@@ -99,6 +99,14 @@ CHEWING_API int chewing_Reset( ChewingCo + CHEWING_API int chewing_set_KBType( ChewingContext *ctx, int kbtype ); + + /** ++ * @breif Set keyboard type ++ * ++ * @param ctx ++ * @return If successed then return 0 ++ */ ++CHEWING_API int chewing_get_KBType( ChewingContext *ctx ); ++ ++/** + * @brief Terminate chewing + * + * Terminate the I/O routines for chewing. +@@ -114,11 +122,11 @@ CHEWING_API void chewing_Terminate(); + CHEWING_API void chewing_set_ChiEngMode( ChewingContext *ctx, int mode ); + + /** +- * @brief Get chewing's current mode ++ * @brief Get chewing's current keyboard type + * + * @param ctx + * +- * @return CHINESE_MODE or ENGLISH_MODE ++ * @return DEFAULT_KBTYPE or HANYU_KBTYPE + */ + CHEWING_API int chewing_get_ChiEngMode( ChewingContext *ctx ); + diff --git a/libchewing.spec b/libchewing.spec index 0121453..278dcd9 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -1,6 +1,6 @@ Name: libchewing Version: 0.3.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Group: System Environment/Libraries @@ -14,6 +14,7 @@ Patch3: libchewing-0.3.0-5.bz216581b.patch Patch4: libchewing-0.3.0-6.bz231568.patch Patch5: libchewing-0.3.0-7.bz237233.patch Patch6: libchewing-0.3.0-8.bz237916.patch +Patch7: libchewing-0.3.0-9.bz200694.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -42,6 +43,7 @@ Headers and other files needed to develop applications using the %name library. %patch4 -p1 -b .5-bz231568 %patch5 -p1 -b .6-bz237233 %patch6 -p1 -b .7-bz237916 +%patch7 -p1 -b .8-bz200694 %build %configure --disable-static @@ -75,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Tue Jan 08 2008 Caius Chance - 0.3.0-9.devel +- Resolves: rhbz#200694 (Moving "Han-Yin" <-> Zhu-Yin" option to AUX UI.) + * Fri Jun 01 2007 Caius Chance - 0.3.0-8.devel - Fixed bz#237916: [chewing] Candidate list (symbol) page change inaccracy.