diff --git a/.gitignore b/.gitignore index a205990..f896bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libchewing-0.3.2.tar.bz2 /libchewing-0.3.2.tar.bz2 +/libchewing-0.3.3.tar.bz2 diff --git a/libchewing-0.3.2.align.patch b/libchewing-0.3.2.align.patch deleted file mode 100644 index ba10008..0000000 --- a/libchewing-0.3.2.align.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./include/internal/chewing-private.h.align ./include/internal/chewing-private.h ---- ./include/internal/chewing-private.h.align 2008-12-02 00:29:20.000000000 +1000 -+++ ./include/internal/chewing-private.h 2010-09-02 17:14:12.565544961 +1000 -@@ -37,6 +37,7 @@ - typedef union { - unsigned char s[ MAX_UTF8_SIZE + 1]; - wchar_t wch; -+ unsigned char padding[8]; /* Ensure this structure is aligned */ - } wch_t; - - typedef struct { diff --git a/libchewing-0.3.2.bz477690.patch b/libchewing-0.3.2.bz477690.patch deleted file mode 100644 index f29507f..0000000 --- a/libchewing-0.3.2.bz477690.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up ./data/Makefile.am.bz477690 ./data/Makefile.am ---- ./data/Makefile.am.bz477690 2008-12-02 00:29:20.000000000 +1000 -+++ ./data/Makefile.am 2009-05-20 14:24:31.000000000 +1000 -@@ -9,8 +9,11 @@ datas = \ - us_freq.dat \ - dict.dat \ - ph_index.dat \ -- fonetree.dat \ - $(chindexs) -+ -+datas_lib = \ -+ fonetree.dat -+ - generated_header = $(top_builddir)/src/chewing-definition.h - - all: checkdata_stamp gendata_stamp -@@ -37,4 +40,8 @@ install-data-local: $(datas) pinyin.tab - $(mkinstalldirs) $(DESTDIR)/$(datadir)/chewing - $(INSTALL_DATA) $(datas) pinyin.tab swkb.dat symbols.dat \ - $(DESTDIR)/$(datadir)/chewing --CLEANFILES = $(datas) gendata_stamp checkdata_stamp $(generated_header) -+ $(mkinstalldirs) $(DESTDIR)/$(libdir)/chewing -+ $(INSTALL_DATA) $(datas_lib) \ -+ $(DESTDIR)/$(libdir)/chewing -+ -+CLEANFILES = $(datas) $(datas_lib) gendata_stamp checkdata_stamp $(generated_header) -diff -up ./src/Makefile.am.bz477690 ./src/Makefile.am ---- ./src/Makefile.am.bz477690 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/Makefile.am 2009-05-20 14:24:31.000000000 +1000 -@@ -3,6 +3,7 @@ INCLUDES = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/internal \ - -I$(top_srcdir)/src/porting_layer/include \ -+ -DLIBINSTDIR=\"$(libdir)\"\ - -DCHEWING_DATADIR=\"$(datadir)/chewing\" - - lib_LTLIBRARIES = libchewing.la -diff -up ./src/tree.c.bz477690 ./src/tree.c ---- ./src/tree.c.bz477690 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/tree.c 2009-05-20 14:24:31.000000000 +1000 -@@ -114,7 +114,8 @@ void InitTree( const char *prefix ) - int i; - #endif - -- sprintf( filename, "%s" PLAT_SEPARATOR "%s", prefix, PHONE_TREE_FILE ); -+ sprintf( filename, "%s" PLAT_SEPARATOR "chewing" PLAT_SEPARATOR "%s", -+ LIBINSTDIR, PHONE_TREE_FILE ); - #ifdef USE_BINARY_DATA - plat_mmap_set_invalid( &tree_mmap ); - tree_size = plat_mmap_create( &tree_mmap, filename, FLAG_ATTRIBUTE_READ ); diff --git a/libchewing-0.3.2.chewing_zuin.patch b/libchewing-0.3.2.chewing_zuin.patch deleted file mode 100644 index 47dadad..0000000 --- a/libchewing-0.3.2.chewing_zuin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./src/mod_aux.c.chewing_zuin ./src/mod_aux.c ---- ./src/mod_aux.c.chewing_zuin 2009-09-30 11:11:56.000000000 +1000 -+++ ./src/mod_aux.c 2009-09-30 11:20:31.000000000 +1000 -@@ -90,7 +90,7 @@ CHEWING_API char *chewing_zuin_String( C - if ( ctx->output->zuinBuf[ i ].s[ 0 ] != '\0' ) { - strcat( s, (char *) (ctx->output->zuinBuf[ i ].s) ); - if ( zuin_count ) -- *zuin_count++; -+ (*zuin_count)++; - } - } - return s; diff --git a/libchewing-0.3.2.hsu.2.patch b/libchewing-0.3.2.hsu.2.patch deleted file mode 100644 index 51e7474..0000000 --- a/libchewing-0.3.2.hsu.2.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up ./src/zuin.c.hsu ./src/zuin.c ---- ./src/zuin.c.hsu 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/zuin.c 2010-03-04 16:43:23.000000000 +1000 -@@ -183,11 +178,8 @@ static int HsuPhoInput( ZuinData *pZuin, - { - int type = 0, searchTimes = 0, inx = 0; - -- if ( -- ( IsHsuPhoEndKey( pZuin->pho_inx, key ) && -- ( pZuin->kbtype == KB_HSU ) ) || -- ( IsDvorakHsuPhoEndKey( pZuin->pho_inx, key ) && -- ( pZuin->kbtype == KB_DVORAK_HSU ) ) ) { -+ /* Dvorak Hsu key has already converted to Hsu */ -+ if ( IsHsuPhoEndKey( pZuin->pho_inx, key )){ - if ( pZuin->pho_inx[ 1 ] == 0 && pZuin->pho_inx[ 2 ] == 0 ) { - /* convert "ㄐㄑㄒ" to "ㄓㄔㄕ" */ - if ( 12 <= pZuin->pho_inx[ 0 ] && pZuin->pho_inx[ 0 ] <= 14 ) { -@@ -232,10 +224,7 @@ static int HsuPhoInput( ZuinData *pZuin, - pZuin->pho_inx[ 0 ] = 12; - } - -- if ( pZuin->kbtype == KB_HSU ) -- searchTimes = ( key == 'j' ) ? 3 : 2; -- else if ( pZuin->kbtype == KB_DVORAK_HSU ) -- searchTimes = ( key == 'h' || key == 'n' ) ? 3 : 2 ; -+ searchTimes = ( key == 'j' ) ? 3 : 2; - - return EndKeyProcess( pZuin, key, searchTimes ); - } diff --git a/libchewing-0.3.2.hsu.patch b/libchewing-0.3.2.hsu.patch deleted file mode 100644 index 5f8f67e..0000000 --- a/libchewing-0.3.2.hsu.patch +++ /dev/null @@ -1,212 +0,0 @@ -diff -up ./src/chewingio.c.hsu ./src/chewingio.c ---- ./src/chewingio.c.hsu 2010-02-10 14:01:42.000000000 +1000 -+++ ./src/chewingio.c 2010-02-10 14:01:42.000000000 +1000 -@@ -1053,7 +1053,7 @@ static int dvorak_convert( int key ) - ';',':','q','Q','j','J','k','K','x','X','b','B','m','M', - 'w','W','v','V','z','Z'}; - char qkey[] = { -- 'Q','q','w','W','e','E','r','R','t','T','y','Y','u','U', -+ 'q','Q','w','W','e','E','r','R','t','T','y','Y','u','U', - 'i','I','o','O','p','P','[','{',']','}','\\','|', - 'a','A','s','S','d','D','f','F','g','G','h','H','j','J', - 'k','K','l','L',';',':','\'','\"', -diff -up ./src/choice.c.hsu ./src/choice.c ---- ./src/choice.c.hsu 2010-02-10 14:01:42.000000000 +1000 -+++ ./src/choice.c 2010-02-10 16:12:04.000000000 +1000 -@@ -29,6 +29,7 @@ - #include "tree-private.h" - #include "userphrase-private.h" - #include "private.h" -+#include "zuin-private.h" - - #define CEIL_DIV( a, b ) ( ( a + b - 1 ) / b ) - -@@ -151,6 +152,23 @@ static int ChoiceTheSame( ChoiceInfo *pc - return 0; - } - -+static void ChoiceInfoAppendChi( -+ ChoiceInfo *pci, uint16 phone ) -+{ -+ Word tempWord; -+ GetCharFirst( &tempWord, phone ); -+ do { -+ if ( ChoiceTheSame( pci, tempWord.word, ueBytesFromChar( tempWord.word[0] ) * sizeof( char ) ) ) -+ continue; -+ memcpy( -+ pci->totalChoiceStr[ pci->nTotalChoice ], -+ tempWord.word, ueBytesFromChar( tempWord.word[0] ) * sizeof( char ) ); -+ assert(pci->nTotalChoice <= MAX_CHOICE); -+ pci->totalChoiceStr[ pci->nTotalChoice ][ ueBytesFromChar( tempWord.word[0] ) ] = '\0'; -+ pci->nTotalChoice++; -+ } while( GetCharNext( &tempWord ) ); -+} -+ - /** @brief Loading all possible phrases of certain length. - * - * Loading all possible phrases of certain length into ChoiceInfo structure from static -@@ -158,10 +176,10 @@ static int ChoiceTheSame( ChoiceInfo *pc - * including number of total pages and the number of current page.\n - */ - static void SetChoiceInfo( -+ ChewingData *pgdata, - ChoiceInfo *pci,AvailInfo *pai, uint16 *phoneSeq, int cursor, - int candPerPage ) - { -- Word tempWord; - Phrase tempPhrase; - int len; - UserPhraseData *pUserPhraseData; -@@ -176,17 +194,57 @@ static void SetChoiceInfo( - - /* secondly, read tree phrase */ - if ( len == 1 ) { /* single character */ -- GetCharFirst( &tempWord, phoneSeq[ cursor ] ); -- do { -- if ( ChoiceTheSame( pci, tempWord.word, ueBytesFromChar( tempWord.word[0] ) * sizeof( char ) ) ) -- continue; -- memcpy( -- pci->totalChoiceStr[ pci->nTotalChoice ], -- tempWord.word, ueBytesFromChar( tempWord.word[0] ) * sizeof( char ) ); -- assert(pci->nTotalChoice <= MAX_CHOICE); -- pci->totalChoiceStr[ pci->nTotalChoice ][ ueBytesFromChar( tempWord.word[0] ) ] = '\0'; -- pci->nTotalChoice++; -- } while( GetCharNext( &tempWord ) ); -+ ChoiceInfoAppendChi( pci, phoneSeq[cursor] ); -+ if (pgdata->zuinData.kbtype == KB_HSU || pgdata->zuinData.kbtype == KB_DVORAK_HSU ){ -+ switch(phoneSeq[ cursor ]){ -+ case 0x2800: // 'ㄘ' -+ ChoiceInfoAppendChi( pci, 0x30 ); // 'ㄟ' -+ break; -+ case 0x80: // 'ㄧ' -+ ChoiceInfoAppendChi( pci, 0x20 ); // 'ㄝ' -+ break; -+ case 0x2A00: // 'ㄙ' -+ ChoiceInfoAppendChi( pci, 0x1 ); // '˙' -+ break; -+ case 0xA00: // 'ㄉ' -+ ChoiceInfoAppendChi( pci, 0x2 ); // 'ˊ' -+ break; -+ case 0x800: // 'ㄈ' -+ ChoiceInfoAppendChi( pci, 0x3 ); // 'ˇ' -+ break; -+ case 0x18: // 'ㄜ' -+ ChoiceInfoAppendChi( pci, 0x1200 ); // 'ㄍ' -+ break; -+ case 0x10: // 'ㄛ' -+ ChoiceInfoAppendChi( pci, 0x1600 ); // 'ㄏ' -+ break; -+ case 0x1E00: // 'ㄓ' -+ ChoiceInfoAppendChi( pci, 0x1800 ); // 'ㄐ' -+ ChoiceInfoAppendChi( pci, 0x4 ); // 'ˋ' -+ break; -+ case 0x58: // 'ㄤ' -+ ChoiceInfoAppendChi( pci, 0x1400 ); // 'ㄎ' -+ break; -+ case 0x68: // 'ㄦ' -+ ChoiceInfoAppendChi( pci, 0x1000 ); // 'ㄌ' -+ ChoiceInfoAppendChi( pci, 0x60 ); // 'ㄥ' -+ break; -+ case 0x2200: // 'ㄕ' -+ ChoiceInfoAppendChi( pci, 0x1C00 ); // 'ㄒ' -+ break; -+ case 0x2000: // 'ㄔ' -+ ChoiceInfoAppendChi( pci, 0x1A00 ); // 'ㄑ' -+ break; -+ case 0x50: // 'ㄣ' -+ ChoiceInfoAppendChi( pci, 0xE00 ); // 'ㄋ' -+ break; -+ case 0x48: // 'ㄢ' -+ ChoiceInfoAppendChi( pci, 0x600 ); // 'ㄇ' -+ break; -+ default: -+ break; -+ } -+ } - } - /* phrase */ - else { -@@ -281,6 +339,7 @@ int ChoiceFirstAvail( ChewingData *pgdat - - pgdata->availInfo.currentAvail = pgdata->availInfo.nAvail - 1; - SetChoiceInfo( -+ pgdata, - &( pgdata->choiceInfo ), - &( pgdata->availInfo ), - pgdata->phoneSeq, -@@ -289,12 +348,14 @@ int ChoiceFirstAvail( ChewingData *pgdat - return 0; - } - --int ChoicePrevAvail( ChewingData *pgdata ) -+int ChoicePrevAvail( ChewingContext *ctx ) - { -+ ChewingData *pgdata=ctx->data; - if (pgdata->choiceInfo.isSymbol) return 0; - if ( ++( pgdata->availInfo.currentAvail ) >= pgdata->availInfo.nAvail ) - pgdata->availInfo.currentAvail = 0; - SetChoiceInfo( -+ pgdata, - &( pgdata->choiceInfo ), - &( pgdata->availInfo ), - pgdata->phoneSeq, -@@ -310,6 +371,7 @@ int ChoiceNextAvail( ChewingData *pgdata - if ( --( pgdata->availInfo.currentAvail ) < 0 ) - pgdata->availInfo.currentAvail = pgdata->availInfo.nAvail - 1; - SetChoiceInfo( -+ pgdata, - &( pgdata->choiceInfo ), - &( pgdata->availInfo ), - pgdata->phoneSeq, -diff -up ./src/common/key2pho.c.hsu ./src/common/key2pho.c ---- ./src/common/key2pho.c.hsu 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/common/key2pho.c 2010-02-10 14:01:42.000000000 +1000 -@@ -81,7 +81,7 @@ static char *key_str[ MAX_KBTYPE ] = { - "bpmfdtnlvkhg7c,./j;'sexuaorwiqzy890-=1234", /* ET */ - "bpmfdtnlvkhgvcgycjqwsexuaorwiqzpmntlhdfjk", /* ET26 */ - "1'a;2,oq.ejpuk5yixfdbghm8ctw9rnv0lsz[7634", /* Dvorak */ -- "bpmfdtnlgkhjvcjvcrzasexuyhgeiawomnklldhtn", /* Dvorak Hsu */ -+ "bpmfdtnlgkhjvcjvcrzasexuyhgeiawomnkllsdfj", /* Dvorak Hsu */ - "qqazwwsxedcrfvttgbyhnujmuikbiolmoplnpyerd", /* DACHEN-CP26 */ - "1qaz2wsxedcrfv5tgbyhnujm8ik,9ol.0p;/-7634", /* pinyin */ - } ; -diff -up ./src/zuin.c.hsu ./src/zuin.c ---- ./src/zuin.c.hsu 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/zuin.c 2010-02-10 14:01:42.000000000 +1000 -@@ -31,20 +31,6 @@ - #include "hanyupinyin-private.h" - #include "private.h" - --static int IsDvorakHsuPhoEndKey( int pho_inx[], int key ) --{ -- switch ( key ) { -- case 'd': -- case 'h': -- case 't': -- case 'n': -- case ' ': -- return ( pho_inx[ 0 ] || pho_inx[ 1 ] || pho_inx[ 2 ] ); -- default: -- return 0; -- } --} -- - /* - * process a key input - * return value: -@@ -67,6 +53,15 @@ static int IsHsuPhoEndKey( int pho_inx[] - } - } - -+static int IsDvorakHsuPhoEndKey( int pho_inx[], int key ) -+{ -+ /* DvorakHsu tone mark should be same with Hsu's mark -+ After conversion. */ -+ return IsHsuPhoEndKey(pho_inx, key); -+} -+ -+ -+ - /* copy the idea from HSU keyboard */ - static int IsET26PhoEndKey( int pho_inx[], int key ) - { diff --git a/libchewing-0.3.2.phraseChoiceRearward.2.patch b/libchewing-0.3.2.phraseChoiceRearward.2.patch deleted file mode 100644 index 7937f97..0000000 --- a/libchewing-0.3.2.phraseChoiceRearward.2.patch +++ /dev/null @@ -1,238 +0,0 @@ -diff -up ./src/chewingio.c.phraseChoiceRearward ./src/chewingio.c ---- ./src/chewingio.c.phraseChoiceRearward 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/chewingio.c 2010-02-02 15:17:13.000000000 +1000 -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - - #include "chewing-utf8-util.h" - #include "global.h" -@@ -100,6 +101,31 @@ int addTerminateService( void (*callback - return 1; - } - -+static void chooseCandidate( ChewingContext *ctx, int toSelect, int key_buf_cursor ) -+{ -+ ChewingData *pgdata = ctx->data; -+ if ( toSelect ) { -+ if( ! pgdata->bSelect ) { -+ ChoiceFirstAvail( pgdata ); -+ } else { -+ if ( pgdata->config.bPhraseChoiceRearward ){ -+ int avail_willbe=(pgdata->availInfo.currentAvail > 0)? -+ pgdata->availInfo.currentAvail-1: pgdata->availInfo.nAvail - 1; -+ pgdata->chiSymbolCursor=pgdata->choiceInfo.oldChiSymbolCursor -+ - pgdata->availInfo.avail[avail_willbe].len; -+ if (chewing_buffer_Len(ctx) > pgdata->choiceInfo.oldChiSymbolCursor){ -+ pgdata->chiSymbolCursor++; -+ } -+ } -+ ChoiceNextAvail( pgdata ); -+ } -+ } else if ( pgdata->symbolKeyBuf[ key_buf_cursor ] ) { -+ /* Open Symbol Choice List */ -+ if( ! pgdata->choiceInfo.isSymbol ) -+ OpenSymbolChoice( pgdata ); -+ } -+} -+ - CHEWING_API ChewingContext *chewing_new() - { - ChewingContext *ctx; -@@ -556,17 +582,7 @@ CHEWING_API int chewing_handle_Space( Ch - if ( ChewingIsChiAt( key_buf_cursor, pgdata ) ) - toSelect = 1; - -- if ( toSelect ) { -- if ( ! pgdata->bSelect ) -- ChoiceFirstAvail( pgdata ); -- else -- ChoiceNextAvail( pgdata ); -- } -- else if ( pgdata->symbolKeyBuf[ key_buf_cursor ] ) { -- /* Open Symbol Choice List */ -- if( ! pgdata->choiceInfo.isSymbol ) -- OpenSymbolChoice( pgdata ); -- } -+ chooseCandidate( ctx, toSelect, key_buf_cursor ); - break; - } - } -@@ -753,22 +769,10 @@ CHEWING_API int chewing_handle_Down( Che - - /* see if to select */ - if ( ChewingIsChiAt( key_buf_cursor, pgdata ) ) -- toSelect = 1; -- -- if ( toSelect ) { -- if( ! pgdata->bSelect ) { -- ChoiceFirstAvail( pgdata ); -- } -- else { -- ChoiceNextAvail( pgdata ); -- } -- } -- else if ( pgdata->symbolKeyBuf[ key_buf_cursor ] ) { -- /* Open Symbol Choice List */ -- if ( ! pgdata->choiceInfo.isSymbol ) -- OpenSymbolChoice( pgdata ); -- } -+ toSelect = 1; - -+ chooseCandidate( ctx, toSelect, key_buf_cursor ); -+ - MakeOutputWithRtn( pgo, pgdata, keystrokeRtn ); - return 0; - } -diff -up ./src/choice.c.phraseChoiceRearward ./src/choice.c ---- ./src/choice.c.phraseChoiceRearward 2008-12-02 00:29:20.000000000 +1000 -+++ ./src/choice.c 2010-02-02 15:18:02.000000000 +1000 -@@ -71,22 +71,44 @@ static void ChangeSelectIntervalAndBreak - } - - /** @brief Loading all possible phrases after the cursor from long to short into AvailInfo structure.*/ --static void SetAvailInfo( -- AvailInfo *pai, const uint16 phoneSeq[], -- int nPhoneSeq, int begin, const int bSymbolArrBrkpt[] ) -+static void SetAvailInfo( -+ AvailInfo *pai, const uint16 phoneSeq[], -+ int nPhoneSeq, int begin, const int bSymbolArrBrkpt[], -+ ChewingData *pgdata,int end) - { -- int end, pho_id; -+ int pho_id; - int diff; - uint16 userPhoneSeq[ MAX_PHONE_SEQ_LEN ]; - - pai->nAvail = 0; - -- for ( end = begin; end < nPhoneSeq; end++ ) { -- diff = end - begin; -- if ( diff > 0 && bSymbolArrBrkpt[ end ] ) -- break; -+ int i,head,head_tmp; -+ if ( pgdata->config.bPhraseChoiceRearward ){ -+ for (i=end;i>=begin;i--){ -+ head=i; -+ if(bSymbolArrBrkpt[i]) -+ break; -+ } -+ head_tmp=end; -+ }else{ -+ head_tmp=head=begin; -+ } -+ -+ int tail,tail_tmp; -+ if ( pgdata->config.bPhraseChoiceRearward ){ -+ tail_tmp=tail=end; -+ }else{ -+ for (i=begin;iavail[ pai->nAvail ].len = diff + 1; -@@ -95,8 +117,8 @@ static void SetAvailInfo( - } - else { - memcpy( -- userPhoneSeq, -- &phoneSeq[ begin ], -+ userPhoneSeq, -+ &phoneSeq[ head_tmp ], - sizeof( uint16 ) * ( diff + 1 ) ) ; - userPhoneSeq[ diff + 1 ] = 0; - if ( UserGetPhraseFirst( userPhoneSeq ) ) { -@@ -109,6 +131,12 @@ static void SetAvailInfo( - pai->avail[ pai->nAvail ].id = -1; - } - } -+ -+ if ( pgdata->config.bPhraseChoiceRearward ){ -+ head_tmp--; -+ }else{ -+ tail_tmp++; -+ } - } - } - -@@ -208,6 +236,21 @@ static void SetChoiceInfo( - pci->pageNo = 0; - } - -+/* -+ * Seek the start of the phrase (eng chars are skipped) -+ */ -+static int SeekPhraseHead( ChewingData *pgdata ){ -+ int i; -+ int phoneSeq=PhoneSeqCursor( pgdata ); -+ for(i=pgdata->nPrefer-1; i>=0; i--){ -+ if (pgdata->preferInterval[ i ].from > phoneSeq -+ || pgdata->preferInterval[ i ].to < phoneSeq ) -+ continue; -+ return pgdata->preferInterval[ i ].from; -+ } -+ return 0; -+} -+ - /** @brief Enter choice mode and relating initialisations. */ - int ChoiceFirstAvail( ChewingData *pgdata ) - { -@@ -216,30 +259,32 @@ int ChoiceFirstAvail( ChewingData *pgdat - - /* see if there is some word in the cursor position */ - if ( pgdata->chiSymbolBufLen == pgdata->chiSymbolCursor ) { -- if ( pgdata->config.bPhraseChoiceRearward ) -- pgdata->chiSymbolCursor = pgdata->preferInterval[ pgdata->nPrefer - 1 ].from + CountSymbols( pgdata, pgdata->chiSymbolBufLen ); -- else -- pgdata->chiSymbolCursor--; -+ pgdata->chiSymbolCursor--; - } -+ int end=PhoneSeqCursor( pgdata ); -+ if ( pgdata->config.bPhraseChoiceRearward ){ -+ pgdata->chiSymbolCursor = SeekPhraseHead(pgdata)+ CountSymbols( pgdata, pgdata->chiSymbolCursor ); -+ } -+ int begin=PhoneSeqCursor( pgdata ); - - pgdata->bSelect = 1; -- -- SetAvailInfo( -- &( pgdata->availInfo ), -- pgdata->phoneSeq, -+ SetAvailInfo( -+ &( pgdata->availInfo ), -+ pgdata->phoneSeq, - pgdata->nPhoneSeq, -- PhoneSeqCursor( pgdata ), -- pgdata->bSymbolArrBrkpt ); -+ begin, -+ pgdata->bSymbolArrBrkpt, -+ pgdata,end); - - if ( ! pgdata->availInfo.nAvail ) - return ChoiceEndChoice( pgdata ); - - pgdata->availInfo.currentAvail = pgdata->availInfo.nAvail - 1; - SetChoiceInfo( -- &( pgdata->choiceInfo ), -- &( pgdata->availInfo ), -- pgdata->phoneSeq, -- PhoneSeqCursor( pgdata ), -+ &( pgdata->choiceInfo ), -+ &( pgdata->availInfo ), -+ pgdata->phoneSeq, -+ PhoneSeqCursor( pgdata ), - pgdata->config.candPerPage ); - return 0; - } diff --git a/libchewing.spec b/libchewing.spec index f0a4df3..d272606 100644 --- a/libchewing.spec +++ b/libchewing.spec @@ -1,8 +1,8 @@ %define im_name_zh_TW 新酷音輸入法 %define name_zh_TW %{im_name_zh_TW}函式庫 Name: libchewing -Version: 0.3.2 -Release: 28%{?dist} +Version: 0.3.3 +Release: 1%{?dist} Summary: Intelligent phonetic input method library for Traditional Chinese Summary(zh_TW): %{name_zh_TW} @@ -19,13 +19,13 @@ Source: http://chewing.csie.net/download/libchewing/%{name}-%{version}.t #Patch6: libchewing-0.3.0-8.bz237916.patch #Patch7: libchewing-0.3.0-9.bz200694.patch #Patch8: libchewing-0.3.0-11.bz195416.patch -Patch9: libchewing-0.3.2.bz477690.patch -Patch10: libchewing-0.3.2.phraseChoiceRearward.2.patch -Patch11: libchewing-0.3.2.chewing_zuin.patch -Patch12: libchewing-0.3.2.hsu.patch -Patch13: libchewing-0.3.2.hsu.2.patch +#Patch9: libchewing-0.3.2.bz477690.patch +#Patch10: libchewing-0.3.2.phraseChoiceRearward.2.patch +#Patch11: libchewing-0.3.2.chewing_zuin.patch +#Patch12: libchewing-0.3.2.hsu.patch +#Patch13: libchewing-0.3.2.hsu.2.patch # Rhbz#625980 -Patch14: libchewing-0.3.2.align.patch +#Patch14: libchewing-0.3.2.align.patch %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -87,12 +87,12 @@ Python binding of libchewing. #%patch6 -p1 -b .7-bz237916 #%patch7 -p1 -b .8-bz200694 #%patch8 -p1 -b .9-bz195416 -%patch9 -p0 -b .bz477690 -%patch10 -p0 -b .phraseChoiceRearward -%patch11 -p0 -b .chewing_zuin -%patch12 -p0 -b .hsu -%patch13 -p0 -b .hsu.2 -%patch14 -p0 -b .align +#%patch9 -p0 -b .bz477690 +#%patch10 -p0 -b .phraseChoiceRearward +#%patch11 -p0 -b .chewing_zuin +#%patch12 -p0 -b .hsu +#%patch13 -p0 -b .hsu.2 +#%patch14 -p0 -b .align %build export CFLAGS=-DLIBINSTDIR='\"%{_libdir}\" -g' @@ -138,6 +138,19 @@ touch $RPM_BUILD_ROOT%{libchewing_python_dir}/__init__.py %changelog +* Mon Mar 07 2011 Ding-Yi Chen - 0.3.3-1 +- Upstream update to 0.3.3 + + Fix memory access violation. + + Improved Python binding. + + Merged with libchewing-data project. (r455) + + Improved random key stroke tester. + + Fix the handling of phonetic symbols in Hsu's keyboard. + + Fix unexpected candidate disorder when doing symbol choice. + + Revised phrase choice from rearward logic. + + Fix cross compilation. + + Improved shell script to merge changes form libchewing-data. + + * Thu Sep 02 2010 Ding-Yi Chen - 0.3.2-28 - Resolves: #625980 Add padding to wch_t to ensure it's word aligned. diff --git a/sources b/sources index c6538bb..f567e86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ef70745ffdf199aa17e533427c63499f libchewing-0.3.2.tar.bz2 +8f1ff6ccdc17c36a5ce6c6864f30f3c2 libchewing-0.3.3.tar.bz2