diff options
-rw-r--r-- | chinese/libchewing/Makefile | 1 | ||||
-rw-r--r-- | chinese/libchewing/files/patch-src-char.c | 11 | ||||
-rw-r--r-- | chinese/libchewing/files/patch-src-dict.c | 11 |
3 files changed, 23 insertions, 0 deletions
diff --git a/chinese/libchewing/Makefile b/chinese/libchewing/Makefile index 6c08817..e2bfa54 100644 --- a/chinese/libchewing/Makefile +++ b/chinese/libchewing/Makefile @@ -7,6 +7,7 @@ PORTNAME= libchewing PORTVERSION= 0.3.0 +PORTREVISION= 1 CATEGORIES= chinese textproc MASTER_SITES= http://chewing.csie.net/download/libchewing/ diff --git a/chinese/libchewing/files/patch-src-char.c b/chinese/libchewing/files/patch-src-char.c new file mode 100644 index 0000000..353fd37 --- /dev/null +++ b/chinese/libchewing/files/patch-src-char.c @@ -0,0 +1,11 @@ +--- src/char.c.orig Mon May 15 14:49:43 2006 ++++ src/char.c Sun May 21 00:14:41 2006 +@@ -126,7 +126,7 @@ + + fgettab( buf, 1000, dictfile ); + /* only read 6 bytes to wrd_ptr->word avoid buffer overflow */ +- sscanf( buf, "%hu %6s", &sh, wrd_ptr->word ); ++ sscanf( buf, "%hu %6[^ ]", &sh, wrd_ptr->word ); + assert( wrd_ptr->word != NULL ); + } + diff --git a/chinese/libchewing/files/patch-src-dict.c b/chinese/libchewing/files/patch-src-dict.c new file mode 100644 index 0000000..5b24125 --- /dev/null +++ b/chinese/libchewing/files/patch-src-dict.c @@ -0,0 +1,11 @@ +--- src/dict.c.orig Mon May 15 14:49:43 2006 ++++ src/dict.c Sun May 21 00:14:29 2006 +@@ -101,7 +101,7 @@ + char buf[ 1000 ]; + + fgettab( buf, 1000, dictfile ); +- sscanf( buf, "%s %d", phr_ptr->phrase, &( phr_ptr->freq ) ); ++ sscanf( buf, "%[^ ] %d", phr_ptr->phrase, &( phr_ptr->freq ) ); + } + + int GetPhraseFirst( Phrase *phr_ptr, int phone_phr_id ) |