Rename to Sj4
This commit is contained in:
parent
0184e70f04
commit
0a2839610b
121 changed files with 1471 additions and 1461 deletions
|
|
@ -1,156 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1991-1994 Sony Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
||||
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Except as contained in this notice, the name of Sony Corporation
|
||||
* shall not be used in advertising or otherwise to promote the sale, use
|
||||
* or other dealings in this Software without prior written authorization
|
||||
* from Sony Corporation.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $SonyRCSfile: mk2claus.c,v $
|
||||
* $SonyRevision: 1.1 $
|
||||
* $SonyDate: 1994/06/03 08:02:00 $
|
||||
*/
|
||||
|
||||
#include "sj_kcnv.h"
|
||||
#include "sj_right.h"
|
||||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static int
|
||||
set2nd(SJ3_CONTEXT CLREC* clrec) {
|
||||
|
||||
CLREC* rec2;
|
||||
|
||||
mkjiritu(SJ3_CONTEXT_PASS DO_IKKATU | DO_CLSTUDY);
|
||||
|
||||
mkbunsetu(SJ3_CONTEXT_PASS2);
|
||||
|
||||
if(!maxclptr) {
|
||||
wakachi(SJ3_CONTEXT_PASS2);
|
||||
return clrec->cllen;
|
||||
}
|
||||
|
||||
for(rec2 = maxclptr; rec2; rec2 = rec2->clsort) {
|
||||
if(terminate(SJ3_CONTEXT_PASS rec2->right, cnvstart + rec2->cllen) != SHU)
|
||||
break;
|
||||
}
|
||||
|
||||
return rec2 ? (clrec->cllen + rec2->cllen) : (clrec->cllen);
|
||||
}
|
||||
|
||||
void mk2claus(SJ3_CONTEXT2) {
|
||||
u_char* keepptr;
|
||||
int keeplen;
|
||||
CLREC* clrec;
|
||||
int len;
|
||||
int save2ln;
|
||||
int prty;
|
||||
int maxprty;
|
||||
int count;
|
||||
int prty2;
|
||||
|
||||
prty = maxprty = prty2 = 0;
|
||||
|
||||
clt2nd = maxclptr = NULL;
|
||||
jrt2nd = maxjptr = NULL;
|
||||
|
||||
selcl = clt1st;
|
||||
|
||||
if(selcl->right == R_FZKKGU) {
|
||||
pritiny(SJ3_CONTEXT_PASS2);
|
||||
return;
|
||||
}
|
||||
|
||||
if(cnvlen == selcl->cllen) {
|
||||
pritiny(SJ3_CONTEXT_PASS2);
|
||||
return;
|
||||
}
|
||||
|
||||
keepptr = cnvstart;
|
||||
keeplen = cnvlen;
|
||||
|
||||
len = count = 0;
|
||||
for(clrec = selcl; clrec && count < 5; clrec = clrec->clsort) {
|
||||
|
||||
cnvstart = keepptr + clrec->cllen;
|
||||
cnvlen = keeplen - clrec->cllen;
|
||||
|
||||
if(len != clrec->cllen) {
|
||||
if(clt2nd != maxclptr) {
|
||||
free_clall(SJ3_CONTEXT_PASS maxclptr);
|
||||
free_jall(SJ3_CONTEXT_PASS maxjptr);
|
||||
}
|
||||
|
||||
save2ln = set2nd(SJ3_CONTEXT_PASS clrec);
|
||||
|
||||
count++;
|
||||
len = clrec->cllen;
|
||||
prty2 = 0;
|
||||
}
|
||||
|
||||
if(Termtbl[clrec->right] & T_SHUUJO)
|
||||
clrec->cl2len = (u_char)len;
|
||||
else
|
||||
clrec->cl2len = (u_char)save2ln;
|
||||
|
||||
if(selcl->cl2len > clrec->cl2len) continue;
|
||||
|
||||
prty = priority(SJ3_CONTEXT_PASS clrec) - prty2;
|
||||
|
||||
prty2++;
|
||||
|
||||
if(selcl->cl2len == clrec->cl2len) {
|
||||
if(clrec->cllen == nextcllen) {
|
||||
if(selcl->cllen != nextcllen)
|
||||
;
|
||||
else if(prty <= maxprty)
|
||||
continue;
|
||||
}
|
||||
|
||||
else if(prty <= maxprty)
|
||||
continue;
|
||||
}
|
||||
|
||||
selcl = clrec;
|
||||
maxprty = prty;
|
||||
|
||||
if(clt2nd == maxclptr) continue;
|
||||
|
||||
free_clall(SJ3_CONTEXT_PASS clt2nd);
|
||||
free_jall(SJ3_CONTEXT_PASS jrt2nd);
|
||||
jrt2nd = maxjptr;
|
||||
clt2nd = maxclptr;
|
||||
}
|
||||
|
||||
if(clt2nd != maxclptr) {
|
||||
free_clall(SJ3_CONTEXT_PASS maxclptr);
|
||||
maxclptr = NULL;
|
||||
free_jall(SJ3_CONTEXT_PASS maxjptr);
|
||||
maxjptr = NULL;
|
||||
}
|
||||
|
||||
cnvstart = keepptr;
|
||||
cnvlen = keeplen;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue