Upstream update

epel9
Ding-Yi Chen 17 years ago
parent e2176d9403
commit 97a7d9f2c6

@ -1 +1 @@
libchewing-0.3.0.tar.gz
libchewing-0.3.0.901.tar.gz

@ -0,0 +1 @@
libchewing-0_3_0_901-0_fc9:HEAD:libchewing-0.3.0.901-0.fc9.src.rpm:1221612386

@ -1,19 +0,0 @@
diff -up libchewing-0.3.0/include/global.h.9-bz195416 libchewing-0.3.0/include/global.h
diff -up libchewing-0.3.0/src/chewingio.c.9-bz195416 libchewing-0.3.0/src/chewingio.c
--- libchewing-0.3.0/src/chewingio.c.9-bz195416 2008-04-24 14:56:45.000000000 +1000
+++ libchewing-0.3.0/src/chewingio.c 2008-04-24 16:31:32.000000000 +1000
@@ -255,13 +255,7 @@ CHEWING_API int chewing_Configure( Chewi
CHEWING_API void chewing_set_ChiEngMode( ChewingContext *ctx, int mode )
{
- ChewingData *pgdata = ctx->data;
-
- if ( pgdata->bFirstKey == 0 ) {
- pgdata->bChiSym = mode;
- pgdata->bCaseChange = ( mode == CHINESE_MODE ? 0 : 1 );
- pgdata->bFirstKey = 1;
- }
+ ctx->data->bChiSym = ( mode == CHINESE_MODE ? 1 : 0 );
}
CHEWING_API int chewing_get_ChiEngMode( ChewingContext *ctx )

@ -1,51 +0,0 @@
--- libchewing-0.3.0/src/hanyupinyin.c.1-bz199353 2006-05-15 16:49:43.000000000 +1000
+++ libchewing-0.3.0/src/hanyupinyin.c 2006-09-05 10:47:46.000000000 +1000
@@ -95,13 +95,15 @@
* zuinKeySeq[] has at most 3 letters.
*/
keymap key, *res;
- strcpy( key.pinyin, pinyinKeySeq );
+ strncpy( key.pinyin, pinyinKeySeq, 6 );
DEBUG_CHECKPOINT();
res = bsearch( &key, keytable, N_TOTAL, sizeof(keymap), compkey );
- if ( res != NULL )
+ if ( res != NULL ){
strcpy( zuinKeySeq, res->zuin );
+ return 0;
+ }
else
zuinKeySeq = strdup( "" );
- return 0;
+ return 1;
}
--- libchewing-0.3.0/src/zuin.c.1-bz199353 2006-05-15 16:49:43.000000000 +1000
+++ libchewing-0.3.0/src/zuin.c 2006-09-05 10:47:46.000000000 +1000
@@ -392,14 +392,16 @@
static int PinYinInput( ZuinData *pZuin, int key )
{
int err = 0, status, i;
- char zuinKeySeq[ 5 ], buf[ 2 ];
+ char zuinKeySeq[ 5 ];
DEBUG_CHECKPOINT();
if ( IsPinYinEndKey( pZuin, key ) ) {
err = HanyuPinYinToZuin( pZuin->pinYinData.keySeq, zuinKeySeq );
- if (err)
- return ZUIN_KEY_ERROR;
+ if (err){
+ pZuin->pinYinData.keySeq[0] = '\0';
+ return ZUIN_ABSORB;
+ }
DEBUG_OUT( "zuinKeySeq: %s\n", zuinKeySeq );
for ( i = 0; i < strlen( zuinKeySeq ); i++ ) {
@@ -420,6 +422,7 @@
pZuin->pinYinData.keySeq[ 0 ] = '\0';
return EndKeyProcess( pZuin, key, 1 );
}
+ char buf[2];
buf[ 0 ] = key; buf[ 1 ] = '\0';
strcat( pZuin->pinYinData.keySeq, buf );

@ -1,11 +0,0 @@
--- libchewing-0.3.0/src/chewingio.c.bz206232 2006-09-15 14:26:37.000000000 +1000
+++ libchewing-0.3.0/src/chewingio.c 2006-09-15 14:26:48.000000000 +1000
@@ -1206,7 +1206,7 @@
{
ChewingData *pgdata = ctx->data;
ChewingOutput *pgo = ctx->output;
- int rtn, key = ' ';
+ int rtn, key = '\0';
int keystrokeRtn = KEYSTROKE_ABSORB;
if ( ! pgdata->bSelect ) {

@ -1,11 +0,0 @@
--- libchewing-0.3.0/src/chewingio.c.3-bz209575 2006-11-03 15:04:48.000000000 +1000
+++ libchewing-0.3.0/src/chewingio.c 2006-11-03 15:06:15.000000000 +1000
@@ -176,6 +176,8 @@
pgdata->PointStart = -1;
pgdata->PointEnd = 0;
pgdata->phrOut.nNumCut = 0;
+ CleanAllBuf( pgdata );
+
return 0;
}

@ -1,58 +0,0 @@
--- libchewing-0.3.0/src/chewingio.c.4-bz216377 2006-11-21 15:45:08.000000000 +1000
+++ libchewing-0.3.0/src/chewingio.c 2006-11-21 15:45:08.000000000 +1000
@@ -860,6 +860,44 @@
return 0;
}
+CHEWING_API int chewing_handle_PageUp( ChewingContext *ctx )
+{
+ ChewingData *pgdata = ctx->data;
+ ChewingOutput *pgo = ctx->output;
+ int keystrokeRtn = KEYSTROKE_ABSORB;
+
+ CheckAndResetRange( pgdata );
+
+ if ( ! ChewingIsEntering( pgdata ) ) {
+ keystrokeRtn = KEYSTROKE_IGNORE;
+ }
+ else if ( ! pgdata->bSelect ) {
+ pgdata->chiSymbolCursor = pgdata->chiSymbolBufLen;
+ pgdata->cursor = pgdata->nPhoneSeq;
+ }
+ MakeOutputWithRtn( pgo, pgdata, keystrokeRtn );
+ return 0;
+}
+
+CHEWING_API int chewing_handle_PageDown( ChewingContext *ctx )
+{
+ ChewingData *pgdata = ctx->data;
+ ChewingOutput *pgo = ctx->output;
+ int keystrokeRtn = KEYSTROKE_ABSORB;
+
+ CheckAndResetRange( pgdata );
+
+ if ( ! ChewingIsEntering( pgdata ) ) {
+ keystrokeRtn = KEYSTROKE_IGNORE;
+ }
+ else if ( ! pgdata->bSelect ) {
+ pgdata->chiSymbolCursor = pgdata->chiSymbolBufLen;
+ pgdata->cursor = pgdata->nPhoneSeq;
+ }
+ MakeOutputWithRtn( pgo, pgdata, keystrokeRtn );
+ return 0;
+}
+
/* Dvorak <-> Qwerty keyboard layout converter */
static int dvorak_convert( int key )
{
--- libchewing-0.3.0/include/chewingio.h.4-bz216377 2006-11-21 15:45:46.000000000 +1000
+++ libchewing-0.3.0/include/chewingio.h 2006-11-21 15:45:03.000000000 +1000
@@ -37,6 +37,8 @@
CHEWING_API int chewing_handle_Up( ChewingContext * );
CHEWING_API int chewing_handle_Home( ChewingContext * );
CHEWING_API int chewing_handle_End( ChewingContext * );
+CHEWING_API int chewing_handle_PageUp( ChewingContext * );
+CHEWING_API int chewing_handle_PageDown( ChewingContext * );
CHEWING_API int chewing_handle_Down( ChewingContext * );
CHEWING_API int chewing_handle_Capslock( ChewingContext * );
CHEWING_API int chewing_handle_Default( ChewingContext *, int key );

@ -1,11 +0,0 @@
--- libchewing-0.3.0/src/choice.c.bz231568 2007-03-09 12:04:33.000000000 +1000
+++ libchewing-0.3.0/src/choice.c 2007-03-09 12:05:30.000000000 +1000
@@ -141,6 +141,8 @@
UserPhraseData *pUserPhraseData;
uint16 userPhoneSeq[ MAX_PHONE_SEQ_LEN ];
+ memset( pci->totalChoiceStr, '\0', sizeof(char) * MAX_CHOICE * MAX_PHRASE_LEN * MAX_UTF8_SIZE + 1);
+
pci->nTotalChoice = 0;
len = pai->avail[ pai->currentAvail ].len;

@ -1,30 +0,0 @@
--- libchewing-0.3.0/src/chewingio.c.orig 2007-04-20 17:05:06.000000000 +1000
+++ libchewing-0.3.0/src/chewingio.c 2007-04-20 17:01:46.000000000 +1000
@@ -567,7 +567,9 @@
{
ChewingData *pgdata = ctx->data;
ChewingOutput *pgo = ctx->output;
- int keystrokeRtn = KEYSTROKE_ABSORB;
+ int toSelect = 0;
+ int keystrokeRtn = KEYSTROKE_ABSORB;
+ int key_buf_cursor;
CheckAndResetRange( pgdata );
@@ -575,8 +577,14 @@
keystrokeRtn = KEYSTROKE_IGNORE;
}
- if ( pgdata->bSelect )
- ChoicePrevAvail( pgdata );
+ key_buf_cursor = pgdata->chiSymbolCursor;
+ if ( pgdata->chiSymbolCursor == pgdata->chiSymbolBufLen )
+ key_buf_cursor--;
+
+ if ( ! pgdata->symbolKeyBuf[ key_buf_cursor ] ) {
+ /* Close Symbol Choice List */
+ chewing_handle_Esc(ctx);
+ }
MakeOutputWithRtn( pgo, pgdata, keystrokeRtn );
return 0;

@ -1,20 +0,0 @@
--- libchewing-0.3.0/src/chewingutil.c.orig 2007-05-30 18:06:40.000000000 +1000
+++ libchewing-0.3.0/src/chewingutil.c 2007-05-30 18:07:20.000000000 +1000
@@ -133,7 +133,7 @@ int HaninSymbolInput(
pai->avail[ 0 ].id = -1;
pai->nAvail = 1;
pai->currentAvail = 0;
- pci->nChoicePerPage = (selectAreaLen - 5) / ( 2 + 3) ;
+ pci->nChoicePerPage = selectAreaLen ;
if ( pci->nChoicePerPage > MAX_SELKEY ) {
pci->nChoicePerPage = MAX_SELKEY;
}
@@ -982,7 +982,7 @@ int OpenSymbolChoice( ChewingData *pgdat
pci->nTotalChoice++;
}
- pci->nChoicePerPage = (pgdata->config.selectAreaLen - 5) / ( 2 + 3) ;
+ pci->nChoicePerPage = pgdata->config.selectAreaLen ;
if ( pci->nChoicePerPage > MAX_SELKEY )
pci->nChoicePerPage = MAX_SELKEY ;
pci->nPage = CEIL_DIV( pci->nTotalChoice, pci->nChoicePerPage );

@ -1,81 +0,0 @@
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 );

@ -1,23 +1,23 @@
Name: libchewing
Version: 0.3.0
Release: 12%{?dist}
Summary: Intelligent phonetic input method library for Traditional Chinese
Group: System Environment/Libraries
License: LGPLv2+
URL: http://chewing.csie.net/
Source: http://chewing.csie.net/download/libchewing/%{name}-%{version}.tar.gz
Patch0: libchewing-0.3.0-3.bz199353.patch
Patch1: libchewing-0.3.0-4.bz206232.patch
Patch2: libchewing-0.3.0-5.bz216581a.patch
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
Patch8: libchewing-0.3.0-11.bz195416.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Name: libchewing
Version: 0.3.0.901
Release: 0%{?dist}
Summary: Intelligent phonetic input method library for Traditional Chinese
Group: System Environment/Libraries
License: LGPLv2+
URL: http://chewing.csie.net/
Source: http://chewing.csie.net/download/rc/libchewing/%{name}-%{version}.tar.gz
#Patch0: libchewing-0.3.0-3.bz199353.patch
#Patch1: libchewing-0.3.0-4.bz206232.patch
#Patch2: libchewing-0.3.0-5.bz216581a.patch
#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
#Patch8: libchewing-0.3.0-11.bz195416.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
libchewing is an intelligent phonetic input method library for Chinese.
@ -28,24 +28,25 @@ input method that is useful for inputting Mandarin Chinese.
%package -n %{name}-devel
Summary: Development files for libchewing
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, pkgconfig
Summary: Development files for libchewing
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, pkgconfig
%description -n %{name}-devel
Headers and other files needed to develop applications using the %name library.
Headers and other files needed to develop applications using the %name
library.
%prep
%setup -q
%patch0 -p1 -b .1-bz199353
%patch1 -p1 -b .2-bz206232
%patch2 -p1 -b .3-bz216581a
%patch3 -p1 -b .4-bz216581b
%patch4 -p1 -b .5-bz231568
%patch5 -p1 -b .6-bz237233
%patch6 -p1 -b .7-bz237916
%patch7 -p1 -b .8-bz200694
%patch8 -p1 -b .9-bz195416
#%patch0 -p1 -b .1-bz199353
#%patch1 -p1 -b .2-bz206232
#%patch2 -p1 -b .3-bz216581a
#%patch3 -p1 -b .4-bz216581b
#%patch4 -p1 -b .5-bz231568
#%patch5 -p1 -b .6-bz237233
#%patch6 -p1 -b .7-bz237916
#%patch7 -p1 -b .8-bz200694
#%patch8 -p1 -b .9-bz195416
%build
%configure --disable-static
@ -79,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.so
%changelog
* Wed Sep 17 2008 Ding-Yi Chen <dchen at redhat dot com> - 0.3.0.901-0
- Upstream update.
* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.3.0-12
- fix license tag

@ -1 +1 @@
d60bdc2b3f81b70963cd01a93049a8e3 libchewing-0.3.0.tar.gz
29612220ef1fd00a325a89f6162934ce libchewing-0.3.0.901.tar.gz

Loading…
Cancel
Save