- fix word order in gcin2tab

PR:		ports/106262
Submitted by:	chinsan (maintainer)
This commit is contained in:
Rong-En Fan 2006-12-04 04:21:39 +00:00
parent fcf9e9d1d0
commit 9a8f225ab9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=178802
4 changed files with 54 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= gcin
PORTVERSION= 1.3.1
PORTREVISION= 1
CATEGORIES= chinese textproc gnome
MASTER_SITES= http://cle.linux.org.tw/gcin/download/:main \
http://yilan.twbbs.org/chinsan/gcin/:main \

View file

@ -0,0 +1,26 @@
--- gcin2tab.c.orig Sun Dec 3 11:05:26 2006
+++ gcin2tab.c Sun Dec 3 11:08:36 2006
@@ -129,7 +129,10 @@
int d;
if ((d = a->key - b->key)) return d;
- return memcmp(a->ch ,b->ch, CH_SZ);
+ d = memcmp(a->ch ,b->ch, CH_SZ);
+ if (d) return d;
+
+ return a->oseq - b->oseq;
}
int qcmp2_64(const void *aa, const void *bb)
@@ -139,7 +142,10 @@
if (a->key > b->key) return 1;
if (a->key < b->key) return -1;
- return memcmp(a->ch ,b->ch, CH_SZ);
+ int d = memcmp(a->ch ,b->ch, CH_SZ);
+ if (d) return d;
+
+ return a->oseq - b->oseq;
}
int qcmp(const void *aa, const void *bb)

View file

@ -7,6 +7,7 @@
PORTNAME= gcin
PORTVERSION= 1.3.1
PORTREVISION= 1
CATEGORIES= chinese textproc gnome
MASTER_SITES= http://cle.linux.org.tw/gcin/download/:main \
http://yilan.twbbs.org/chinsan/gcin/:main \

View file

@ -0,0 +1,26 @@
--- gcin2tab.c.orig Sun Dec 3 11:05:26 2006
+++ gcin2tab.c Sun Dec 3 11:08:36 2006
@@ -129,7 +129,10 @@
int d;
if ((d = a->key - b->key)) return d;
- return memcmp(a->ch ,b->ch, CH_SZ);
+ d = memcmp(a->ch ,b->ch, CH_SZ);
+ if (d) return d;
+
+ return a->oseq - b->oseq;
}
int qcmp2_64(const void *aa, const void *bb)
@@ -139,7 +142,10 @@
if (a->key > b->key) return 1;
if (a->key < b->key) return -1;
- return memcmp(a->ch ,b->ch, CH_SZ);
+ int d = memcmp(a->ch ,b->ch, CH_SZ);
+ if (d) return d;
+
+ return a->oseq - b->oseq;
}
int qcmp(const void *aa, const void *bb)