From 0f29b0caeec0893d2465e345209c0fac6d3205b1 Mon Sep 17 00:00:00 2001 From: Koichi KAMICHI Date: Tue, 20 Apr 2004 05:53:45 +0000 Subject: [PATCH 1/1] Add error processing for combine(U+2ffa). --- kagecgi/Makefile | 5 ----- kagecgi/kagecomb.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/kagecgi/Makefile b/kagecgi/Makefile index 3de3da3..5181c8a 100755 --- a/kagecgi/Makefile +++ b/kagecgi/Makefile @@ -8,14 +8,9 @@ BINDIR=/usr/local/bin SHAREDIR=/usr/local/share/kagecgi DBURL=http://fonts.jp/kagedb/kagedb -#for cygwin CFLAGS= LIBS= -lpng -ldb -#for linux -#CFLAGS= -I/usr/local/include -#LIBS= -L/usr/local/lib -lpng -ldb - #for MacOSX with fink #CFLAGS= -I/sw/include -I/sw/include/db3 -I/sw/include/libpng/ #LIBS= -L/sw/lib -lpng -ldb diff --git a/kagecgi/kagecomb.c b/kagecgi/kagecomb.c index 3b1ac74..16ebe34 100755 --- a/kagecgi/kagecomb.c +++ b/kagecgi/kagecomb.c @@ -377,9 +377,11 @@ void combineTate3(const KGString *parts1, const KGString *parts2, const KGString } void combineHame2(const KGString *parts1, const KGString *parts3, int *result){ - int i; + int i, flag; int *buf, strokes; + flag = 0; + //set results result[0] = 0; result[1] = 0; @@ -388,12 +390,17 @@ void combineHame2(const KGString *parts1, const KGString *parts3, int *result){ buf = convertStroke(parts1->str, buf, &strokes); for(i = 0; i < strokes; i++){ if(buf[i * 11 + 0] == 9){ - result[8] = buf[i * 11 + 3]; result[9] = buf[i * 11 + 4]; result[10] = buf[i * 11 + 5]; result[11] = buf[i * 11 + 6]; } } - //not yet + if(flag == 0){ //error + result[8] = 50; + result[9] = 50; + result[10] = 150; + result[11] = 150; + } + //not yet } -- 1.7.10.4