add 64bit fix

This commit is contained in:
Hu Zheng 2007-03-28 05:53:57 +00:00
parent a5d2356436
commit 0d89ac85cd
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
diff -r -u zhcon-0.2.5.orig/src/winime.cpp zhcon-0.2.5.new/src/winime.cpp
--- zhcon-0.2.5.orig/src/winime.cpp 2007-03-28 13:33:26.000000000 +0800
+++ zhcon-0.2.5.new/src/winime.cpp 2007-03-28 13:42:41.000000000 +0800
@@ -74,7 +74,7 @@
return false;
}
//add a word to candilist then push rp forward
-void WinIme::AddCandilist(char *&rp,unsigned int& buflen) {
+void WinIme::AddCandilist(char *&rp,unsigned long& buflen) {
assert(mpList->mCount < 10);
assert(!IsHzCode1(*rp)); //*rp is last matched latter
@@ -163,7 +163,7 @@
count--;
break;
}
- AddCandilist(t,(unsigned int&)buflen);
+ AddCandilist(t,(unsigned long&)buflen);
} //search next word
else {
if (len == 1) //special for first char
@@ -250,7 +250,7 @@
if (p == (char *) 0xffffffff)
found = false;
- p = (unsigned int) p + mpText;
+ p = (unsigned long) p + mpText;
} //2nd level index
else if (mNum == 1) {
int l = strlen(mHead.mCodeSet);
@@ -271,7 +271,7 @@
if (p == (char *) 0xffffffff)
found = false;
- p = (unsigned int) p + mpText;
+ p = (unsigned long) p + mpText;
} else if (mNum < mHead.mMaxCodes) {
p = mpOffset[mNum - 1];
if (p == (char *) 0xffffffff)
diff -r -u zhcon-0.2.5.orig/src/winime.h zhcon-0.2.5.new/src/winime.h
--- zhcon-0.2.5.orig/src/winime.h 2007-03-28 13:33:26.000000000 +0800
+++ zhcon-0.2.5.new/src/winime.h 2007-03-28 13:42:45.000000000 +0800
@@ -69,7 +69,7 @@
return c >= 0xA1 && c <= 0xFE;
}
- void AddCandilist(char*& p,unsigned& buflen);
+ void AddCandilist(char*& p,unsigned long& buflen);
void SkipNext(char*& rp);
int MatchWord(char* p, int len, int offset);
bool IsGB2312(char* p);

View File

@ -10,6 +10,7 @@ Patch0: http://downloads.sourceforge.net/%{name}/%{name}-0.2.5-to-0.2.6.diff.gz
Patch1: zhcon-0.2.6-path.patch
Patch2: zhcon-0.2.6-path-define.patch
Patch3: zhcon-0.2.6-flags.patch
Patch4: zhcon-0.2.6-64bit-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Buildrequires: autoconf automake
@ -32,6 +33,7 @@ zhcon是一个工作在Linux控制台下的多内码中文平台。
%patch1 -p1 -b .instpath
%patch2 -p1 -b .path_define
%patch3 -p1 -b .flags
%patch4 -p1 -b .64bit_fix
iconv -f GB2312 -t UTF-8 ChangeLog -o ChangeLog.utf && mv -f ChangeLog.utf ChangeLog
( cd doc; tar -zxf html.tar.gz; chmod 755 manual)