Add cost calculation

This commit is contained in:
Nishi 2026-06-24 11:39:52 +09:00
commit 54d3831094
14 changed files with 136 additions and 16 deletions

View file

@ -122,6 +122,9 @@ RECURS void srchfzk(SJ4_CONTEXT JREC*, u_char*, TypeCnct, int);
/* fzkyomi.c */
extern u_char* fzkadr[];
/* getcost.c */
int getcost(SJ4_CONTEXT u_char*);
/* getkanji.c */
u_char* getkan_none(u_char*, u_char*, u_char*, int, int);
u_char* getkan_hira(u_char*, u_char*, u_char*, int, int);

View file

@ -104,6 +104,8 @@
#define fzkcnct Jfzkcnct
#define srchfzk Jsrchfzk
#define getcost Jgetcost
#define getkan_none Jgetkan_none
#define getkan_hira Jgetkan_hira
#define getkan_kata Jgetkan_kata

View file

@ -43,7 +43,7 @@ typedef struct jiritu {
TypeDicOfs jofsst;
TypeDicOfs jofsed;
u_short flags;
TypeClass class;
TypeClass jclass;
TypeDicID dicid;
u_char jlen;
TypeGram hinsi;
@ -75,6 +75,7 @@ typedef struct kouho {
TypeDicOfs offs;
TypeStyNum styno;
u_char rank;
u_short cost; /* new in SJ4 */
#if __STDC__
unsigned sttfg : 1;
unsigned sttkj : 1;