revise sj_typedef.h

Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
This commit is contained in:
SASANO Takayoshi 2023-12-10 06:46:18 +09:00 • committed by Masanori Ogino
commit db373a736e
53 changed files with 759 additions and 776 deletions

View file

@ -171,7 +171,7 @@ adddic(u_char* yomi, u_char* kanji, TypeGram hinsi)
curdict->segunit++; curdict->segunit++;
(*curdict->getdic)(curdict, curdict->segunit - 1); (*curdict->getdic)(curdict, curdict->segunit - 1);
memset(dicbuf, DicSegTerm, (Int)curdict->seglen); memset(dicbuf, DicSegTerm, (int)curdict->seglen);
dicbuf[0] = 0; dicbuf[0] = 0;
(*curdict->putdic)(curdict, curdict->segunit - 1); (*curdict->putdic)(curdict, curdict->segunit - 1);
(*curdict->rszdic)(curdict, curdict->segunit); (*curdict->rszdic)(curdict, curdict->segunit);
@ -264,7 +264,7 @@ adddic(u_char* yomi, u_char* kanji, TypeGram hinsi)
for (p1 = ClStudyDict ; !iseocl(p1) ; p1 = ClNextTag(p1)) { for (p1 = ClStudyDict ; !iseocl(p1) ; p1 = ClNextTag(p1)) {
err = strncmp(yptr, (u_char*)ClYomiPos(p1), err = strncmp(yptr, (u_char*)ClYomiPos(p1),
(Int)ClYomiLen(p1)); (int)ClYomiLen(p1));
if (err == MATCH) { if (err == MATCH) {
delclsub(p1); delclsub(p1);
mkclidx(); mkclidx();
@ -287,7 +287,7 @@ adddic(u_char* yomi, u_char* kanji, TypeGram hinsi)
stdydat.sttlen = 0; stdydat.sttlen = 0;
stdydat.sttfg = 0; stdydat.sttfg = 0;
stdydat.ka_fg = 0; stdydat.ka_fg = 0;
(Void)study(&stdydat); (void)study(&stdydat);
return AD_Done; return AD_Done;
} }
@ -468,7 +468,7 @@ sprt_seg(TypeDicSeg seg, TypeDicOfs ofs)
} }
(*curdict->getdic)(curdict, seg); (*curdict->getdic)(curdict, seg);
memset(dicbuf + ofs, DicSegTerm, (Int)(curdict->seglen - ofs)); memset(dicbuf + ofs, DicSegTerm, (int)(curdict->seglen - ofs));
(*curdict->putdic)(curdict, seg); (*curdict->putdic)(curdict, seg);
} }
@ -483,7 +483,7 @@ apnd_uidx(TypeDicSeg seg, u_char* yomi, int len)
while (*p++) ; while (*p++) ;
q = idxbuf + curdict->idxlen; q = idxbuf + curdict->idxlen;
mvmemd(q - (len + 1), q, (Int)(q - (len + 1) - p)); mvmemd(q - (len + 1), q, (int)(q - (len + 1) - p));
while (len--) *p++ = *yomi++; while (len--) *p++ = *yomi++;
*p = 0; *p = 0;

View file

@ -44,27 +44,27 @@
#include "kanakan.h" #include "kanakan.h"
Int sj2cd_str(); int sj2cd_str();
Void mvmemi(), mvmemd(), mkidxtbl(); void mvmemi(), mvmemd(), mkidxtbl();
void void
set_size (Uchar *p, Int size, Int plen, Int nlen) set_size (u_char *p, int size, int plen, int nlen)
{ {
*p = (Uchar)(size >> 8); *p = (u_char)(size >> 8);
if (nlen & 0x10) *p |= NokoriYomiTop; if (nlen & 0x10) *p |= NokoriYomiTop;
if (plen & 0x10) *p |= AssyukuYomiTop; if (plen & 0x10) *p |= AssyukuYomiTop;
*(p + 1) = (Uchar)size; *(p + 1) = (u_char)size;
*(p + 2) = (Uchar)((nlen & 0x0f) | ((plen & 0x0f) << 4)); *(p + 2) = (u_char)((nlen & 0x0f) | ((plen & 0x0f) << 4));
} }
static Int static int
isvyomi (Uchar *yp) isvyomi (u_char *yp)
{ {
Int len; int len;
if (!*yp) return FALSE; if (!*yp) return FALSE;
@ -80,10 +80,10 @@ isvyomi (Uchar *yp)
static Int static int
isvknj(Uchar *kanji) isvknj(u_char *kanji)
{ {
Int len; int len;
if (!*kanji) return FALSE; if (!*kanji) return FALSE;
@ -110,10 +110,10 @@ isvknj(Uchar *kanji)
static Int static int
isgrm (TypeGram gram) isgrm (TypeGram gram)
{ {
Int grm = gram; int grm = gram;
if (MEISI_1 <= grm && grm <= D_MEISI_6) return TRUE; if (MEISI_1 <= grm && grm <= D_MEISI_6) return TRUE;
if (MYOUJI <= grm && grm <= JOSUUSI2) return TRUE; if (MYOUJI <= grm && grm <= JOSUUSI2) return TRUE;
@ -132,10 +132,10 @@ isgrm (TypeGram gram)
Uint u_int
addel_arg (Uchar *yp, Uchar *kp, TypeGram grm, Uchar *nyp, Int len) addel_arg (u_char *yp, u_char *kp, TypeGram grm, u_char *nyp, int len)
{ {
Ushort err = 0; u_short err = 0;
if (!sj2cd_str(yp, nyp, len)) err |= AD_BadYomi; if (!sj2cd_str(yp, nyp, len)) err |= AD_BadYomi;
if (!isvyomi(nyp)) err |= AD_BadYomi; if (!isvyomi(nyp)) err |= AD_BadYomi;
@ -147,10 +147,10 @@ addel_arg (Uchar *yp, Uchar *kp, TypeGram grm, Uchar *nyp, Int len)
static void static void
yomi2kata (Uchar *src, Uchar *dst) yomi2kata (u_char *src, u_char *dst)
{ {
Int first; int first;
Int second; int second;
while ((first = *src++) != 0) { while ((first = *src++) != 0) {
second = *src++; second = *src++;
@ -170,10 +170,10 @@ yomi2kata (Uchar *src, Uchar *dst)
static Int static int
top_strcmp (Uchar *src, Uchar *dst) top_strcmp (u_char *src, u_char *dst)
{ {
Int i; int i;
for (i = 0 ; *src && (*src == *dst) ; src++, dst++) i++; for (i = 0 ; *src && (*src == *dst) ; src++, dst++) i++;
i /= 2; i /= 2;
return (i > MaxYomiAskNumber) ? MaxYomiAskNumber : i; return (i > MaxYomiAskNumber) ? MaxYomiAskNumber : i;
@ -181,11 +181,11 @@ top_strcmp (Uchar *src, Uchar *dst)
static Int static int
last_strcmp (Uchar *src, Uchar *dst) last_strcmp (u_char *src, u_char *dst)
{ {
Int slen; int slen;
Int dlen; int dlen;
slen = strlen(src); slen = strlen(src);
dlen = strlen(dst); dlen = strlen(dst);
@ -199,21 +199,21 @@ last_strcmp (Uchar *src, Uchar *dst)
Int int
cvtknj (Uchar *yomi, Uchar *knj, Uchar *dst) cvtknj (u_char *yomi, u_char *knj, u_char *dst)
{ {
Uchar kana[MaxWdYomiLen * 2 + 1]; u_char kana[MaxWdYomiLen * 2 + 1];
Int len; int len;
Uchar *keep; u_char *keep;
keep = dst; keep = dst;
yomi2kata(yomi, kana); yomi2kata(yomi, kana);
if ((len = top_strcmp(yomi, knj)) != 0) { if ((len = top_strcmp(yomi, knj)) != 0) {
*dst = (Uchar)(ZenHiraAssyuku | (len - 1)); *dst = (u_char)(ZenHiraAssyuku | (len - 1));
} }
else if ((len = top_strcmp(kana, knj)) != 0) { else if ((len = top_strcmp(kana, knj)) != 0) {
*dst = (Uchar)(ZenKataAssyuku | (len - 1)); *dst = (u_char)(ZenKataAssyuku | (len - 1));
} }
if (len) { if (len) {
@ -224,16 +224,16 @@ cvtknj (Uchar *yomi, Uchar *knj, Uchar *dst)
if (*knj) { if (*knj) {
for ( ; ; ) { for ( ; ; ) {
if ((len = last_strcmp(yomi, knj)) != 0) { if ((len = last_strcmp(yomi, knj)) != 0) {
*dst++ = (Uchar)(ZenHiraAssyuku | (len - 1)); *dst++ = (u_char)(ZenHiraAssyuku | (len - 1));
break; break;
} }
else if ((len = last_strcmp(kana, knj)) != 0) { else if ((len = last_strcmp(kana, knj)) != 0) {
*dst++ = (Uchar)(ZenKataAssyuku | (len - 1)); *dst++ = (u_char)(ZenKataAssyuku | (len - 1));
break; break;
} }
else if (*knj == SS2) { else if (*knj == SS2) {
knj++; knj++;
*dst++ = (Uchar)LeadingHankaku; *dst++ = (u_char)LeadingHankaku;
*dst++ = *knj++; *dst++ = *knj++;
} else if (*knj == SS3) { } else if (*knj == SS3) {
knj++; knj++;
@ -244,7 +244,7 @@ cvtknj (Uchar *yomi, Uchar *knj, Uchar *dst)
*dst++ = (*knj & NormalKanjiMask); knj++; *dst++ = (*knj & NormalKanjiMask); knj++;
} }
else { else {
*dst++ = (Uchar)LeadingHankaku; *dst++ = (u_char)LeadingHankaku;
*dst++ = *knj++; *dst++ = *knj++;
} }
@ -261,14 +261,14 @@ cvtknj (Uchar *yomi, Uchar *knj, Uchar *dst)
Int int
srchkana (Uchar **ptr, Int *saml) srchkana (u_char **ptr, int *saml)
{ {
Uchar *p; u_char *p;
Int cmp; int cmp;
Int cnt = 0; int cnt = 0;
Uchar same; u_char same;
Int flg = 0; int flg = 0;
same = 0; same = 0;
@ -301,12 +301,12 @@ srchkana (Uchar **ptr, Int *saml)
Int int
srchgram (Uchar *ptr, Uchar **dst, TypeGram hinsi) srchgram (u_char *ptr, u_char **dst, TypeGram hinsi)
{ {
Uchar *endp; u_char *endp;
Int cnt = 0, nlen; int cnt = 0, nlen;
Int flg = FALSE; int flg = FALSE;
endp = getntag(ptr); endp = getntag(ptr);
@ -333,14 +333,14 @@ srchgram (Uchar *ptr, Uchar **dst, TypeGram hinsi)
Int int
srchkanji (Uchar **dst, Uchar *knj, Int klen) srchkanji (u_char **dst, u_char *knj, int klen)
{ {
Uchar *ptr; u_char *ptr;
Uchar *p, *q; u_char *p, *q;
Int len; int len;
Int flg = FALSE; int flg = FALSE;
Int cnt = 0; int cnt = 0;
ptr = *dst + 1; ptr = *dst + 1;
@ -370,7 +370,7 @@ srchkanji (Uchar **dst, Uchar *knj, Int klen)
TypeIdxOfs TypeIdxOfs
count_uidx (void) count_uidx (void)
{ {
Uchar *p; u_char *p;
p = get_idxptr(curdict->segunit - 1); p = get_idxptr(curdict->segunit - 1);
while (*p++) ; while (*p++) ;
@ -381,10 +381,10 @@ count_uidx (void)
void void
chg_uidx (TypeDicSeg seg, Uchar *yomi, Int len) chg_uidx (TypeDicSeg seg, u_char *yomi, int len)
{ {
Uchar *p, *q; u_char *p, *q;
Int olen; int olen;
p = get_idxptr(seg); p = get_idxptr(seg);
@ -393,10 +393,10 @@ chg_uidx (TypeDicSeg seg, Uchar *yomi, Int len)
q = idxbuf + curdict->idxlen; q = idxbuf + curdict->idxlen;
if (len > olen) { if (len > olen) {
mvmemd(q - (len-olen), q, (Int)(q - (len-olen) - p)); mvmemd(q - (len-olen), q, (int)(q - (len-olen) - p));
} }
else { else {
mvmemi(p + (olen-len), p, (Int)(q - (p + (olen-len)))); mvmemi(p + (olen-len), p, (int)(q - (p + (olen-len))));
} }
while (len--) *p++ = *yomi++; while (len--) *p++ = *yomi++;

View file

@ -42,7 +42,7 @@
Uchar chrtbl[256] = u_char chrtbl[256] =
{ {
0, 0,
FZKTOP, FZKTOP,

View file

@ -41,7 +41,7 @@
#include "kanakan.h" #include "kanakan.h"
Int sj2cd_chr(); int sj2cd_chr();
void cvtclknj(), freework(); void cvtclknj(), freework();

View file

@ -68,7 +68,7 @@ clstudy(u_char* yomi1, u_char* yomi2, STDYOUT *stdy)
if (!sj2cd_str(yomi1, ytmp, CLSTDY_TMPLEN)) if (!sj2cd_str(yomi1, ytmp, CLSTDY_TMPLEN))
return ClstudyYomiErr; return ClstudyYomiErr;
(Void)delcldata(ytmp); (void)delcldata(ytmp);
ret = ClstudyNormEnd; ret = ClstudyNormEnd;
} }
@ -101,9 +101,9 @@ clstudy(u_char* yomi1, u_char* yomi2, STDYOUT *stdy)
ptr = ClStudyTail - alen; ptr = ClStudyTail - alen;
mvmemd(ptr, ClStudyTail, (ptr - dst)); mvmemd(ptr, ClStudyTail, (ptr - dst));
ClYomiLen(dst) = (Uchar)len2; ClYomiLen(dst) = (u_char)len2;
ClGramCode(dst) = stdy -> hinshi; ClGramCode(dst) = stdy -> hinshi;
ClYomi1Len(dst) = (Uchar)len1; ClYomi1Len(dst) = (u_char)len1;
ClSetNum(dst, 1); ClSetNum(dst, 1);
memcpy(ytmp, ClYomiPos(dst), len2); memcpy(ytmp, ClYomiPos(dst), len2);
@ -278,9 +278,9 @@ mkclidx(void)
ptr = ClNextTag(ptr); ptr = ClNextTag(ptr);
} }
if (ClYomiLen(ptr) && ((Int)*ClYomiPos(ptr) < ed)) if (ClYomiLen(ptr) && ((int)*ClYomiPos(ptr) < ed))
ClStudyIdx[num] = ptr - ClStudyDict; ClStudyIdx[num] = ptr - ClStudyDict;
else else
ClStudyIdx[num] = (Ushort)-1; ClStudyIdx[num] = (u_short)-1;
} }
} }

View file

@ -41,9 +41,9 @@
#include "const.h" #include "const.h"
#include "sj_typedef.h" #include "sj_typedef.h"
Int cmpstr(src, dst) int cmpstr(src, dst)
Uchar *src; u_char *src;
Uchar *dst; u_char *dst;
{ {
while (*src) { while (*src) {
if (*src != *dst) return FALSE; if (*src != *dst) return FALSE;

132
conjunc.c
View file

@ -39,7 +39,7 @@
#include "sj_yomi.h" #include "sj_yomi.h"
#include "sj_right.h" #include "sj_right.h"
static Uchar sahencnj[] = { static u_char sahencnj[] = {
0x00, R_SGOKAN, 0x00, R_SGOKAN,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -63,7 +63,7 @@ static Uchar sahencnj[] = {
0xff 0xff
}; };
static Uchar zahencnj[] = { static u_char zahencnj[] = {
0x00, R_CUT, 0x00, R_CUT,
0x01, _ZI, R_JI, 0x01, _ZI, R_JI,
0x11, _YO, R_MEIREI2, 0x11, _YO, R_MEIREI2,
@ -77,7 +77,7 @@ static Uchar zahencnj[] = {
0xff 0xff
}; };
static Uchar ka5cnj1[] = { static u_char ka5cnj1[] = {
0x01, _I, R_ONBIN2, 0x01, _I, R_ONBIN2,
0x01, _KA, R_MIZEN5, 0x01, _KA, R_MIZEN5,
0x01, _KI, R_RENYOU5, 0x01, _KI, R_RENYOU5,
@ -87,7 +87,7 @@ static Uchar ka5cnj1[] = {
0xff 0xff
}; };
static Uchar ka5cnj3[] = { static u_char ka5cnj3[] = {
0x01, _I, R_ONBIN2, 0x01, _I, R_ONBIN2,
0x01, _KA, R_MIZEN5, 0x01, _KA, R_MIZEN5,
0x01, _KI, R_RENYOU7, 0x01, _KI, R_RENYOU7,
@ -97,7 +97,7 @@ static Uchar ka5cnj3[] = {
0xff 0xff
}; };
static Uchar ka5cnj5[] = { static u_char ka5cnj5[] = {
0x01, _I, R_ONBIN2, 0x01, _I, R_ONBIN2,
0x01, _KA, R_MIZEN5, 0x01, _KA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -113,7 +113,7 @@ static Uchar ka5cnj5[] = {
0xff 0xff
}; };
static Uchar ka5cnj7[] = { static u_char ka5cnj7[] = {
0x01, _I, R_ONBIN2, 0x01, _I, R_ONBIN2,
0x01, _KA, R_MIZEN5, 0x01, _KA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -129,7 +129,7 @@ static Uchar ka5cnj7[] = {
0xff 0xff
}; };
static Uchar ga5cnj1[] = { static u_char ga5cnj1[] = {
0x01, _I, R_ONBIN3, 0x01, _I, R_ONBIN3,
0x01, _GA, R_MIZEN5, 0x01, _GA, R_MIZEN5,
0x01, _GI, R_RENYOU5, 0x01, _GI, R_RENYOU5,
@ -139,7 +139,7 @@ static Uchar ga5cnj1[] = {
0xff 0xff
}; };
static Uchar ga5cnj3[] = { static u_char ga5cnj3[] = {
0x01, _I, R_ONBIN3, 0x01, _I, R_ONBIN3,
0x01, _GA, R_MIZEN5, 0x01, _GA, R_MIZEN5,
0x01, _GI, R_RENYOU7, 0x01, _GI, R_RENYOU7,
@ -149,7 +149,7 @@ static Uchar ga5cnj3[] = {
0xff 0xff
}; };
static Uchar ga5cnj5[] = { static u_char ga5cnj5[] = {
0x01, _I, R_ONBIN3, 0x01, _I, R_ONBIN3,
0x01, _GA, R_MIZEN5, 0x01, _GA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -165,7 +165,7 @@ static Uchar ga5cnj5[] = {
0xff 0xff
}; };
static Uchar ga5cnj7[] = { static u_char ga5cnj7[] = {
0x01, _I, R_ONBIN3, 0x01, _I, R_ONBIN3,
0x01, _GA, R_MIZEN5, 0x01, _GA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -181,7 +181,7 @@ static Uchar ga5cnj7[] = {
0xff 0xff
}; };
static Uchar sa5cnj1[] = { static u_char sa5cnj1[] = {
0x01, _SA, R_MIZEN5, 0x01, _SA, R_MIZEN5,
0x01, _SI, R_SA5RENYOU1, 0x01, _SI, R_SA5RENYOU1,
0x01, _SU, R_SHUUSI, 0x01, _SU, R_SHUUSI,
@ -190,7 +190,7 @@ static Uchar sa5cnj1[] = {
0xff 0xff
}; };
static Uchar sa5cnj3[] = { static u_char sa5cnj3[] = {
0x01, _SA, R_MIZEN5, 0x01, _SA, R_MIZEN5,
0x01, _SI, R_SA5RENYOU3, 0x01, _SI, R_SA5RENYOU3,
0x01, _SU, R_SHUUSI, 0x01, _SU, R_SHUUSI,
@ -199,7 +199,7 @@ static Uchar sa5cnj3[] = {
0xff 0xff
}; };
static Uchar sa5cnj5[] = { static u_char sa5cnj5[] = {
0x01, _SA, R_MIZEN5, 0x01, _SA, R_MIZEN5,
0x01, _SI, R_SA5RENYOU1, 0x01, _SI, R_SA5RENYOU1,
0x01, _SU, R_SHUUSI, 0x01, _SU, R_SHUUSI,
@ -210,7 +210,7 @@ static Uchar sa5cnj5[] = {
0xff 0xff
}; };
static Uchar sa5cnj7[] = { static u_char sa5cnj7[] = {
0x01, _SA, R_MIZEN5, 0x01, _SA, R_MIZEN5,
0x01, _SI, R_SA5RENYOU3, 0x01, _SI, R_SA5RENYOU3,
0x01, _SU, R_SHUUSI, 0x01, _SU, R_SHUUSI,
@ -221,7 +221,7 @@ static Uchar sa5cnj7[] = {
0xff 0xff
}; };
static Uchar ta5cnj1[] = { static u_char ta5cnj1[] = {
0x01, _TA, R_MIZEN5, 0x01, _TA, R_MIZEN5,
0x01, _TI, R_RENYOU5, 0x01, _TI, R_RENYOU5,
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
@ -231,7 +231,7 @@ static Uchar ta5cnj1[] = {
0xff 0xff
}; };
static Uchar ta5cnj3[] = { static u_char ta5cnj3[] = {
0x01, _TA, R_MIZEN5, 0x01, _TA, R_MIZEN5,
0x01, _TI, R_RENYOU7, 0x01, _TI, R_RENYOU7,
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
@ -241,7 +241,7 @@ static Uchar ta5cnj3[] = {
0xff 0xff
}; };
static Uchar ta5cnj5[] = { static u_char ta5cnj5[] = {
0x01, _TA, R_MIZEN5, 0x01, _TA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -257,7 +257,7 @@ static Uchar ta5cnj5[] = {
0xff 0xff
}; };
static Uchar ta5cnj7[] = { static u_char ta5cnj7[] = {
0x01, _TA, R_MIZEN5, 0x01, _TA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -274,7 +274,7 @@ static Uchar ta5cnj7[] = {
}; };
static Uchar na5cnj[] = { static u_char na5cnj[] = {
0x01, _NA, R_MIZEN5, 0x01, _NA, R_MIZEN5,
0x01, _NI, R_RENYOU5, 0x01, _NI, R_RENYOU5,
0x01, _NU, R_SHUUSI, 0x01, _NU, R_SHUUSI,
@ -284,7 +284,7 @@ static Uchar na5cnj[] = {
0xff 0xff
}; };
static Uchar ba5cnj1[] = { static u_char ba5cnj1[] = {
0x01, _BA, R_MIZEN5, 0x01, _BA, R_MIZEN5,
0x01, _BI, R_RENYOU5, 0x01, _BI, R_RENYOU5,
0x01, _BU, R_SHUUSI, 0x01, _BU, R_SHUUSI,
@ -294,7 +294,7 @@ static Uchar ba5cnj1[] = {
0xff 0xff
}; };
static Uchar ba5cnj3[] = { static u_char ba5cnj3[] = {
0x01, _BA, R_MIZEN5, 0x01, _BA, R_MIZEN5,
0x01, _BI, R_RENYOU7, 0x01, _BI, R_RENYOU7,
0x01, _BU, R_SHUUSI, 0x01, _BU, R_SHUUSI,
@ -304,7 +304,7 @@ static Uchar ba5cnj3[] = {
0xff 0xff
}; };
static Uchar ba5cnj5[] = { static u_char ba5cnj5[] = {
0x01, _BA, R_MIZEN5, 0x01, _BA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -320,7 +320,7 @@ static Uchar ba5cnj5[] = {
0xff 0xff
}; };
static Uchar ba5cnj7[] = { static u_char ba5cnj7[] = {
0x01, _BA, R_MIZEN5, 0x01, _BA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -336,7 +336,7 @@ static Uchar ba5cnj7[] = {
0xff 0xff
}; };
static Uchar ma5cnj1[] = { static u_char ma5cnj1[] = {
0x01, _MA, R_MIZEN5, 0x01, _MA, R_MIZEN5,
0x01, _MI, R_RENYOU5, 0x01, _MI, R_RENYOU5,
0x01, _MU, R_SHUUSI, 0x01, _MU, R_SHUUSI,
@ -346,7 +346,7 @@ static Uchar ma5cnj1[] = {
0xff 0xff
}; };
static Uchar ma5cnj3[] = { static u_char ma5cnj3[] = {
0x01, _MA, R_MIZEN5, 0x01, _MA, R_MIZEN5,
0x01, _MI, R_RENYOU7, 0x01, _MI, R_RENYOU7,
0x01, _MU, R_SHUUSI, 0x01, _MU, R_SHUUSI,
@ -356,7 +356,7 @@ static Uchar ma5cnj3[] = {
0xff 0xff
}; };
static Uchar ma5cnj5[] = { static u_char ma5cnj5[] = {
0x01, _MA, R_MIZEN5, 0x01, _MA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -372,7 +372,7 @@ static Uchar ma5cnj5[] = {
0xff 0xff
}; };
static Uchar ma5cnj7[] = { static u_char ma5cnj7[] = {
0x01, _MA, R_MIZEN5, 0x01, _MA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
0x11, _SI, R_SA5RENYOU3, 0x11, _SI, R_SA5RENYOU3,
@ -388,7 +388,7 @@ static Uchar ma5cnj7[] = {
0xff 0xff
}; };
static Uchar ra5cnj1[] = { static u_char ra5cnj1[] = {
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
0x01, _RA, R_MIZEN5, 0x01, _RA, R_MIZEN5,
0x01, _RI, R_RENYOU5, 0x01, _RI, R_RENYOU5,
@ -398,7 +398,7 @@ static Uchar ra5cnj1[] = {
0xff 0xff
}; };
static Uchar ra5cnj3[] = { static u_char ra5cnj3[] = {
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
0x01, _RA, R_MIZEN5, 0x01, _RA, R_MIZEN5,
0x01, _RI, R_RENYOU7, 0x01, _RI, R_RENYOU7,
@ -408,7 +408,7 @@ static Uchar ra5cnj3[] = {
0xff 0xff
}; };
static Uchar ra5cnj5[] = { static u_char ra5cnj5[] = {
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
0x01, _RA, R_MIZEN5, 0x01, _RA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -424,7 +424,7 @@ static Uchar ra5cnj5[] = {
0xff 0xff
}; };
static Uchar ra5cnj7[] = { static u_char ra5cnj7[] = {
0x01, _XTU, R_ONBIN2, 0x01, _XTU, R_ONBIN2,
0x01, _RA, R_MIZEN5, 0x01, _RA, R_MIZEN5,
0x11, _SA, R_MIZEN5, 0x11, _SA, R_MIZEN5,
@ -440,7 +440,7 @@ static Uchar ra5cnj7[] = {
0xff 0xff
}; };
static Uchar wa5cnj1[] = { static u_char wa5cnj1[] = {
0x01, _I, R_RENYOU5, 0x01, _I, R_RENYOU5,
0x01, _U, R_SHUUSI, 0x01, _U, R_SHUUSI,
0x01, _E, R_KAMEI, 0x01, _E, R_KAMEI,
@ -450,7 +450,7 @@ static Uchar wa5cnj1[] = {
0xff 0xff
}; };
static Uchar wa5cnj3[] = { static u_char wa5cnj3[] = {
0x01, _I, R_RENYOU7, 0x01, _I, R_RENYOU7,
0x01, _U, R_SHUUSI, 0x01, _U, R_SHUUSI,
0x01, _E, R_KAMEI, 0x01, _E, R_KAMEI,
@ -460,7 +460,7 @@ static Uchar wa5cnj3[] = {
0xff 0xff
}; };
static Uchar wa5cnj5[] = { static u_char wa5cnj5[] = {
0x01, _I, R_RENYOU5, 0x01, _I, R_RENYOU5,
0x01, _U, R_SHUUSI, 0x01, _U, R_SHUUSI,
0x01, _E, R_EXP, 0x01, _E, R_EXP,
@ -476,7 +476,7 @@ static Uchar wa5cnj5[] = {
0xff 0xff
}; };
static Uchar wa5cnj7[] = { static u_char wa5cnj7[] = {
0x01, _I, R_RENYOU7, 0x01, _I, R_RENYOU7,
0x01, _U, R_SHUUSI, 0x01, _U, R_SHUUSI,
0x01, _E, R_EXP, 0x01, _E, R_EXP,
@ -492,7 +492,7 @@ static Uchar wa5cnj7[] = {
0xff 0xff
}; };
static Uchar ichicnj1[] = { static u_char ichicnj1[] = {
0x00, R_RENYOU1, 0x00, R_RENYOU1,
0x01, _YO, R_MEIREI2, 0x01, _YO, R_MEIREI2,
0x01, _RU, R_SHUUSI, 0x01, _RU, R_SHUUSI,
@ -501,7 +501,7 @@ static Uchar ichicnj1[] = {
0xff 0xff
}; };
static Uchar ichicnj3[] = { static u_char ichicnj3[] = {
0x00, R_RENYOU3, 0x00, R_RENYOU3,
0x01, _YO, R_MEIREI2, 0x01, _YO, R_MEIREI2,
0x01, _RU, R_SHUUSI, 0x01, _RU, R_SHUUSI,
@ -510,7 +510,7 @@ static Uchar ichicnj3[] = {
0xff 0xff
}; };
static Uchar keiyou1[] = { static u_char keiyou1[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -521,7 +521,7 @@ static Uchar keiyou1[] = {
0xff 0xff
}; };
static Uchar keiyou2[] = { static u_char keiyou2[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -533,7 +533,7 @@ static Uchar keiyou2[] = {
0xff 0xff
}; };
static Uchar keiyou3[] = { static u_char keiyou3[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -556,7 +556,7 @@ static Uchar keiyou3[] = {
0xff 0xff
}; };
static Uchar keiyou4[] = { static u_char keiyou4[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -574,7 +574,7 @@ static Uchar keiyou4[] = {
0xff 0xff
}; };
static Uchar keiyou5[] = { static u_char keiyou5[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -603,7 +603,7 @@ static Uchar keiyou5[] = {
0xff 0xff
}; };
static Uchar keiyou6[] = { static u_char keiyou6[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -637,7 +637,7 @@ static Uchar keiyou6[] = {
0xff 0xff
}; };
static Uchar keiyou7[] = { static u_char keiyou7[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -677,7 +677,7 @@ static Uchar keiyou7[] = {
0xff 0xff
}; };
static Uchar keiyou8[] = { static u_char keiyou8[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -718,7 +718,7 @@ static Uchar keiyou8[] = {
0xff 0xff
}; };
static Uchar keiyou9[] = { static u_char keiyou9[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -747,7 +747,7 @@ static Uchar keiyou9[] = {
0xff 0xff
}; };
static Uchar keiyou10[] = { static u_char keiyou10[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -787,7 +787,7 @@ static Uchar keiyou10[] = {
0xff 0xff
}; };
static Uchar keiyou11[] = { static u_char keiyou11[] = {
0x80, R_KGOKAN, 0x80, R_KGOKAN,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -811,7 +811,7 @@ static Uchar keiyou11[] = {
0xff 0xff
}; };
static Uchar keidou1[] = { static u_char keidou1[] = {
0x80, R_DGOKAN, 0x80, R_DGOKAN,
0x01, _DA, R_DSHUUSI1, 0x01, _DA, R_DSHUUSI1,
0x11, _XTU, R_ONBIN1, 0x11, _XTU, R_ONBIN1,
@ -826,7 +826,7 @@ static Uchar keidou1[] = {
0xff 0xff
}; };
static Uchar keidou2[] = { static u_char keidou2[] = {
0x80, R_DGOKAN, 0x80, R_DGOKAN,
0x02, _TA, _RU, R_DRENTAI2, 0x02, _TA, _RU, R_DRENTAI2,
0x11, _RE, R_KATEI2, 0x11, _RE, R_KATEI2,
@ -834,7 +834,7 @@ static Uchar keidou2[] = {
0xff 0xff
}; };
static Uchar keidou4[] = { static u_char keidou4[] = {
0x80, R_DGOKAN, 0x80, R_DGOKAN,
0x01, _SA, R_FZKMEISI, 0x01, _SA, R_FZKMEISI,
0x01, _DA, R_DSHUUSI1, 0x01, _DA, R_DSHUUSI1,
@ -850,7 +850,7 @@ static Uchar keidou4[] = {
0xff 0xff
}; };
static Uchar keidou9[] = { static u_char keidou9[] = {
0x80, R_DGOKAN, 0x80, R_DGOKAN,
0x01, _DA, R_DSHUUSI1, 0x01, _DA, R_DSHUUSI1,
0x11, _XTU, R_ONBIN1, 0x11, _XTU, R_ONBIN1,
@ -867,7 +867,7 @@ static Uchar keidou9[] = {
0xff 0xff
}; };
static Uchar sahenmeisi1[] = { static u_char sahenmeisi1[] = {
0x00, R_SMEISI1, 0x00, R_SMEISI1,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -880,7 +880,7 @@ static Uchar sahenmeisi1[] = {
0xff 0xff
}; };
static Uchar sahenmeisi2[] = { static u_char sahenmeisi2[] = {
0x00, R_SMEISI1, 0x00, R_SMEISI1,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -893,7 +893,7 @@ static Uchar sahenmeisi2[] = {
0xff 0xff
}; };
static Uchar keidoumeisi[] = { static u_char keidoumeisi[] = {
0x00, R_DMEISI, 0x00, R_DMEISI,
0x01, _SA, R_FZKMEISI, 0x01, _SA, R_FZKMEISI,
0x01, _DA, R_DSHUUSI1, 0x01, _DA, R_DSHUUSI1,
@ -909,7 +909,7 @@ static Uchar keidoumeisi[] = {
0xff 0xff
}; };
static Uchar keiyoustb[] = { static u_char keiyoustb[] = {
0x00, R_KSTB, 0x00, R_KSTB,
0x01, _I, R_KSHUUSI, 0x01, _I, R_KSHUUSI,
0x02, _KA, _XTU, R_ONBIN1, 0x02, _KA, _XTU, R_ONBIN1,
@ -920,7 +920,7 @@ static Uchar keiyoustb[] = {
0xff 0xff
}; };
static Uchar ichistb[] = { static u_char ichistb[] = {
0x00, R_ICHISETUBI, 0x00, R_ICHISETUBI,
0x01, _YO, R_MEIREI2, 0x01, _YO, R_MEIREI2,
0x01, _RU, R_SHUUSI, 0x01, _RU, R_SHUUSI,
@ -929,7 +929,7 @@ static Uchar ichistb[] = {
0xff 0xff
}; };
static Uchar fukusi2[] = { static u_char fukusi2[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _TO, R_F_FUKUSI, 0x01, _TO, R_F_FUKUSI,
0x11, _SI, R_SI1, 0x11, _SI, R_SI1,
@ -937,7 +937,7 @@ static Uchar fukusi2[] = {
0xff 0xff
}; };
static Uchar fukusi3[] = { static u_char fukusi3[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -953,7 +953,7 @@ static Uchar fukusi3[] = {
0xff 0xff
}; };
static Uchar fukusi4[] = { static u_char fukusi4[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -966,25 +966,25 @@ static Uchar fukusi4[] = {
0xff 0xff
}; };
static Uchar fukusi5[] = { static u_char fukusi5[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _NI, R_F_FUKUSI, 0x01, _NI, R_F_FUKUSI,
0xff 0xff
}; };
static Uchar fukusi6[] = { static u_char fukusi6[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _MO, R_F_FUKUSI, 0x01, _MO, R_F_FUKUSI,
0xff 0xff
}; };
static Uchar fukusi7[] = { static u_char fukusi7[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _NO, R_F_FUKUSI, 0x01, _NO, R_F_FUKUSI,
0xff 0xff
}; };
static Uchar fukusi8[] = { static u_char fukusi8[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _DA, R_DSHUUSI1, 0x01, _DA, R_DSHUUSI1,
0x11, _XTU, R_ONBIN1, 0x11, _XTU, R_ONBIN1,
@ -998,7 +998,7 @@ static Uchar fukusi8[] = {
0xff 0xff
}; };
static Uchar fukusi9[] = { static u_char fukusi9[] = {
0x00, R_FUKUSI, 0x00, R_FUKUSI,
0x01, _SA, R_MIZEN1, 0x01, _SA, R_MIZEN1,
0x01, _SI, R_SI1, 0x01, _SI, R_SI1,
@ -1021,7 +1021,7 @@ static Uchar fukusi9[] = {
0xff 0xff
}; };
Uchar *conjadr[] = { u_char *conjadr[] = {
0, 0,
0, 0,
0, 0,

478
connect.c

File diff suppressed because it is too large Load diff

36
const.h
View file

@ -138,25 +138,25 @@
#define K_RENTAISI 5 #define K_RENTAISI 5
#define K_SONOTA 6 #define K_SONOTA 6
#define EUC_a1 (Uchar)0xa1 #define EUC_a1 (u_char)0xa1
#define EUC_a2 (Uchar)0xa2 #define EUC_a2 (u_char)0xa2
#define EUC_a3 (Uchar)0xa3 #define EUC_a3 (u_char)0xa3
#define EUC_a4 (Uchar)0xa4 #define EUC_a4 (u_char)0xa4
#define EUC_a5 (Uchar)0xa5 #define EUC_a5 (u_char)0xa5
#define EUC_START (Uchar)0xa1 #define EUC_START (u_char)0xa1
#define EUC_END (Uchar)0xfe #define EUC_END (u_char)0xfe
#define EUC_END_KIGOU (Uchar)0xae #define EUC_END_KIGOU (u_char)0xae
#define EUC_0 (Uchar)0xb0 #define EUC_0 (u_char)0xb0
#define EUC_END_0 (Uchar)0xb9 #define EUC_END_0 (u_char)0xb9
#define EUC_A (Uchar)0xc1 #define EUC_A (u_char)0xc1
#define EUC_END_A (Uchar)0xda #define EUC_END_A (u_char)0xda
#define EUC_a (Uchar)0xe1 #define EUC_a (u_char)0xe1
#define EUC_END_a (Uchar)0xfa #define EUC_END_a (u_char)0xfa
#define EUC_END_HIRA (Uchar)0xf3 #define EUC_END_HIRA (u_char)0xf3
#define EUC_VU (Uchar)0xf4 #define EUC_VU (u_char)0xf4
#define EUC_XKA (Uchar)0xf5 #define EUC_XKA (u_char)0xf5
#define EUC_XKE (Uchar)0xf6 #define EUC_XKE (u_char)0xf6
#define isknj1(c) (((c) == SS2) || (((c) & 0x80) && ((c) != SS3))) #define isknj1(c) (((c) == SS2) || (((c) & 0x80) && ((c) != SS3)))

View file

@ -41,14 +41,14 @@
Void cvtkouho(), setstyrec(); void cvtkouho(), setstyrec();
Void cvtclknj() void cvtclknj()
{ {
KHREC *krec; KHREC *krec;
Int i; int i;
@ -59,7 +59,7 @@ Void cvtclknj()
krec = kouhotbl; krec = kouhotbl;
while (i--) { while (i--) {
if ((Int)krec -> rank == (Int)selectid) break; if ((int)krec -> rank == (int)selectid) break;
krec++; krec++;
} }

View file

@ -46,14 +46,14 @@ void
cvtdict(KHREC *krec, CLREC *clrec, int flg) cvtdict(KHREC *krec, CLREC *clrec, int flg)
{ {
TypeDicOfs ofs; TypeDicOfs ofs;
Uchar *yptr; u_char *yptr;
Int jlen; int jlen;
Int stblen; int stblen;
Int sttlen; int sttlen;
Uchar *fptr; u_char *fptr;
Int cllen; int cllen;
JREC *jrec; JREC *jrec;
Int i, j; int i, j;
ofs = krec -> offs; ofs = krec -> offs;
@ -160,9 +160,9 @@ cvtdict(KHREC *krec, CLREC *clrec, int flg)
void void
cvtminasi(Int len) cvtminasi(int len)
{ {
Uchar *ptr; u_char *ptr;
ptr = inputyomi; ptr = inputyomi;
@ -189,10 +189,10 @@ cvtminasi(Int len)
void void
cvtwakachi(CLREC *clrec) cvtwakachi(CLREC *clrec)
{ {
Int jlen; int jlen;
Uchar *ym; u_char *ym;
Int cnt; int cnt;
Uchar ch; u_char ch;
ym = inputyomi; ym = inputyomi;

View file

@ -41,16 +41,16 @@
#include "kanakan.h" #include "kanakan.h"
Void mkknjmax(); void mkknjmax();
Void mvmemi(), free_clall(); void mvmemi(), free_clall();
Void free_jall(); void free_jall();
void void
cvtphknj (void) cvtphknj (void)
{ {
Int i, j; int i, j;
CLREC *clrec; CLREC *clrec;
CLREC *clkp; CLREC *clkp;
@ -93,8 +93,8 @@ cvtphknj (void)
ystart += clt1st -> cllen; ystart += clt1st -> cllen;
j = hzstrlen(inputyomi, (Int)clt1st -> cllen); j = hzstrlen(inputyomi, (int)clt1st -> cllen);
kanjibuf[0] = (Uchar)j; kanjibuf[0] = (u_char)j;
inputyomi += j; inputyomi += j;
@ -143,7 +143,7 @@ cvtkouho (KHREC *krec)
case C_BUNSETU : case C_BUNSETU :
case C_MINASI : case C_MINASI :
cvtminasi((Int)clrec -> cllen); cvtminasi((int)clrec -> cllen);
break; break;
case C_WAKACHI : case C_WAKACHI :
@ -162,8 +162,8 @@ setstyrec (KHREC *krec)
{ {
JREC *jrec; JREC *jrec;
KHREC *kptr; KHREC *kptr;
Int ii; int ii;
Uchar *fptr; u_char *fptr;
STDYOUT stdy; STDYOUT stdy;
jrec = krec -> clrec -> jnode; jrec = krec -> clrec -> jnode;
@ -207,7 +207,7 @@ setstyrec (KHREC *krec)
stdy.sttlen = 0; stdy.sttlen = 0;
memcpy((Uchar *)&stdy, kanjitmp, sizeof(STDYOUT)); memcpy((u_char *)&stdy, kanjitmp, sizeof(STDYOUT));
kanjitmp += sizeof(STDYOUT); kanjitmp += sizeof(STDYOUT);
} }

View file

@ -300,9 +300,9 @@ opendict(char* name, char* passwd)
} }
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__DragonFly__) #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__DragonFly__)
if ((dp = (Uchar *)malloc((long)sbuf.st_size)) == NULL) { if ((dp = (u_char *)malloc((long)sbuf.st_size)) == NULL) {
#else #else
if ((dp = (Uchar *)malloc(sbuf.st_size)) == NULL) { if ((dp = (u_char *)malloc(sbuf.st_size)) == NULL) {
#endif #endif
serv_errno = SJ3_NotEnoughMemory; goto error1; serv_errno = SJ3_NotEnoughMemory; goto error1;
} }
@ -437,7 +437,7 @@ openstdy(char* name, char* passwd)
StdyFile *sfp; StdyFile *sfp;
u_char *hd; u_char *hd;
STDYIN *sp; STDYIN *sp;
Ushort *cip; u_short *cip;
u_char *clp; u_char *clp;
long stdycnt, stdypos, stdylen, stdymax; long stdycnt, stdypos, stdylen, stdymax;
long clidxpos, clidxlen; long clidxpos, clidxlen;
@ -502,7 +502,7 @@ openstdy(char* name, char* passwd)
if ((sp = (STDYIN *)malloc(len)) == NULL) { if ((sp = (STDYIN *)malloc(len)) == NULL) {
serv_errno = SJ3_NotEnoughMemory; goto error2; serv_errno = SJ3_NotEnoughMemory; goto error2;
} }
if ((cip = (Ushort *)malloc(clidxlen)) == NULL) { if ((cip = (u_short *)malloc(clidxlen)) == NULL) {
serv_errno = SJ3_NotEnoughMemory; goto error3; serv_errno = SJ3_NotEnoughMemory; goto error3;
} }
if ((clp = (u_char *)malloc(clstdylen)) == NULL) { if ((clp = (u_char *)malloc(clstdylen)) == NULL) {
@ -711,7 +711,7 @@ makestdy(char* path, int stynum, int clstep, int cllen)
put4byte(tmp + VersionPos, StdyVersion); put4byte(tmp + VersionPos, StdyVersion);
j = 256 * sizeof(Ushort); j = 256 * sizeof(u_short);
put4byte(tmp + StdyClIdxPos, pos); put4byte(tmp + StdyClIdxPos, pos);
put4byte(tmp + StdyClIdxLen, j); put4byte(tmp + StdyClIdxLen, j);
put4byte(tmp + StdyClIdxStep, clstep); put4byte(tmp + StdyClIdxStep, clstep);

View file

@ -69,18 +69,18 @@ extern char *dict_dir;
extern int dir_mode; extern int dir_mode;
extern int file_mode; extern int file_mode;
static Uchar buf1[YomiBufSize]; static u_char buf1[YomiBufSize];
static Uchar buf2[YomiBufSize]; static u_char buf2[YomiBufSize];
static Uchar buf3[YomiBufSize]; static u_char buf3[YomiBufSize];
static Uchar buf4[YomiBufSize]; static u_char buf4[YomiBufSize];
static Uchar kbuf[KanjiBufSize]; static u_char kbuf[KanjiBufSize];
static Uchar skbuf[KanjiBufSize]; static u_char skbuf[KanjiBufSize];
static jmp_buf error_ret; static jmp_buf error_ret;
static WorkArea *worklist = NULL; static WorkArea *worklist = NULL;
static Client *cur_cli; static Client *cur_cli;
static Uchar defaultchar[2] = {(Uchar)0x81, (Uchar)0x40}; static u_char defaultchar[2] = {(u_char)0x81, (u_char)0x40};
static int defuse=0, defuse2=0; static int defuse=0, defuse2=0;
DictFile *opendict(); DictFile *opendict();
@ -88,7 +88,7 @@ int closedict();
StdyFile *openstdy(); StdyFile *openstdy();
int closestdy(); int closestdy();
Uchar *put_ndata(), *put_string(); u_char *put_ndata(), *put_string();
@ -488,7 +488,7 @@ void
exec_ph2knj (int mb_flag) exec_ph2knj (int mb_flag)
{ {
int i, j, l, stdy_size, buf_size, srchead = 0, srclen; int i, j, l, stdy_size, buf_size, srchead = 0, srclen;
Uchar *p,*q; u_char *p,*q;
i = get_nstring(buf1, sizeof(buf1)); i = get_nstring(buf1, sizeof(buf1));
@ -566,7 +566,7 @@ exec_cl2knj (int mb_flag)
{ {
int len, stdy_size, buf_size; int len, stdy_size, buf_size;
int i, j, l; int i, j, l;
Uchar *ptr, *q; u_char *ptr, *q;
len = get_int(); len = get_int();
i = get_nstring(buf1, sizeof(buf1)); i = get_nstring(buf1, sizeof(buf1));
@ -631,7 +631,7 @@ exec_nextcl (int mb_flag)
{ {
int mode, stdy_size, buf_size; int mode, stdy_size, buf_size;
int i, l; int i, l;
Uchar *ptr, *q; u_char *ptr, *q;
mode = get_int(); mode = get_int();
@ -684,7 +684,7 @@ exec_prevcl (int mb_flag)
{ {
int mode, stdy_size, buf_size; int mode, stdy_size, buf_size;
int i, l; int i, l;
Uchar *ptr, *q; u_char *ptr, *q;
mode = get_int(); mode = get_int();
@ -786,7 +786,7 @@ exec_cl2knj_all (int mb_flag)
{ {
int len, stdy_size, buf_size; int len, stdy_size, buf_size;
int i, l; int i, l;
Uchar *ptr, *q; u_char *ptr, *q;
len = get_int(); len = get_int();
i = get_nstring(buf1, sizeof(buf1)); i = get_nstring(buf1, sizeof(buf1));
@ -1084,7 +1084,7 @@ exec_getdict (int mb_flag)
TypeDicID dicid; TypeDicID dicid;
int err, buf_size, l; int err, buf_size, l;
DICTL *dl; DICTL *dl;
Uchar *ptr, *q; u_char *ptr, *q;
dicid = get_int(); dicid = get_int();
@ -1168,7 +1168,7 @@ exec_nextdict (int mb_flag)
TypeDicID dicid; TypeDicID dicid;
int err, buf_size, l; int err, buf_size, l;
DICTL *dl; DICTL *dl;
Uchar *ptr, *q; u_char *ptr, *q;
dicid = get_int(); dicid = get_int();
@ -1252,7 +1252,7 @@ exec_prevdict (int mb_flag)
TypeDicID dicid; TypeDicID dicid;
int err, buf_size, l; int err, buf_size, l;
DICTL *dl; DICTL *dl;
Uchar *ptr, *q; u_char *ptr, *q;
dicid = get_int(); dicid = get_int();

View file

@ -45,16 +45,16 @@
CLREC *argclrec(); CLREC *argclrec();
Int terminate(); int terminate();
Static Int fzkstrcmp(yptr, fzkp, saml) Static int fzkstrcmp(yptr, fzkp, saml)
Uchar *yptr; u_char *yptr;
Uchar TFar *fzkp; u_char *fzkp;
Int *saml; int *saml;
{ {
Int asklen, nkrlen; int asklen, nkrlen;
asklen = FzkAskLen(fzkp); asklen = FzkAskLen(fzkp);
@ -93,14 +93,14 @@ Int *saml;
Void setclrec(jrec, yptr, right) void setclrec(jrec, yptr, right)
JREC *jrec; JREC *jrec;
Uchar *yptr; u_char *yptr;
TypeCnct right; TypeCnct right;
{ {
CLREC *new; CLREC *new;
TypeGram hinsi; TypeGram hinsi;
Int len; int len;
if (!(len = yptr - cnvstart)) return; if (!(len = yptr - cnvstart)) return;
@ -181,11 +181,11 @@ TypeCnct right;
new -> kubun = K_TAIGEN; new -> kubun = K_TAIGEN;
} }
Static Int fzkcnct(right, left) Static int fzkcnct(right, left)
TypeCnct right; TypeCnct right;
TypeCnct left; TypeCnct left;
{ {
Uchar TFar *cncttbl; u_char *cncttbl;
if (right && left) { if (right && left) {
cncttbl = Rigtadr(right); cncttbl = Rigtadr(right);
@ -197,20 +197,19 @@ TypeCnct left;
return FALSE; return FALSE;
} }
RECURS void srchfzk(jrec, yptr, right, level)
Void srchfzk(jrec, yptr, right, level)
JREC *jrec; JREC *jrec;
Uchar *yptr; u_char *yptr;
TypeCnct right; TypeCnct right;
Int level; int level;
{ {
Uchar TFar *fzk; u_char *fzk;
Int len = 0; int len = 0;
Int cmp; int cmp;
Uchar *next; u_char *next;
FREC *fzkrec; FREC *fzkrec;
Int i; int i;
Int nlen; int nlen;
TypeCnct rt; TypeCnct rt;
if ((level >= MAXFLVL) && !(Chrtbl[*yptr] & FZK_KGU)) return; if ((level >= MAXFLVL) && !(Chrtbl[*yptr] & FZK_KGU)) return;

112
fzkyomi.c
View file

@ -42,13 +42,13 @@
#include "sj_right.h" #include "sj_right.h"
#include "sj_left.h" #include "sj_left.h"
static Uchar fzk_wo[] = { static u_char fzk_wo[] = {
(0<<5)+0, L_WO, R_WO, (0<<5)+0, L_WO, R_WO,
(0<<5)+0, L_WO_S, R_WO_S, (0<<5)+0, L_WO_S, R_WO_S,
0xff 0xff
}; };
static Uchar fzk_xtu[] = { static u_char fzk_xtu[] = {
(0<<5) + 1, _KE, L_KKE, R_SHUUJO, (0<<5) + 1, _KE, L_KKE, R_SHUUJO,
(0<<5) + 3, _TA,_XTU,_TE, L_TTATTE, R_TTATTE, (0<<5) + 3, _TA,_XTU,_TE, L_TTATTE, R_TTATTE,
(1<<5) + 1, _RA, L_TTARA, R_TTARA, (1<<5) + 1, _RA, L_TTARA, R_TTARA,
@ -69,7 +69,7 @@ static Uchar fzk_xtu[] = {
0xff 0xff
}; };
static Uchar fzk_a[] = { static u_char fzk_a[] = {
(0<<5) + 1, _GE, L_YOUGEN, R_AGE, (0<<5) + 1, _GE, L_YOUGEN, R_AGE,
(1<<5) + 1, _YO, L_YOUGEN, R_MEIREI2, (1<<5) + 1, _YO, L_YOUGEN, R_MEIREI2,
(1<<5) + 1, _RU, L_YOUGEN, R_SHUUSI, (1<<5) + 1, _RU, L_YOUGEN, R_SHUUSI,
@ -88,7 +88,7 @@ static Uchar fzk_a[] = {
0xff 0xff
}; };
static Uchar fzk_i[] = { static u_char fzk_i[] = {
(0<<5) + 0, L_IRU, R_I, (0<<5) + 0, L_IRU, R_I,
(0<<5) + 1, _I, L_II, R_SHUUSI, (0<<5) + 1, _I, L_II, R_SHUUSI,
(0<<5) + 1, _KA, L_YOUGEN, R_MIZEN5, (0<<5) + 1, _KA, L_YOUGEN, R_MIZEN5,
@ -111,21 +111,21 @@ static Uchar fzk_i[] = {
0xff 0xff
}; };
static Uchar fzk_u[] = { static u_char fzk_u[] = {
(0<<5) + 1, _E, L_UE, R_UE, (0<<5) + 1, _E, L_UE, R_UE,
(0<<5) + 1, _TI, L_UTI, R_UTI, (0<<5) + 1, _TI, L_UTI, R_UTI,
(0<<5) + 1, _RU, L_ERU, R_SHUUSI, (0<<5) + 1, _RU, L_ERU, R_SHUUSI,
0xff 0xff
}; };
static Uchar fzk_e[] = { static u_char fzk_e[] = {
(0<<5) + 0, L_ERU, R_E, (0<<5) + 0, L_ERU, R_E,
(0<<5) + 1, _RU, L_ERU, R_SHUUSI, (0<<5) + 1, _RU, L_ERU, R_SHUUSI,
(0<<5) + 1, _RE, L_ERU, R_KATEI3, (0<<5) + 1, _RE, L_ERU, R_KATEI3,
0xff 0xff
}; };
static Uchar fzk_o[] = { static u_char fzk_o[] = {
(0<<5) + 1, _I, L_YOUGEN, R_ONBIN8, (0<<5) + 1, _I, L_YOUGEN, R_ONBIN8,
(1<<5) + 1, _TE, L_OITE, R_OITE, (1<<5) + 1, _TE, L_OITE, R_OITE,
(0<<5) + 1, _KA, L_YOUGEN, R_MIZEN5, (0<<5) + 1, _KA, L_YOUGEN, R_MIZEN5,
@ -141,7 +141,7 @@ static Uchar fzk_o[] = {
0xff 0xff
}; };
static Uchar fzk_ka[] = { static u_char fzk_ka[] = {
(0<<5) + 0 + 8, L_KA1, R_KA1, (0<<5) + 0 + 8, L_KA1, R_KA1,
(0<<5) + 0 + 8, L_KA2, R_KA2, (0<<5) + 0 + 8, L_KA2, R_KA2,
(0<<5) + 1, _I, L_KAI, R_SHUUJO, (0<<5) + 1, _I, L_KAI, R_SHUUJO,
@ -166,7 +166,7 @@ static Uchar fzk_ka[] = {
0xff 0xff
}; };
static Uchar fzk_ga[] = { static u_char fzk_ga[] = {
(0<<5) + 0, L_GA1, R_GA1, (0<<5) + 0, L_GA1, R_GA1,
(0<<5) + 0, L_GA2, R_GA2, (0<<5) + 0, L_GA2, R_GA2,
(0<<5) + 2, _TA,_I, L_GATAI, R_KSHUUSI, (0<<5) + 2, _TA,_I, L_GATAI, R_KSHUUSI,
@ -186,13 +186,13 @@ static Uchar fzk_ga[] = {
0xff 0xff
}; };
static Uchar fzk_ki[] = { static u_char fzk_ki[] = {
(0<<5) + 0, L_YOUGEN, R_FZKKI, (0<<5) + 0, L_YOUGEN, R_FZKKI,
(0<<5) + 1, _RI, L_KIRI, R_KIRI, (0<<5) + 1, _RI, L_KIRI, R_KIRI,
0xff 0xff
}; };
static Uchar fzk_ku[] = { static u_char fzk_ku[] = {
(0<<5) + 2, _SE,_NI, L_KUSENI, R_KUSENI, (0<<5) + 2, _SE,_NI, L_KUSENI, R_KUSENI,
(0<<5) + 3, _DA,_SA,_I, L_KUDASARU, R_KUDASAI, (0<<5) + 3, _DA,_SA,_I, L_KUDASARU, R_KUDASAI,
(2<<5) + 1, _XTU, L_KUDASARU, R_ONBIN6, (2<<5) + 1, _XTU, L_KUDASARU, R_ONBIN6,
@ -208,13 +208,13 @@ static Uchar fzk_ku[] = {
0xff 0xff
}; };
static Uchar fzk_gu[] = { static u_char fzk_gu[] = {
(0<<5) + 2, _RA,_I, L_KURAI, R_KURAI, (0<<5) + 2, _RA,_I, L_KURAI, R_KURAI,
(0<<5) + 2, _RU,_MI, L_GURUMI, R_GURUMI, (0<<5) + 2, _RU,_MI, L_GURUMI, R_GURUMI,
0xff 0xff
}; };
static Uchar fzk_ke[] = { static u_char fzk_ke[] = {
(0<<5) + 1, _DO, L_KEDO, R_KEDO, (0<<5) + 1, _DO, L_KEDO, R_KEDO,
(1<<5) + 1, _MO, L_KEDO, R_KEDO, (1<<5) + 1, _MO, L_KEDO, R_KEDO,
(0<<5) + 2, _RE,_DO, L_KEDO, R_KEDO, (0<<5) + 2, _RE,_DO, L_KEDO, R_KEDO,
@ -222,7 +222,7 @@ static Uchar fzk_ke[] = {
0xff 0xff
}; };
static Uchar fzk_ko[] = { static u_char fzk_ko[] = {
(0<<5) + 0, L_YOUGEN, R_KO, (0<<5) + 0, L_YOUGEN, R_KO,
(0<<5) + 1, _I, L_YOUGEN, R_MEIREI1, (0<<5) + 1, _I, L_YOUGEN, R_MEIREI1,
(0<<5) + 1, _SO, L_KOSO, R_KOSO, (0<<5) + 1, _SO, L_KOSO, R_KOSO,
@ -230,7 +230,7 @@ static Uchar fzk_ko[] = {
0xff 0xff
}; };
static Uchar fzk_go[] = { static u_char fzk_go[] = {
(0<<5) + 2, _ZA,_I, L_GOZAI, R_GOZAI, (0<<5) + 2, _ZA,_I, L_GOZAI, R_GOZAI,
(0<<5) + 2, _TO,_KI, L_GOTOSI, R_GOTOKI, (0<<5) + 2, _TO,_KI, L_GOTOSI, R_GOTOKI,
(1<<5) + 1, _KU, L_GOTOSI, R_GOTOKU, (1<<5) + 1, _KU, L_GOTOSI, R_GOTOKU,
@ -238,7 +238,7 @@ static Uchar fzk_go[] = {
0xff 0xff
}; };
static Uchar fzk_sa[] = { static u_char fzk_sa[] = {
(0<<5) + 0, L_SA1, R_MIZEN1, (0<<5) + 0, L_SA1, R_MIZEN1,
(0<<5) + 0, L_SA2, R_SHUUJO, (0<<5) + 0, L_SA2, R_SHUUJO,
(0<<5) + 1, _E, L_SAE, R_SAE, (0<<5) + 1, _E, L_SAE, R_SAE,
@ -250,13 +250,13 @@ static Uchar fzk_sa[] = {
0xff 0xff
}; };
static Uchar fzk_za[] = { static u_char fzk_za[] = {
(0<<5) + 1, _RU, L_ZARU, R_ZARU, (0<<5) + 1, _RU, L_ZARU, R_ZARU,
(0<<5) + 1, _RE, L_ZARU, R_KATEI2, (0<<5) + 1, _RE, L_ZARU, R_KATEI2,
0xff 0xff
}; };
static Uchar fzk_si[] = { static u_char fzk_si[] = {
(0<<5) + 0, L_SI1, R_SI1, (0<<5) + 0, L_SI1, R_SI1,
(0<<5) + 0, L_SI2, R_SI2, (0<<5) + 0, L_SI2, R_SI2,
(0<<5) + 0, L_N_SI, R_N_SI, (0<<5) + 0, L_N_SI, R_N_SI,
@ -272,7 +272,7 @@ static Uchar fzk_si[] = {
0xff 0xff
}; };
static Uchar fzk_ji[] = { static u_char fzk_ji[] = {
(0<<5) + 2, _MA,_I, L_JIMAU, R_IKI, (0<<5) + 2, _MA,_I, L_JIMAU, R_IKI,
(1<<5) + 1, _U, L_JIMAU, R_SHUUSI, (1<<5) + 1, _U, L_JIMAU, R_SHUUSI,
(1<<5) + 1, _E, L_JIMAU, R_IKE, (1<<5) + 1, _E, L_JIMAU, R_IKE,
@ -289,7 +289,7 @@ static Uchar fzk_ji[] = {
0xff 0xff
}; };
static Uchar fzk_su[] = { static u_char fzk_su[] = {
(0<<5) + 1, _GI, L_SUGIRU, R_SUGI, (0<<5) + 1, _GI, L_SUGIRU, R_SUGI,
(1<<5) + 1, _RU, L_SUGIRU, R_SHUUSI, (1<<5) + 1, _RU, L_SUGIRU, R_SHUUSI,
(1<<5) + 1, _RE, L_SUGIRU, R_KATEI2, (1<<5) + 1, _RE, L_SUGIRU, R_KATEI2,
@ -303,7 +303,7 @@ static Uchar fzk_su[] = {
0xff 0xff
}; };
static Uchar fzk_zu[] = { static u_char fzk_zu[] = {
(0<<5) + 0, L_ZU, R_ZU, (0<<5) + 0, L_ZU, R_ZU,
(0<<5) + 1, _TU, L_ZUTU, R_ZUTU, (0<<5) + 1, _TU, L_ZUTU, R_ZUTU,
(0<<5) + 2, _NI,_I, L_ZU, R_I, (0<<5) + 2, _NI,_I, L_ZU, R_I,
@ -312,7 +312,7 @@ static Uchar fzk_zu[] = {
0xff 0xff
}; };
static Uchar fzk_se[] = { static u_char fzk_se[] = {
(0<<5) + 0, L_SE, R_MIZEN2, (0<<5) + 0, L_SE, R_MIZEN2,
(0<<5) + 0, L_SERU, R_SASE, (0<<5) + 0, L_SERU, R_SASE,
(0<<5) + 1, _YO, L_SEYO, R_MEIREI2, (0<<5) + 1, _YO, L_SEYO, R_MEIREI2,
@ -323,12 +323,12 @@ static Uchar fzk_se[] = {
0xff 0xff
}; };
static Uchar fzk_ze[] = { static u_char fzk_ze[] = {
(0<<5) + 0, L_ZE, R_SHUUJO, (0<<5) + 0, L_ZE, R_SHUUJO,
0xff 0xff
}; };
static Uchar fzk_so[] = { static u_char fzk_so[] = {
(0<<5) + 1, _U, L_SOUDA, R_SOU, (0<<5) + 1, _U, L_SOUDA, R_SOU,
(1<<5) + 1, _DA, L_SOUDA, R_SOUDA, (1<<5) + 1, _DA, L_SOUDA, R_SOUDA,
(2<<5) + 1, _XTU, L_YOUTAI, R_ONBIN1, (2<<5) + 1, _XTU, L_YOUTAI, R_ONBIN1,
@ -345,12 +345,12 @@ static Uchar fzk_so[] = {
0xff 0xff
}; };
static Uchar fzk_zo[] = { static u_char fzk_zo[] = {
(0<<5) + 0, L_ZO, R_SHUUJO, (0<<5) + 0, L_ZO, R_SHUUJO,
0xff 0xff
}; };
static Uchar fzk_ta[] = { static u_char fzk_ta[] = {
(0<<5) + 0, L_TA, R_TA, (0<<5) + 0, L_TA, R_TA,
(0<<5) + 1, _I, L_TAI, R_TAI, (0<<5) + 1, _I, L_TAI, R_TAI,
(0<<5) + 2, _KA,_XTU, L_TAI, R_ONBIN1, (0<<5) + 2, _KA,_XTU, L_TAI, R_ONBIN1,
@ -376,7 +376,7 @@ static Uchar fzk_ta[] = {
0xff 0xff
}; };
static Uchar fzk_da[] = { static u_char fzk_da[] = {
(0<<5) + 0, L_DA1, R_TA, (0<<5) + 0, L_DA1, R_TA,
(0<<5) + 0, L_DA2, R_DSHUUSI1, (0<<5) + 0, L_DA2, R_DSHUUSI1,
(0<<5) + 1, _KE, L_DAKE, R_DAKE, (0<<5) + 1, _KE, L_DAKE, R_DAKE,
@ -389,7 +389,7 @@ static Uchar fzk_da[] = {
0xff 0xff
}; };
static Uchar fzk_ti[] = { static u_char fzk_ti[] = {
(0<<5) + 2, _MA,_I, L_TIMAU, R_IKI, (0<<5) + 2, _MA,_I, L_TIMAU, R_IKI,
(1<<5) + 1, _U, L_TIMAU, R_SHUUSI, (1<<5) + 1, _U, L_TIMAU, R_SHUUSI,
(1<<5) + 1, _E, L_TIMAU, R_IKE, (1<<5) + 1, _E, L_TIMAU, R_IKE,
@ -406,12 +406,12 @@ static Uchar fzk_ti[] = {
0xff 0xff
}; };
static Uchar fzk_di[] = { static u_char fzk_di[] = {
(0<<5) + 1, _XYA, L_JYA, R_JYA, (0<<5) + 1, _XYA, L_JYA, R_JYA,
0xff 0xff
}; };
static Uchar fzk_tu[] = { static u_char fzk_tu[] = {
(0<<5) + 2, _I,_TE, L_TUITE, R_TUITE, (0<<5) + 2, _I,_TE, L_TUITE, R_TUITE,
(0<<5) + 1, _KI, L_TUKI, R_TUKI, (0<<5) + 1, _KI, L_TUKI, R_TUKI,
(0<<5) + 1, _TU, L_TUTU, R_TUTU, (0<<5) + 1, _TU, L_TUTU, R_TUTU,
@ -419,14 +419,14 @@ static Uchar fzk_tu[] = {
0xff 0xff
}; };
static Uchar fzk_te[] = { static u_char fzk_te[] = {
(0<<5) + 0, L_TE1, R_TE1, (0<<5) + 0, L_TE1, R_TE1,
(0<<5) + 0, L_TE2, R_TE2, (0<<5) + 0, L_TE2, R_TE2,
(0<<5) + 1, _RU, L_TERU, R_TERU, (0<<5) + 1, _RU, L_TERU, R_TERU,
0xff 0xff
}; };
static Uchar fzk_de[] = { static u_char fzk_de[] = {
(0<<5) + 0, L_DE, R_DE, (0<<5) + 0, L_DE, R_DE,
(0<<5) + 0, L_DA1, R_TE2, (0<<5) + 0, L_DA1, R_TE2,
(0<<5) + 3, _A,_RO,_U, L_DEAROU, R_AROU, (0<<5) + 3, _A,_RO,_U, L_DEAROU, R_AROU,
@ -442,7 +442,7 @@ static Uchar fzk_de[] = {
0xff 0xff
}; };
static Uchar fzk_to[] = { static u_char fzk_to[] = {
(0<<5) + 0, L_TO1, R_TO1, (0<<5) + 0, L_TO1, R_TO1,
(0<<5) + 0, L_TO2, R_TO2, (0<<5) + 0, L_TO2, R_TO2,
(0<<5) + 1, _I, L_TE2, R_ONBIN8, (0<<5) + 1, _I, L_TE2, R_ONBIN8,
@ -463,7 +463,7 @@ static Uchar fzk_to[] = {
0xff 0xff
}; };
static Uchar fzk_do[] = { static u_char fzk_do[] = {
(0<<5) + 0, L_DO, R_DO, (0<<5) + 0, L_DO, R_DO,
(0<<5) + 1, _I, L_DA1, R_ONBIN8, (0<<5) + 1, _I, L_DA1, R_ONBIN8,
(0<<5) + 2, _O,_RI, L_DOORI, R_DOORI, (0<<5) + 2, _O,_RI, L_DOORI, R_DOORI,
@ -478,7 +478,7 @@ static Uchar fzk_do[] = {
0xff 0xff
}; };
static Uchar fzk_na[] = { static u_char fzk_na[] = {
(0<<5) + 0, L_NA1, R_SHUUJO, (0<<5) + 0, L_NA1, R_SHUUJO,
(0<<5) + 0, L_NA2, R_NA2, (0<<5) + 0, L_NA2, R_NA2,
(0<<5) + 1, _XA, L_NAA, R_SHUUJO, (0<<5) + 1, _XA, L_NAA, R_SHUUJO,
@ -515,7 +515,7 @@ static Uchar fzk_na[] = {
0xff 0xff
}; };
static Uchar fzk_ni[] = { static u_char fzk_ni[] = {
(0<<5) + 0, L_NI1, R_NI1, (0<<5) + 0, L_NI1, R_NI1,
(0<<5) + 0, L_NI2, R_NI2, (0<<5) + 0, L_NI2, R_NI2,
(0<<5) + 0, L_NI3, R_NI3, (0<<5) + 0, L_NI3, R_NI3,
@ -531,19 +531,19 @@ static Uchar fzk_ni[] = {
0xff 0xff
}; };
static Uchar fzk_nu[] = { static u_char fzk_nu[] = {
(0<<5) + 0, L_NU, R_NU, (0<<5) + 0, L_NU, R_NU,
0xff 0xff
}; };
static Uchar fzk_ne[] = { static u_char fzk_ne[] = {
(0<<5) + 0, L_NE1, R_SHUUJO, (0<<5) + 0, L_NE1, R_SHUUJO,
(0<<5) + 0, L_NE2, R_KATEI2, (0<<5) + 0, L_NE2, R_KATEI2,
(0<<5) + 1, _E, L_NEE, R_SHUUJO, (0<<5) + 1, _E, L_NEE, R_SHUUJO,
0xff 0xff
}; };
static Uchar fzk_no[] = { static u_char fzk_no[] = {
(0<<5) + 0, L_NO1, R_NO1, (0<<5) + 0, L_NO1, R_NO1,
(0<<5) + 0, L_NO2, R_NO2, (0<<5) + 0, L_NO2, R_NO2,
(0<<5) + 1, _DE, L_NODE, R_NODE, (0<<5) + 1, _DE, L_NODE, R_NODE,
@ -553,14 +553,14 @@ static Uchar fzk_no[] = {
0xff 0xff
}; };
static Uchar fzk_ha[] = { static u_char fzk_ha[] = {
(0<<5) + 0, L_HA, R_HA, (0<<5) + 0, L_HA, R_HA,
(0<<5) + 1, _SI, L_HA, R_HASI, (0<<5) + 1, _SI, L_HA, R_HASI,
(0<<5) + 1, _ZU, L_HAZU, R_HAZU, (0<<5) + 1, _ZU, L_HAZU, R_HAZU,
0xff 0xff
}; };
static Uchar fzk_ba[] = { static u_char fzk_ba[] = {
(0<<5) + 0, L_BA, R_BA, (0<<5) + 0, L_BA, R_BA,
(0<<5) + 2, _KA,_SI, L_BAKARI, R_BAKARI, (0<<5) + 2, _KA,_SI, L_BAKARI, R_BAKARI,
(1<<5) + 1, _RI, L_BAKARI, R_BAKARI, (1<<5) + 1, _RI, L_BAKARI, R_BAKARI,
@ -569,7 +569,7 @@ static Uchar fzk_ba[] = {
0xff 0xff
}; };
static Uchar fzk_hu[] = { static u_char fzk_hu[] = {
(0<<5) + 2, _U,_DA, L_FUUDA, R_SOUDA, (0<<5) + 2, _U,_DA, L_FUUDA, R_SOUDA,
(2<<5) + 1, _XTU, L_FUUDA, R_ONBIN1, (2<<5) + 1, _XTU, L_FUUDA, R_ONBIN1,
(2<<5) + 2, _RO,_U, L_FUUDA, R_DAROU, (2<<5) + 2, _RO,_U, L_FUUDA, R_DAROU,
@ -584,12 +584,12 @@ static Uchar fzk_hu[] = {
0xff 0xff
}; };
static Uchar fzk_he[] = { static u_char fzk_he[] = {
(0<<5)+0, L_HE, R_HE, (0<<5)+0, L_HE, R_HE,
0xff 0xff
}; };
static Uchar fzk_be[] = { static u_char fzk_be[] = {
(0<<5) + 2, _KA,_RA, L_BESI, R_BEKARA, (0<<5) + 2, _KA,_RA, L_BESI, R_BEKARA,
(0<<5) + 1, _KI, L_BESI, R_BEKI, (0<<5) + 1, _KI, L_BESI, R_BEKI,
(0<<5) + 1, _KU, L_BESI, R_BEKU, (0<<5) + 1, _KU, L_BESI, R_BEKU,
@ -597,14 +597,14 @@ static Uchar fzk_be[] = {
0xff 0xff
}; };
static Uchar fzk_ho[] = { static u_char fzk_ho[] = {
(0<<5) + 1, _U, L_HOU, R_HOU, (0<<5) + 1, _U, L_HOU, R_HOU,
(0<<5) + 1, _KA, L_HOKA, R_HOKA, (0<<5) + 1, _KA, L_HOKA, R_HOKA,
(0<<5) + 1, _DO, L_HODO, R_HODO, (0<<5) + 1, _DO, L_HODO, R_HODO,
0xff 0xff
}; };
static Uchar fzk_ma[] = { static u_char fzk_ma[] = {
(0<<5) + 1, _I, L_MAI, R_MAI, (0<<5) + 1, _I, L_MAI, R_MAI,
(0<<5) + 1, _SI, L_MASU, R_DESHI, (0<<5) + 1, _SI, L_MASU, R_DESHI,
(1<<5) + 0, L_MASU, R_MEIREI2, (1<<5) + 0, L_MASU, R_MEIREI2,
@ -620,7 +620,7 @@ static Uchar fzk_ma[] = {
0xff 0xff
}; };
static Uchar fzk_mi[] = { static u_char fzk_mi[] = {
(0<<5) + 0, L_YOUGEN, R_MI, (0<<5) + 0, L_YOUGEN, R_MI,
(0<<5) + 2, _TA,_I, L_MITAIDA, R_MITAI, (0<<5) + 2, _TA,_I, L_MITAIDA, R_MITAI,
(2<<5) + 1, _DA, L_MITAIDA, R_MITAIDA, (2<<5) + 1, _DA, L_MITAIDA, R_MITAIDA,
@ -641,7 +641,7 @@ static Uchar fzk_mi[] = {
0xff 0xff
}; };
static Uchar fzk_mo[] = { static u_char fzk_mo[] = {
(0<<5) + 0, L_MO1, R_MO1, (0<<5) + 0, L_MO1, R_MO1,
(0<<5) + 0, L_MO2, R_MO2, (0<<5) + 0, L_MO2, R_MO2,
(0<<5) + 2, _XTU,_TE, L_MOTTE, R_MOTTE, (0<<5) + 2, _XTU,_TE, L_MOTTE, R_MOTTE,
@ -657,7 +657,7 @@ static Uchar fzk_mo[] = {
0xff 0xff
}; };
static Uchar fzk_ya[] = { static u_char fzk_ya[] = {
(0<<5) + 0, L_YA1, R_YA1, (0<<5) + 0, L_YA1, R_YA1,
(0<<5) + 0, L_YA2, R_YA2, (0<<5) + 0, L_YA2, R_YA2,
(0<<5) + 2, _SU,_I, L_YASUI, R_KSHUUSI, (0<<5) + 2, _SU,_I, L_YASUI, R_KSHUUSI,
@ -676,12 +676,12 @@ static Uchar fzk_ya[] = {
0xff 0xff
}; };
static Uchar fzk_yu[] = { static u_char fzk_yu[] = {
(0<<5) + 1, _E, L_YUE, R_YUE, (0<<5) + 1, _E, L_YUE, R_YUE,
0xff 0xff
}; };
static Uchar fzk_yo[] = { static u_char fzk_yo[] = {
(0<<5) + 0, L_YO, R_SHUUJO, (0<<5) + 0, L_YO, R_SHUUJO,
(0<<5) + 1, _I, L_YOI, R_KSHUUSI, (0<<5) + 1, _I, L_YOI, R_KSHUUSI,
(0<<5) + 1, _U, L_YOU, R_YOU1, (0<<5) + 1, _U, L_YOU, R_YOU1,
@ -714,7 +714,7 @@ static Uchar fzk_yo[] = {
0xff 0xff
}; };
static Uchar fzk_ra[] = { static u_char fzk_ra[] = {
(0<<5) + 2, _SI,_I, L_RASII, R_RASII, (0<<5) + 2, _SI,_I, L_RASII, R_RASII,
(1<<5) + 2, _KA,_XTU, L_RASII, R_ONBIN1, (1<<5) + 2, _KA,_XTU, L_RASII, R_ONBIN1,
(1<<5) + 1, _KI, L_RASII, R_GOTOKI, (1<<5) + 1, _KI, L_RASII, R_GOTOKI,
@ -728,7 +728,7 @@ static Uchar fzk_ra[] = {
0xff 0xff
}; };
static Uchar fzk_re[] = { static u_char fzk_re[] = {
(0<<5) + 0, L_RERU, R_RARE, (0<<5) + 0, L_RERU, R_RARE,
(0<<5) + 1, _YO, L_RERU, R_MEIREI2, (0<<5) + 1, _YO, L_RERU, R_MEIREI2,
(0<<5) + 1, _RU, L_RERU, R_SHUUSI, (0<<5) + 1, _RU, L_RERU, R_SHUUSI,
@ -737,7 +737,7 @@ static Uchar fzk_re[] = {
0xff 0xff
}; };
static Uchar fzk_wa[] = { static u_char fzk_wa[] = {
(0<<5) + 0, L_WA, R_SHUUJO, (0<<5) + 0, L_WA, R_SHUUJO,
(0<<5) + 1, _KE, L_WAKE, R_WAKE, (0<<5) + 1, _KE, L_WAKE, R_WAKE,
(0<<5) + 1, _NE, L_WANE, R_SHUUJO, (0<<5) + 1, _NE, L_WANE, R_SHUUJO,
@ -745,7 +745,7 @@ static Uchar fzk_wa[] = {
0xff 0xff
}; };
static Uchar fzk_nn[] = { static u_char fzk_nn[] = {
(0<<5) + 0, L_NN1, R_NN1, (0<<5) + 0, L_NN1, R_NN1,
(0<<5) + 0, L_NN2, R_NN2, (0<<5) + 0, L_NN2, R_NN2,
0xff 0xff
@ -753,7 +753,7 @@ static Uchar fzk_nn[] = {
Uchar *fzkadr[] = { u_char *fzkadr[] = {
0, fzk_a, 0, fzk_i, 0, 0, fzk_a, 0, fzk_i, 0,
fzk_u, 0, fzk_e, 0, fzk_o, fzk_u, 0, fzk_e, 0, fzk_o,
fzk_ka, fzk_ga, fzk_ki, 0, fzk_ku, fzk_ka, fzk_ga, fzk_ki, 0, fzk_ku,

View file

@ -62,7 +62,7 @@ setstynum (void)
{ {
KHREC *kptr; KHREC *kptr;
STDYIN *sptr; STDYIN *sptr;
Int count; int count;
for (kptr = kouhotbl, count = khcount ; count-- ; kptr++) { for (kptr = kouhotbl, count = khcount ; count-- ; kptr++) {
sptr = srchstdy(kptr -> clrec -> jnode -> jseg, kptr -> offs, sptr = srchstdy(kptr -> clrec -> jnode -> jseg, kptr -> offs,
@ -78,7 +78,7 @@ static void
setnspr (KHREC *kptr, STDYIN *sptr) setnspr (KHREC *kptr, STDYIN *sptr)
{ {
KHREC *ptr; KHREC *ptr;
Int keepnm; int keepnm;
TypeStyNum styno; TypeStyNum styno;
styno = kptr -> styno = sptr -> styno; styno = kptr -> styno = sptr -> styno;
@ -112,7 +112,7 @@ setnspr (KHREC *kptr, STDYIN *sptr)
} }
} }
kptr -> rank = (Uchar)keepnm; kptr -> rank = (u_char)keepnm;
trank++; trank++;
if (keepnm <= nrank) nrank++; if (keepnm <= nrank) nrank++;
if (sptr -> nmflg && (nrank > keepnm)) nrank = keepnm; if (sptr -> nmflg && (nrank > keepnm)) nrank = keepnm;
@ -124,8 +124,8 @@ static void
regetrank (void) regetrank (void)
{ {
KHREC *kptr; KHREC *kptr;
Int count; int count;
Int tmp; int tmp;
if (nrank < trank) { if (nrank < trank) {
tmp = nrank; tmp = nrank;
@ -138,12 +138,12 @@ regetrank (void)
for (count = khcount, kptr = kouhotbl ; count-- ; kptr++) { for (count = khcount, kptr = kouhotbl ; count-- ; kptr++) {
if (!(kptr -> rank)) { if (!(kptr -> rank)) {
if (tmp && kptr -> mode && !(kptr -> offs)) { if (tmp && kptr -> mode && !(kptr -> offs)) {
kptr -> rank = (Uchar)tmp++; kptr -> rank = (u_char)tmp++;
} }
else else
kptr -> rank = (Uchar)trank++; kptr -> rank = (u_char)trank++;
} }
else if ((Short)kptr -> rank >= nrank) else if ((short)kptr -> rank >= nrank)
kptr -> rank += (Uchar)nkhcount; kptr -> rank += (u_char)nkhcount;
} }
} }

View file

@ -43,8 +43,8 @@
#include "sj_dict.h" #include "sj_dict.h"
#include "kanakan.h" #include "kanakan.h"
Int int
euc_codesize (Uchar c) euc_codesize (u_char c)
{ {
if ((c & KanjiModeMask) == 0x90) { if ((c & KanjiModeMask) == 0x90) {
return 1; return 1;
@ -57,10 +57,10 @@ euc_codesize (Uchar c)
} }
} }
Int int
hzstrlen (Uchar *ptr, Int len) hzstrlen (u_char *ptr, int len)
{ {
Uchar *head; u_char *head;
head = ptr; head = ptr;
while (len-- > 0) ptr += euc_codesize(*ptr); while (len-- > 0) ptr += euc_codesize(*ptr);
return (ptr - head); return (ptr - head);

12
init.c
View file

@ -37,11 +37,11 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
Void seg_count(dict) void seg_count(dict)
DICT *dict; DICT *dict;
{ {
Uchar *p; u_char *p;
Uchar *q; u_char *q;
TypeDicSeg segcnt = 0; TypeDicSeg segcnt = 0;
if (dict-> getidx) { if (dict-> getidx) {
@ -58,10 +58,10 @@ DICT *dict;
dict->segunit = (segcnt == 0) ? 1 : segcnt; dict->segunit = (segcnt == 0) ? 1 : segcnt;
} }
Void mkidxtbl(dict) void mkidxtbl(dict)
DICT *dict; DICT *dict;
{ {
Uchar *p; u_char *p;
TypeDicSeg seg; TypeDicSeg seg;
if (!dict->getidx || !dict->getofs) return; if (!dict->getidx || !dict->getofs) return;
@ -78,7 +78,7 @@ DICT *dict;
} }
} }
Void initwork() void initwork()
{ {
jrt1st = jrt2nd = maxjptr = (JREC *)0; jrt1st = jrt2nd = maxjptr = (JREC *)0;
clt1st = clt2nd = maxclptr = (CLREC *)0; clt1st = clt2nd = maxclptr = (CLREC *)0;

View file

@ -33,8 +33,8 @@
#include "const.h" #include "const.h"
#include "sj_typedef.h" #include "sj_typedef.h"
Int int
istrcmp(Uchar *yomip, Uchar *idxp, Int ylen, Int ilen) istrcmp(u_char *yomip, u_char *idxp, int ylen, int ilen)
{ {
while (1) { while (1) {
if ((ilen | ylen) == 0) if ((ilen | ylen) == 0)

View file

@ -37,7 +37,7 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
Void free_jrec(), free_clrec(); void free_jrec(), free_clrec();
JREC *free_jlst(p) JREC *free_jlst(p)
JREC *p; JREC *p;
@ -72,12 +72,12 @@ JREC *p;
CLREC *free_clst(p, l) CLREC *free_clst(p, l)
CLREC *p; CLREC *p;
Int l; int l;
{ {
CLREC *cpk; CLREC *cpk;
CLREC *cp; CLREC *cp;
CLREC *cn; CLREC *cn;
Int i = FALSE; int i = FALSE;
cp = cpk = NULL; cp = cpk = NULL;
@ -85,7 +85,7 @@ Int l;
cn = p -> clsort; cn = p -> clsort;
if ((Int)p -> cllen == l) { if ((int)p -> cllen == l) {
if (p == selcl) { if (p == selcl) {
if (cp) { if (cp) {
p -> clsort = cpk; p -> clsort = cpk;
@ -115,7 +115,7 @@ Int l;
return cpk; return cpk;
} }
Void free_clall(p) void free_clall(p)
CLREC *p; CLREC *p;
{ {
CLREC *next; CLREC *next;
@ -128,7 +128,7 @@ CLREC *p;
} }
} }
Void free_jall(p) void free_jall(p)
JREC *p; JREC *p;
{ {
JREC *next; JREC *next;
@ -140,7 +140,7 @@ JREC *p;
} }
} }
Void freework() void freework()
{ {
free_clall(maxclptr); free_clall(maxclptr);
clt1st = maxclptr = NULL; clt1st = maxclptr = NULL;

View file

@ -38,11 +38,11 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "sj_right.h" #include "sj_right.h"
Int terminate(), priority(); int terminate(), priority();
Void mkjiritu(), mkbunsetu(), wakachi(), pritiny(); void mkjiritu(), mkbunsetu(), wakachi(), pritiny();
Void free_clall(), free_jall(); void free_clall(), free_jall();
Static Int set2nd(clrec) Static int set2nd(clrec)
CLREC *clrec; CLREC *clrec;
{ {
@ -65,17 +65,17 @@ CLREC *clrec;
return rec2 ? (clrec -> cllen + rec2 -> cllen) : (clrec -> cllen); return rec2 ? (clrec -> cllen + rec2 -> cllen) : (clrec -> cllen);
} }
Void mk2claus() void mk2claus()
{ {
Uchar *keepptr; u_char *keepptr;
Int keeplen; int keeplen;
CLREC *clrec; CLREC *clrec;
Int len; int len;
Int save2ln; int save2ln;
Int prty; int prty;
Int maxprty; int maxprty;
Int count; int count;
Int prty2; int prty2;
prty = maxprty = prty2 = 0; prty = maxprty = prty2 = 0;
@ -117,9 +117,9 @@ Void mk2claus()
} }
if (Termtbl[clrec -> right] & T_SHUUJO) if (Termtbl[clrec -> right] & T_SHUUJO)
clrec -> cl2len = (Uchar)len; clrec -> cl2len = (u_char)len;
else else
clrec -> cl2len = (Uchar)save2ln; clrec -> cl2len = (u_char)save2ln;
if (selcl -> cl2len > clrec -> cl2len) continue; if (selcl -> cl2len > clrec -> cl2len) continue;

View file

@ -42,8 +42,8 @@
#include "sj_hinsi.h" #include "sj_hinsi.h"
#include "kanakan.h" #include "kanakan.h"
Int terminate(); int terminate();
Void setclrec(), srchfzk(); void setclrec(), srchfzk();
void void
mkbunsetu(void) mkbunsetu(void)

View file

@ -41,7 +41,7 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "kanakan.h" #include "kanakan.h"
Int srchhead(); int srchhead();
static void dic_mu(int mode); static void dic_mu(int mode);
static void dic_cl(void); static void dic_cl(void);
@ -176,7 +176,7 @@ dic_cl(void)
if (!StudyExist()) return; if (!StudyExist()) return;
if ((pos = ClStudyIdx[(Short) *cnvstart / ClStudyStep]) != (u_short)-1) { if ((pos = ClStudyIdx[(short) *cnvstart / ClStudyStep]) != (u_short)-1) {
for (p = ClStudyDict + pos ; !iseocl(p) ; p = ClNextTag(p)) { for (p = ClStudyDict + pos ; !iseocl(p) ; p = ClNextTag(p)) {
cmp = strncmp(cnvstart, (u_char*)ClYomiPos(p), cmp = strncmp(cnvstart, (u_char*)ClYomiPos(p),

View file

@ -38,10 +38,10 @@
#include "sj_rename.h" #include "sj_rename.h"
#include "sj_typedef.h" #include "sj_typedef.h"
Void mvmemd(src, dest, len) void mvmemd(src, dest, len)
Uchar *src; u_char *src;
Uchar *dest; u_char *dest;
Int len; int len;
{ {
while (len-- > 0) *(--dest) = *(--src); while (len-- > 0) *(--dest) = *(--src);
} }

View file

@ -38,10 +38,10 @@
#include "sj_rename.h" #include "sj_rename.h"
#include "sj_typedef.h" #include "sj_typedef.h"
Void mvmemi(src, dest, len) void mvmemi(src, dest, len)
Uchar *src; u_char *src;
Uchar *dest; u_char *dest;
Int len; int len;
{ {
while (len-- > 0) *dest++ = *src++; while (len-- > 0) *dest++ = *src++;
} }

View file

@ -41,26 +41,26 @@
#include "kanakan.h" #include "kanakan.h"
Uchar *skiphblk(); u_char *skiphblk();
static void add_yomi (void); static void add_yomi (void);
static void cd2sjh_chr (Uchar ch, Uchar *dst); static void cd2sjh_chr (u_char ch, u_char *dst);
static Int next_douon (void); static int next_douon (void);
static Int next_hinsi (void); static int next_hinsi (void);
static Int next_kanji (void); static int next_kanji (void);
static Int prev_douon (void); static int prev_douon (void);
static Int prev_hinsi (void); static int prev_hinsi (void);
static Int prev_kanji (void); static int prev_kanji (void);
static void set_buf (Uchar *buf); static void set_buf (u_char *buf);
static void set_idxyomi (void); static void set_idxyomi (void);
static void set_kanji (void); static void set_kanji (void);
Int int
getusr (Uchar *buf) getusr (u_char *buf)
{ {
Int nlen; int nlen;
peepyomi[0] = peepknj[0] = peepgrm = 0; peepyomi[0] = peepknj[0] = peepgrm = 0;
@ -89,8 +89,8 @@ getusr (Uchar *buf)
Int int
nextusr (Uchar *buf) nextusr (u_char *buf)
{ {
(*curdict->getdic)(curdict, peepidx); (*curdict->getdic)(curdict, peepidx);
get_askknj(); get_askknj();
@ -106,8 +106,8 @@ nextusr (Uchar *buf)
Int int
prevusr (Uchar *buf) prevusr (u_char *buf)
{ {
(*curdict->getdic)(curdict, peepidx); (*curdict->getdic)(curdict, peepidx);
get_askknj(); get_askknj();
@ -126,7 +126,7 @@ prevusr (Uchar *buf)
static void static void
set_kanji (void) set_kanji (void)
{ {
Int len; int len;
len = getkanji(peepyomi, getnlen(peepdptr) + getplen(peepdptr), len = getkanji(peepyomi, getnlen(peepdptr) + getplen(peepdptr),
peepkptr, peepknj); peepkptr, peepknj);
@ -136,10 +136,10 @@ set_kanji (void)
static void static void
set_buf (Uchar *buf) set_buf (u_char *buf)
{ {
Uchar *p; u_char *p;
Int i, csize; int i, csize;
for (p = peepyomi ; *p ; ) *buf++ = *p++; for (p = peepyomi ; *p ; ) *buf++ = *p++;
*buf++ = 0; *buf++ = 0;
@ -156,11 +156,11 @@ set_buf (Uchar *buf)
static Int static int
prev_kanji (void) prev_kanji (void)
{ {
Uchar *p1; u_char *p1;
Uchar *p2; u_char *p2;
p1 = peephptr + 1; p1 = peephptr + 1;
if (peepkptr <= p1) return prev_hinsi(); if (peepkptr <= p1) return prev_hinsi();
@ -176,12 +176,12 @@ prev_kanji (void)
static Int static int
prev_hinsi (void) prev_hinsi (void)
{ {
Uchar *p1; u_char *p1;
Uchar *p2; u_char *p2;
Int nlen; int nlen;
nlen = getnlen(peepdptr); nlen = getnlen(peepdptr);
p1 = peepdptr + DouonBlkSizeNumber + nlen; p1 = peepdptr + DouonBlkSizeNumber + nlen;
@ -207,12 +207,12 @@ prev_hinsi (void)
static Int static int
prev_douon (void) prev_douon (void)
{ {
Uchar *p1; u_char *p1;
Uchar *p2; u_char *p2;
Int nlen; int nlen;
if (peepdptr <= segtop()) { if (peepdptr <= segtop()) {
if (peepidx <= DicSegBase) return 0; if (peepidx <= DicSegBase) return 0;
@ -263,10 +263,10 @@ prev_douon (void)
static Int static int
next_kanji (void) next_kanji (void)
{ {
Uchar *p1; u_char *p1;
p1 = skipkstr(peepkptr); p1 = skipkstr(peepkptr);
if (*p1 == HinsiBlkTerm) return next_hinsi(); if (*p1 == HinsiBlkTerm) return next_hinsi();
@ -276,10 +276,10 @@ next_kanji (void)
static Int static int
next_hinsi (void) next_hinsi (void)
{ {
Uchar *p1; u_char *p1;
p1 = skiphblk(peephptr); p1 = skiphblk(peephptr);
if (p1 >= getntag(peepdptr)) return next_douon(); if (p1 >= getntag(peepdptr)) return next_douon();
@ -291,11 +291,11 @@ next_hinsi (void)
static Int static int
next_douon (void) next_douon (void)
{ {
Uchar *p1; u_char *p1;
Int nlen; int nlen;
p1 = getntag(peepdptr); p1 = getntag(peepdptr);
@ -331,7 +331,7 @@ next_douon (void)
static void static void
set_idxyomi (void) set_idxyomi (void)
{ {
Uchar *p1, *p2; u_char *p1, *p2;
if ((p2 = get_idxptr(peepidx)) != NULL) { if ((p2 = get_idxptr(peepidx)) != NULL) {
p1 = peepyomi; p1 = peepyomi;
@ -348,8 +348,8 @@ set_idxyomi (void)
static void static void
add_yomi (void) add_yomi (void)
{ {
Int nlen; int nlen;
Uchar *p1, *p2; u_char *p1, *p2;
nlen = getnlen(peepdptr); nlen = getnlen(peepdptr);
p1 = peepyomi + getplen(peepdptr) * 2; p1 = peepyomi + getplen(peepdptr) * 2;
@ -366,7 +366,7 @@ add_yomi (void)
static void static void
cd2sjh_chr (Uchar ch, Uchar *dst) cd2sjh_chr (u_char ch, u_char *dst)
{ {
if (ch == _TYOUON) { if (ch == _TYOUON) {
*dst++ = 0xa1; *dst++ = 0xa1;

View file

@ -42,21 +42,21 @@
#include "kanakan.h" #include "kanakan.h"
Int sj2cd_chr(); int sj2cd_chr();
void mk2claus(); void mk2claus();
Void freework(); void freework();
Void selclrec(); void selclrec();
CLREC *free_clst(); CLREC *free_clst();
JREC *free_jlst(); JREC *free_jlst();
Int ph2knj int ph2knj
(Uchar *zyomi, Uchar *kanji, Int knjlen) (u_char *zyomi, u_char *kanji, int knjlen)
{ {
Uchar *ptr; u_char *ptr;
Uchar *dst; u_char *dst;
Int i; int i;
for (ptr = zyomi, dst = hyomi, i = 0 ; *ptr ; ) { for (ptr = zyomi, dst = hyomi, i = 0 ; *ptr ; ) {
if (i++ >= MaxPhInputLen) { *kanji = 0; return 0; } if (i++ >= MaxPhInputLen) { *kanji = 0; return 0; }
@ -94,7 +94,7 @@ Int ph2knj
prevclgrm = selcl -> jnode -> hinsi; prevclgrm = selcl -> jnode -> hinsi;
prevclrow = selcl -> right; prevclrow = selcl -> right;
clt1st = free_clst(clt1st, (Int)selcl -> cllen); clt1st = free_clst(clt1st, (int)selcl -> cllen);
jrt1st = free_jlst(jrt1st); jrt1st = free_jlst(jrt1st);
cnvstart += selcl -> cllen; cnvstart += selcl -> cllen;

View file

@ -46,7 +46,7 @@ ph_setsty (CLREC *clrec)
{ {
JREC *jrec; JREC *jrec;
TypeDicOfs offset; TypeDicOfs offset;
Uchar *ptr; u_char *ptr;
STDYIN *sptr; STDYIN *sptr;
if (!seldict((jrec = clrec -> jnode) -> dicid)) { if (!seldict((jrec = clrec -> jnode) -> dicid)) {
@ -83,11 +83,11 @@ ph_setsty (CLREC *clrec)
Int int
ph_khtbl (CLREC *clrec) ph_khtbl (CLREC *clrec)
{ {
JREC *jrec; JREC *jrec;
Int flg = FALSE; int flg = FALSE;
switch((jrec = clrec -> jnode) -> class) { switch((jrec = clrec -> jnode) -> class) {
case C_DICT: case C_DICT:

View file

@ -40,7 +40,7 @@
#include "sj_right.h" #include "sj_right.h"
#include "sj_prty.h" #include "sj_prty.h"
Static Int isfukusi(hinsi) Static int isfukusi(hinsi)
TypeGram hinsi; TypeGram hinsi;
{ {
if (FUKUSI_1 <= hinsi && hinsi <= FUKUSI_7) if (FUKUSI_1 <= hinsi && hinsi <= FUKUSI_7)
@ -50,7 +50,7 @@ TypeGram hinsi;
return FALSE; return FALSE;
} }
Static Int istaigen(right) Static int istaigen(right)
TypeCnct right; TypeCnct right;
{ {
if (right == R_MEISI || right == R_DMEISI || right == R_SMEISI1) if (right == R_MEISI || right == R_DMEISI || right == R_SMEISI1)
@ -62,7 +62,7 @@ TypeCnct right;
return FALSE; return FALSE;
} }
Static Int taicnt(hinsi1, hinsi2) Static int taicnt(hinsi1, hinsi2)
TypeGram hinsi1; TypeGram hinsi1;
TypeGram hinsi2; TypeGram hinsi2;
{ {
@ -91,7 +91,7 @@ TypeGram hinsi2;
} }
} }
Static Int sttcnt(hinsi1, hinsi2) Static int sttcnt(hinsi1, hinsi2)
TypeGram hinsi1; TypeGram hinsi1;
TypeGram hinsi2; TypeGram hinsi2;
{ {
@ -102,15 +102,15 @@ TypeGram hinsi2;
return 4; return 4;
} }
Int priority(clrec) int priority(clrec)
CLREC *clrec; CLREC *clrec;
{ {
int prty; int prty;
CLREC *cl2rec; CLREC *cl2rec;
Int keeplen; int keeplen;
TypeGram hinsi1; TypeGram hinsi1;
Int i; int i;
Int prev = 0; int prev = 0;
if (clrec->cllen == clrec->cl2len) return 0xff; if (clrec->cllen == clrec->cl2len) return 0xff;
@ -155,7 +155,7 @@ CLREC *clrec;
if (clrec->right == R_WO || clrec->right == R_WO_S || if (clrec->right == R_WO || clrec->right == R_WO_S ||
clrec->right == R_NI1 || clrec->right == R_DRENYOU2) { clrec->right == R_NI1 || clrec->right == R_DRENYOU2) {
while (cl2rec && (Int)cl2rec->cllen == keeplen) { while (cl2rec && (int)cl2rec->cllen == keeplen) {
if (cl2rec->kubun == K_DOUSHI) { if (cl2rec->kubun == K_DOUSHI) {
prty = 14; prty = 14;
goto finish; goto finish;
@ -166,7 +166,7 @@ CLREC *clrec;
else if (clrec->right == R_SETTOU) { else if (clrec->right == R_SETTOU) {
prty = 0; prty = 0;
while (cl2rec && (Int)cl2rec -> cllen == keeplen) { while (cl2rec && (int)cl2rec -> cllen == keeplen) {
if (cl2rec -> jnode -> sttofs ) if (cl2rec -> jnode -> sttofs )
i = 2; i = 2;
else else
@ -181,7 +181,7 @@ CLREC *clrec;
else if (istaigen(clrec->right)) { else if (istaigen(clrec->right)) {
prty = 0; prty = 0;
while (cl2rec && (Int)cl2rec->cllen == keeplen) { while (cl2rec && (int)cl2rec->cllen == keeplen) {
i = taicnt(hinsi1, cl2rec->jnode->hinsi); i = taicnt(hinsi1, cl2rec->jnode->hinsi);
if (i > prty) if (i > prty)
prty = i; prty = i;
@ -198,7 +198,7 @@ CLREC *clrec;
if (prty & RENTAI) { if (prty & RENTAI) {
while (cl2rec && (Int)cl2rec->cllen == keeplen) { while (cl2rec && (int)cl2rec->cllen == keeplen) {
if (cl2rec -> kubun == K_TAIGEN) { if (cl2rec -> kubun == K_TAIGEN) {
prty &= GETPRI; prty &= GETPRI;
goto finish; goto finish;
@ -213,7 +213,7 @@ CLREC *clrec;
if (prty == P_RENYOU_J || prty == P_RENYOU_M ) { if (prty == P_RENYOU_J || prty == P_RENYOU_M ) {
while (clrec->cllen != 1 && cl2rec && while (clrec->cllen != 1 && cl2rec &&
(Int)cl2rec->cllen == keeplen ) { (int)cl2rec->cllen == keeplen ) {
if (cl2rec->kubun == K_DOUSHI) { if (cl2rec->kubun == K_DOUSHI) {
prty = 6; prty = 6;
goto finish; goto finish;
@ -251,17 +251,17 @@ finish:
} }
Void pritiny() void pritiny()
{ {
CLREC *clrec; CLREC *clrec;
Int keeplen; int keeplen;
int i, prty = 0; int i, prty = 0;
clrec = selcl; clrec = selcl;
keeplen = clrec -> cllen; keeplen = clrec -> cllen;
if (istaigen(prevclrow)) { if (istaigen(prevclrow)) {
while (clrec && (Int)clrec -> cllen == keeplen) { while (clrec && (int)clrec -> cllen == keeplen) {
i = taicnt(prevclgrm, clrec -> jnode -> hinsi); i = taicnt(prevclgrm, clrec -> jnode -> hinsi);
if (i > prty) { if (i > prty) {
selcl = clrec; selcl = clrec;
@ -273,7 +273,7 @@ Void pritiny()
else { else {
while (clrec && (Int)clrec -> cllen == keeplen) { while (clrec && (int)clrec -> cllen == keeplen) {
if (clrec -> jnode -> hinsi >= MYOUJI && if (clrec -> jnode -> hinsi >= MYOUJI &&
clrec -> jnode -> hinsi <= KEN_KU) clrec -> jnode -> hinsi <= KEN_KU)
clrec = clrec -> clsort; clrec = clrec -> clsort;

View file

@ -38,7 +38,7 @@
#include "sj_rename.h" #include "sj_rename.h"
#include "sj_typedef.h" #include "sj_typedef.h"
Uchar taipri[7][45] = { u_char taipri[7][45] = {
{ 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, { 0, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 3, 3, 3, 3, 3, 3, 0, 0, 4, 4, 3, 3, 3, 3, 3, 3, 0, 0,
@ -78,7 +78,7 @@ Uchar taipri[7][45] = {
Uchar sttpri[5][31] = { u_char sttpri[5][31] = {
{ 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, { 0, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 2, 4, 4, 4, 4, 4, 0, 0, 7, 7, 2, 4, 4, 4, 4, 4, 0, 0,

View file

@ -39,7 +39,7 @@
#include "sj_typedef.h" #include "sj_typedef.h"
#include "sj_yomi.h" #include "sj_yomi.h"
Uchar kigou[] = { u_char kigou[] = {
Y_L_KAKKO, Y_L_KAKKO,
Y_KUTEN, Y_KUTEN,
Y_TOUTEN, Y_TOUTEN,

View file

@ -41,14 +41,14 @@
Void free_clall(), free_jall(), mkjiritu(), mkbunsetu(); void free_clall(), free_jall(), mkjiritu(), mkbunsetu();
Void wakachi(); void wakachi();
Void selclrec() void selclrec()
{ {
Int len; int len;
CLREC *rec; CLREC *rec;
@ -96,8 +96,8 @@ Void selclrec()
if (rec == NULL) { if (rec == NULL) {
Int klen; int klen;
Uchar ch; u_char ch;
free_clall(clt1st); free_clall(clt1st);

View file

@ -32,7 +32,7 @@
#include "const.h" #include "const.h"
#include "sj_suuji.h" #include "sj_suuji.h"
static Ushort selsjAR[] = { static u_short selsjAR[] = {
SelArb0, SelArb0,
SelArbCma | JFLAG_NK4 | JFLAG_NN0, SelArbCma | JFLAG_NK4 | JFLAG_NN0,
SelKanSjYm | JFLAG_NN0, SelKanSjYm | JFLAG_NN0,
@ -41,7 +41,7 @@ static Ushort selsjAR[] = {
SelNumTerm SelNumTerm
}; };
static Ushort selsjARCM[] = { static u_short selsjARCM[] = {
SelArbCma | JFLAG_NK4 | JFLAG_NN0, SelArbCma | JFLAG_NK4 | JFLAG_NN0,
SelArb0, SelArb0,
SelKanSjYm | JFLAG_NN0, SelKanSjYm | JFLAG_NN0,
@ -50,7 +50,7 @@ static Ushort selsjARCM[] = {
SelNumTerm SelNumTerm
}; };
static Ushort selsjKAZU[] = { static u_short selsjKAZU[] = {
SelKanSjYm | JFLAG_NN0, SelKanSjYm | JFLAG_NN0,
SelKanSjYm2 | SelNum1_23_10_1 | JFLAG_NN0, SelKanSjYm2 | SelNum1_23_10_1 | JFLAG_NN0,
SelKanSj0 | JFLAG_NK2, SelKanSj0 | JFLAG_NK2,
@ -59,49 +59,49 @@ static Ushort selsjKAZU[] = {
SelNumTerm SelNumTerm
}; };
static Ushort selsjSUUJI[] = { static u_short selsjSUUJI[] = {
SelKanSj0, SelKanSj0,
SelArb0, SelArb0,
SelNumTerm SelNumTerm
}; };
static Ushort selsjNANSUU[] = { static u_short selsjNANSUU[] = {
SelKanSjYm, SelKanSjYm,
SelNumTerm SelNumTerm
}; };
static Ushort selsjAR17[] = { static u_short selsjAR17[] = {
SelLongArb, SelLongArb,
SelLongArbCma, SelLongArbCma,
SelNumTerm SelNumTerm
}; };
static Ushort selsjAR17CM[] = { static u_short selsjAR17CM[] = {
SelLongArbCma, SelLongArbCma,
SelLongArb, SelLongArb,
SelNumTerm SelNumTerm
}; };
static Ushort selsjAR17SJ[] = { static u_short selsjAR17SJ[] = {
SelLongArb, SelLongArb,
SelLongSj, SelLongSj,
SelNumTerm SelNumTerm
}; };
static Ushort selsjKANKURA[] = { static u_short selsjKANKURA[] = {
SelKanSjKr, SelKanSjKr,
SelArbKr, SelArbKr,
SelNumTerm SelNumTerm
}; };
static Ushort selsjARAKURA[] = { static u_short selsjARAKURA[] = {
SelArbKr, SelArbKr,
SelKanSjKr | JFLAG_NSN, SelKanSjKr | JFLAG_NSN,
SelNumTerm SelNumTerm
}; };
Ushort *selsjadrs[] = { u_short *selsjadrs[] = {
selsjAR, selsjAR,
selsjARCM, selsjARCM,
selsjKAZU, selsjKAZU,

View file

@ -42,11 +42,11 @@
#include "sj_yomi.h" #include "sj_yomi.h"
#include "kanakan.h" #include "kanakan.h"
static Int static int
cnjstrcmp (Uchar *yptr, Uchar *cnjp, Int *saml) cnjstrcmp (u_char *yptr, u_char *cnjp, int *saml)
{ {
Int asklen; int asklen;
Int nkrlen; int nkrlen;
asklen = CnjAskLen(cnjp); asklen = CnjAskLen(cnjp);
@ -82,7 +82,7 @@ static TypeCnct
cnvrow (JREC *rec, TypeCnct row) cnvrow (JREC *rec, TypeCnct row)
{ {
TypeGram hinsi; TypeGram hinsi;
Int stt; int stt;
hinsi = rec -> hinsi; hinsi = rec -> hinsi;
@ -111,16 +111,16 @@ cnvrow (JREC *rec, TypeCnct row)
return row; return row;
} }
Int int
setconj (TypeGram hinsi, JREC *jrec, CREC *crec) setconj (TypeGram hinsi, JREC *jrec, CREC *crec)
{ {
Uchar *yptr; u_char *yptr;
Int cmp; int cmp;
TypeCnct right; TypeCnct right;
Int saml; int saml;
Int ofslen; int ofslen;
int count = 0; int count = 0;
Uchar *cnj; u_char *cnj;
if ((cnj = Conjadr(hinsi)) != NULL) { if ((cnj = Conjadr(hinsi)) != NULL) {
saml = ofslen = 0; saml = ofslen = 0;
@ -146,7 +146,7 @@ setconj (TypeGram hinsi, JREC *jrec, CREC *crec)
if (isdpnd(*(yptr + saml))) continue; if (isdpnd(*(yptr + saml))) continue;
if ((right = cnvrow(jrec, (TypeCnct)CnjRight(cnj))) != '\0') { if ((right = cnvrow(jrec, (TypeCnct)CnjRight(cnj))) != '\0') {
crec -> len = (Uchar)(ofslen + saml); crec -> len = (u_char)(ofslen + saml);
crec -> right = right; crec -> right = right;
count++; count++;
crec++; crec++;

View file

@ -49,7 +49,7 @@ setkouho(CLREC* clrec, TypeDicOfs offs, int mode)
{ {
JREC *jrec; JREC *jrec;
KHREC *kptr; KHREC *kptr;
u_char TFar *fptr; u_char *fptr;
int flg; int flg;
int i; int i;
@ -140,7 +140,7 @@ void
ph_setkouho(CLREC* clrec, TypeDicOfs offs, STDYIN* sptr) ph_setkouho(CLREC* clrec, TypeDicOfs offs, STDYIN* sptr)
{ {
JREC *jrec; JREC *jrec;
u_char TFar *p; u_char *p;
if (sptr) { if (sptr) {

View file

@ -41,7 +41,7 @@
#include "sj_hinsi.h" #include "sj_hinsi.h"
#include "kanakan.h" #include "kanakan.h"
Uchar* u_char*
getstb(TypeGram hinsi) getstb(TypeGram hinsi)
{ {
if (hinsi < MEISI_1 || hinsi > TIMEI) return NULL; if (hinsi < MEISI_1 || hinsi > TIMEI) return NULL;
@ -51,14 +51,14 @@ getstb(TypeGram hinsi)
void void
setubi(JREC *rec, Uchar *stbtbl) setubi(JREC *rec, u_char *stbtbl)
{ {
Uchar *stb; u_char *stb;
Uchar *yptr; u_char *yptr;
Uchar *sptr; u_char *sptr;
Int slen; int slen;
JREC *new; JREC *new;
Int cmp; int cmp;
stb = stbtbl--; stb = stbtbl--;
@ -75,9 +75,9 @@ setubi(JREC *rec, Uchar *stbtbl)
if ((cmp != MATCH) || isdpnd(*(yptr + slen))) continue; if ((cmp != MATCH) || isdpnd(*(yptr + slen))) continue;
if (!(new = argjrec((Int)(rec -> jlen + slen), rec))) continue; if (!(new = argjrec((int)(rec -> jlen + slen), rec))) continue;
new -> stbofs = (Uchar)(stb - stbtbl); new -> stbofs = (u_char)(stb - stbtbl);
new -> flags |= StbBakeru(stb) ? JFLAG_KA : 0; new -> flags |= StbBakeru(stb) ? JFLAG_KA : 0;
} }
} }

View file

@ -40,11 +40,11 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "sj_yomi.h" #include "sj_yomi.h"
Int sj2cd_chr(euc, yomi) int sj2cd_chr(euc, yomi)
Uchar *euc; u_char *euc;
Uchar *yomi; u_char *yomi;
{ {
Uchar chr; u_char chr;
if ((chr = *euc++) == EUC_a1) { if ((chr = *euc++) == EUC_a1) {
chr = *euc; chr = *euc;
@ -117,10 +117,10 @@ Uchar *yomi;
Int sj2cd_str(euc, yomi, len) int sj2cd_str(euc, yomi, len)
Uchar *euc; u_char *euc;
Uchar *yomi; u_char *yomi;
Int len; int len;
{ {
if (!len--) return FALSE; if (!len--) return FALSE;

View file

@ -87,7 +87,7 @@
#define getsize(p) (((Int)(*(p) & 0x0f) * 0x100) + *((p) + 1)) #define getsize(p) (((int)(*(p) & 0x0f) * 0x100) + *((p) + 1))

View file

@ -85,7 +85,7 @@
#define iseocl(p) ( !ClYomiLen(p) || (Uchar *)(p) >= ClStudyTail ) #define iseocl(p) ( !ClYomiLen(p) || (u_char *)(p) >= ClStudyTail )
@ -104,7 +104,7 @@
#define ClHighNum(p) *(p + CL_NUMH) #define ClHighNum(p) *(p + CL_NUMH)
#define ClLowNum(p) *(p + CL_NUML) #define ClLowNum(p) *(p + CL_NUML)
#define ClGetNum(p) (ClHighNum(p) * 0x100 + ClLowNum(p)) #define ClGetNum(p) (ClHighNum(p) * 0x100 + ClLowNum(p))
#define ClSetNum(p, n) (ClHighNum(p)=(Uchar)((n) >> 8), ClLowNum(p)=(Uchar)(n)) #define ClSetNum(p, n) (ClHighNum(p)=(u_char)((n) >> 8), ClLowNum(p)=(u_char)(n))

View file

@ -39,22 +39,6 @@
#ifndef _SJ_TYPEDEF #ifndef _SJ_TYPEDEF
#define _SJ_TYPEDEF 1 #define _SJ_TYPEDEF 1
#define RECURS
#define TFar
#define Far
#define Void void
#define Char char
#define Uchar unsigned char
#define Short short
#define Ushort unsigned short
#define Int int
#define Uint unsigned int
#define Long long
#define Ulong unsigned long
#include <sys/types.h> #include <sys/types.h>
typedef u_char TypeGroup; typedef u_char TypeGroup;

View file

@ -39,10 +39,10 @@
#include "sj_typedef.h" #include "sj_typedef.h"
#include "sj_dict.h" #include "sj_dict.h"
Uchar *skipkstr(); u_char *skipkstr();
Uchar *skiphblk(ptr) u_char *skiphblk(ptr)
Uchar *ptr; u_char *ptr;
{ {
ptr++; ptr++;

View file

@ -99,7 +99,7 @@ srchdict(u_char* tagp)
while ((int)dicinl <= maxlen) { while ((int)dicinl <= maxlen) {
segno = srchidx(prevseg, (Int)dicinl); segno = srchidx(prevseg, (int)dicinl);
(*curdict->getdic)(curdict, segno); (*curdict->getdic)(curdict, segno);

View file

@ -38,7 +38,7 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "sj_yomi.h" #include "sj_yomi.h"
Int srchhead() int srchhead()
{ {
if (*cnvstart == _O) { if (*cnvstart == _O) {
headcode = SETTOU_O; headcode = SETTOU_O;

View file

@ -41,7 +41,7 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "kanakan.h" #include "kanakan.h"
Int istrcmp(); int istrcmp();
TypeDicSeg TypeDicSeg
srchidx(TypeDicSeg low, int len) srchidx(TypeDicSeg low, int len)

View file

@ -280,7 +280,7 @@ srch_number1(u_char* ptr)
{ {
u_char ch; u_char ch;
u_char mode; u_char mode;
u_char TFar *p; u_char *p;
int l; int l;
TypeClass cls; TypeClass cls;
int len; int len;

View file

@ -40,7 +40,7 @@
#include "sj_typedef.h" #include "sj_typedef.h"
#include "sj_yomi.h" #include "sj_yomi.h"
#include "sj_hinsi.h" #include "sj_hinsi.h"
static Uchar name_stb[] = { static u_char name_stb[] = {
0x22, MEISI_1, _KU, _NN, 0x22, MEISI_1, _KU, _NN,
0xb7, 0xaf, 0xb7, 0xaf,
0x22, MEISI_1, _SA, _MA, 0x22, MEISI_1, _SA, _MA,
@ -56,7 +56,7 @@ static Uchar name_stb[] = {
0x00 0x00
}; };
static Uchar timei_stb[] = { static u_char timei_stb[] = {
0x22, MEISI_1, _E, _KI, 0x22, MEISI_1, _E, _KI,
0xb1, 0xd8, 0xb1, 0xd8,
0x44, MEISI_1, _E, _KI, _HA, _TU, 0x44, MEISI_1, _E, _KI, _HA, _TU,
@ -78,7 +78,7 @@ static Uchar timei_stb[] = {
0x00 0x00
}; };
static Uchar meisi_stb[] = { static u_char meisi_stb[] = {
0x44, MEISI_6, _A, _TU, _KA, _I, 0x44, MEISI_6, _A, _TU, _KA, _I,
0xb0, 0xb7, 0xa4, 0xa4, 0xb0, 0xb7, 0xa4, 0xa4,
0x1a, MEISI_6, _KA, 0x1a, MEISI_6, _KA,
@ -94,7 +94,7 @@ static Uchar meisi_stb[] = {
0x00 0x00
}; };
static Uchar sahen_stb[] = { static u_char sahen_stb[] = {
0x44, MEISI_6, _A, _TU, _KA, _I, 0x44, MEISI_6, _A, _TU, _KA, _I,
0xb0, 0xb7, 0xa4, 0xa4, 0xb0, 0xb7, 0xa4, 0xa4,
0x1a, MEISI_6, _KA, 0x1a, MEISI_6, _KA,
@ -120,13 +120,13 @@ static Uchar sahen_stb[] = {
0x00 0x00
}; };
static Uchar human_stb[] = { static u_char human_stb[] = {
0x24, MEISI_1, _SA, _NN, 0x24, MEISI_1, _SA, _NN,
0xa4, 0xb5, 0xa4, 0xf3, 0xa4, 0xb5, 0xa4, 0xf3,
0x00 0x00
}; };
static Uchar ippan_stb[] = { static u_char ippan_stb[] = {
0x56, FUKUSI_1, _NI, _TO, _MO, _NA, _I, 0x56, FUKUSI_1, _NI, _TO, _MO, _NA, _I,
0xa4, 0xcb, 0xc8, 0xbc, 0xa4, 0xa4, 0xa4, 0xcb, 0xc8, 0xbc, 0xa4, 0xa4,
0x56, FUKUSI_1, _NI, _TO, _MO, _NA, _U, 0x56, FUKUSI_1, _NI, _TO, _MO, _NA, _U,
@ -134,7 +134,7 @@ static Uchar ippan_stb[] = {
0x00 0x00
}; };
Uchar *stbadr[] = { u_char *stbadr[] = {
0, 0,
ippan_stb, ippan_stb, ippan_stb, meisi_stb, sahen_stb, ippan_stb, ippan_stb, ippan_stb, meisi_stb, sahen_stb,
sahen_stb, sahen_stb, meisi_stb, meisi_stb, meisi_stb, sahen_stb, sahen_stb, meisi_stb, meisi_stb, meisi_stb,

View file

@ -41,31 +41,31 @@
static Uchar o_settou[] = { static u_char o_settou[] = {
0xA1, 0xb8, 0xe6, 0xa4, 0xaa 0xA1, 0xb8, 0xe6, 0xa4, 0xaa
}; };
static Uchar go_settou[] = { static u_char go_settou[] = {
0xA1, 0xb8, 0xe6, 0xa4, 0xb4 0xA1, 0xb8, 0xe6, 0xa4, 0xb4
}; };
static Uchar dai_settou[] = { static u_char dai_settou[] = {
0x22, 0xc2, 0xe8, 0xc2, 0xe8 0x22, 0xc2, 0xe8, 0xc2, 0xe8
}; };
static Uchar kigou_settou[] = { static u_char kigou_settou[] = {
0x01 0x01
}; };
Uchar *settou_ptr[] = { u_char *settou_ptr[] = {
NULL, o_settou, go_settou, dai_settou, kigou_settou NULL, o_settou, go_settou, dai_settou, kigou_settou
}; };
Uchar scncttbl[2][24] = { u_char scncttbl[2][24] = {
{ {
0x48, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

22
study.c
View file

@ -40,16 +40,16 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "kanakan.h" #include "kanakan.h"
Void mvmemi(), mvmemd(); void mvmemi(), mvmemd();
Int int
study(STDYOUT *stdy) study(STDYOUT *stdy)
{ {
STDYOUT outp; STDYOUT outp;
STDYIN *p1; STDYIN *p1;
STDYIN *p2; STDYIN *p2;
Int wcnt; int wcnt;
Int ret; int ret;
TypeDicSeg seg; TypeDicSeg seg;
TypeDicOfs ofs; TypeDicOfs ofs;
TypeStyNum nm; TypeStyNum nm;
@ -57,7 +57,7 @@ study(STDYOUT *stdy)
if (!StudyExist()) return StudyNoDict; if (!StudyExist()) return StudyNoDict;
memcpy((Uchar *)stdy, (Uchar *)&outp, sizeof(outp)); memcpy((u_char *)stdy, (u_char *)&outp, sizeof(outp));
if (outp.stdy1.offset == 0) return StudyNotStudy; if (outp.stdy1.offset == 0) return StudyNotStudy;
@ -95,7 +95,7 @@ study(STDYOUT *stdy)
} }
if (p2) { if (p2) {
mvmemi((Uchar *)(p2 + 1), (Uchar *)p2, mvmemi((u_char *)(p2 + 1), (u_char *)p2,
(StudyTail - p2) * StudyRecSize); (StudyTail - p2) * StudyRecSize);
StudyCount -= 1; StudyCount -= 1;
} }
@ -123,8 +123,8 @@ study(STDYOUT *stdy)
p1++; p1++;
} }
mvmemd((Uchar *)(StudyTail - 1), (Uchar *)StudyTail, mvmemd((u_char *)(StudyTail - 1), (u_char *)StudyTail,
(Uchar *)(StudyTail - 1) - (Uchar *)p1); (u_char *)(StudyTail - 1) - (u_char *)p1);
p1 -> offset = outp.stdy1.offset; p1 -> offset = outp.stdy1.offset;
p1 -> seg = outp.stdy1.seg; p1 -> seg = outp.stdy1.seg;
p1 -> dicid = outp.stdy1.dicid; p1 -> dicid = outp.stdy1.dicid;
@ -144,9 +144,9 @@ STDYIN* srchstdy(
TypeDicOfs ofs, TypeDicOfs ofs,
TypeDicID dicid) TypeDicID dicid)
{ {
Int high; int high;
Int mid; int mid;
Int low; int low;
STDYIN *ptr; STDYIN *ptr;

View file

@ -40,7 +40,7 @@
Uchar suuji_tbl[] = { u_char suuji_tbl[] = {
N_0,_NIL,_NIL, _Num0 | NA, 0x00, 0x00, N_0,_NIL,_NIL, _Num0 | NA, 0x00, 0x00,
N_1,_NIL,_NIL, _Num1 | NA, 0xec, 0x07, N_1,_NIL,_NIL, _Num1 | NA, 0xec, 0x07,
N_2,_NIL,_NIL, _Num2 | NA, 0xec, 0x07, N_2,_NIL,_NIL, _Num2 | NA, 0xec, 0x07,
@ -80,7 +80,7 @@ Uchar suuji_tbl[] = {
Uchar kurai1_tbl[] = { u_char kurai1_tbl[] = {
_ZI,_XYU,_U, (1<<4)+0+Kr1TblTopF, 0x05, _ZI,_XYU,_U, (1<<4)+0+Kr1TblTopF, 0x05,
_ZI,_XYU,_XTU, (1<<4)+1+Kr1TblTopF, 0x02, _ZI,_XYU,_XTU, (1<<4)+1+Kr1TblTopF, 0x02,
_SE,_NN, _NIL, (3<<4)+2+Kr1TblTopF, 0x07, _SE,_NN, _NIL, (3<<4)+2+Kr1TblTopF, 0x07,
@ -96,7 +96,7 @@ Uchar kurai1_tbl[] = {
Uchar kurai2_tbl[] = { u_char kurai2_tbl[] = {
_O, _KU, _NIL, (2<<4)+13, _O, _KU, _NIL, (2<<4)+13,
_TI,_XYO,_U, (3<<4)+14, _TI,_XYO,_U, (3<<4)+14,
_MA,_NN, _NIL, (1<<4)+15, _MA,_NN, _NIL, (1<<4)+15,
@ -105,7 +105,7 @@ Uchar kurai2_tbl[] = {
Uchar num1tbl[] = { u_char num1tbl[] = {
0xa3, 0xb0, 0xa3, 0xb0,
0xa3, 0xb1, 0xa3, 0xb1,
0xa3, 0xb2, 0xa3, 0xb2,
@ -123,7 +123,7 @@ Uchar num1tbl[] = {
Uchar num2tbl[] = { u_char num2tbl[] = {
0xa1, 0xbb, 0xa1, 0xbb,
0xb0, 0xec, 0xb0, 0xec,
0xc6, 0xf3, 0xc6, 0xf3,
@ -141,7 +141,7 @@ Uchar num2tbl[] = {
Uchar num3tbl[] = { u_char num3tbl[] = {
0xce, 0xed, 0xce, 0xed,
0xb0, 0xed, 0xb0, 0xed,
0xc6, 0xf5, 0xc6, 0xf5,
@ -159,7 +159,7 @@ Uchar num3tbl[] = {
Uchar num4tbl[] = { u_char num4tbl[] = {
0xc0, 0xe9, 0xc0, 0xe9,
0xc9, 0xb4, 0xc9, 0xb4,
0xbd, 0xbd, 0xbd, 0xbd,
@ -168,7 +168,7 @@ Uchar num4tbl[] = {
Uchar num5tbl[] = { u_char num5tbl[] = {
0xc0, 0xe9, 0xc0, 0xe9,
0xc9, 0xb4, 0xc9, 0xb4,
0xbd, 0xa6, 0xbd, 0xa6,
@ -177,7 +177,7 @@ Uchar num5tbl[] = {
Uchar num6tbl[] = { u_char num6tbl[] = {
0xc3, 0xfb, 0xc3, 0xfb,
0xb2, 0xaf, 0xb2, 0xaf,
0xcb, 0xfc, 0xcb, 0xfc,

View file

@ -38,11 +38,11 @@
#include "sj_kcnv.h" #include "sj_kcnv.h"
#include "sj_right.h" #include "sj_right.h"
Int terminate(right, yomi) int terminate(right, yomi)
TypeCnct right; TypeCnct right;
Uchar *yomi; u_char *yomi;
{ {
Uchar ch; u_char ch;
if ((yomi > cnvstart) && (Chrtbl[*(yomi - 1)] & NUMBER)) if ((yomi > cnvstart) && (Chrtbl[*(yomi - 1)] & NUMBER))

View file

@ -33,7 +33,7 @@
#include "sj_prty.h" #include "sj_prty.h"
Uchar termtbl[] = { u_char termtbl[] = {
0, 0,
T_KANOU + P_JOSHI_B, T_KANOU + P_JOSHI_B,
T_KANOU + P_JOSHI_A, T_KANOU + P_JOSHI_A,

View file

@ -41,8 +41,8 @@
#include "sj_hinsi.h" #include "sj_hinsi.h"
#include "kanakan.h" #include "kanakan.h"
Int terminate(); int terminate();
Void setclrec(), srchfzk(); void setclrec(), srchfzk();
void void
wakachi (void) wakachi (void)
@ -51,11 +51,11 @@ wakachi (void)
CLREC *clrec; CLREC *clrec;
CREC crec[4]; CREC crec[4];
Int count; int count;
Uchar *next; u_char *next;
TypeCnct right; TypeCnct right;
Int i; int i;
Int maxlen; int maxlen;
free_jall(maxjptr); free_jall(maxjptr);
maxjptr = NULL; maxjptr = NULL;
@ -88,7 +88,7 @@ wakachi (void)
jrec -> class = C_WAKACHI; jrec -> class = C_WAKACHI;
jrec -> hinsi = MEISI_6; jrec -> hinsi = MEISI_6;
while ((Int)jrec -> jlen < maxlen) { while ((int)jrec -> jlen < maxlen) {
count = setconj((TypeGram)MEISI_6, jrec, crec); count = setconj((TypeGram)MEISI_6, jrec, crec);
@ -124,7 +124,7 @@ wakachi (void)
return; return;
if (jrec -> jlen) { if (jrec -> jlen) {
if ((clrec = argclrec((Int)jrec -> jlen)) != NULL) { if ((clrec = argclrec((int)jrec -> jlen)) != NULL) {
clrec -> jnode = jrec; clrec -> jnode = jrec;
clrec -> right = R_MEISI; clrec -> right = R_MEISI;
clrec -> kubun = K_TAIGEN; clrec -> kubun = K_TAIGEN;