diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2006-05-20 16:23:34 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2006-05-20 16:23:34 +0000 |
commit | d5a4216ceaf4d5c274da74e6f2ae75bd4e177b4d (patch) | |
tree | c707726f80a956d6c1764259974cf3ce92a81ad6 /chinese/libchewing | |
parent | c2c9236c65d2b1fdac697adbc93528b4fabd21a1 (diff) | |
download | ports-d5a4216ceaf4d5c274da74e6f2ae75bd4e177b4d.tar.gz ports-d5a4216ceaf4d5c274da74e6f2ae75bd4e177b4d.zip |
Notes
Diffstat (limited to 'chinese/libchewing')
-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 6c0881715cd2..e2bfa54d5b76 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 000000000000..353fd37bd874 --- /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 000000000000..5b24125c8016 --- /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 ) |