Fix segment generation
This commit is contained in:
parent
0e4aa54109
commit
c68a6edd75
5 changed files with 26 additions and 5 deletions
|
|
@ -280,7 +280,11 @@ diff_ylen(DouonRec* drec) {
|
|||
output_yomi(stderr, dprev->yptr);
|
||||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
} else if(*p1 > *p2) {
|
||||
}
|
||||
|
||||
/* XXX: this does not always work... */
|
||||
#if 0
|
||||
else if(*p1 > *p2) {
|
||||
fprintf(stderr, WRONGREADORDER);
|
||||
output_yomi(stderr, dprev->yptr);
|
||||
fputc('\n', stderr);
|
||||
|
|
@ -288,6 +292,7 @@ diff_ylen(DouonRec* drec) {
|
|||
fputc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
while(*p2++)
|
||||
ylen++;
|
||||
}
|
||||
|
|
@ -348,8 +353,12 @@ start:
|
|||
|
||||
hnum = drec->hrec_num;
|
||||
|
||||
#if 1
|
||||
i = 0x100 + /* knjask can go up to 255 */
|
||||
#else
|
||||
i = 1 +
|
||||
MAXKNJASKNUMBER +
|
||||
#endif
|
||||
douon_num * DOUONBLKSIZENUMBER + DOUONBLKSIZENUMBER +
|
||||
yomi_len + ylen +
|
||||
hinsi_num + hnum +
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "sj4mkdic.h"
|
||||
|
||||
static u_char mindex[MAINSEGMENTLENGTH];
|
||||
static u_char mindex[MAININDEXLENGTH];
|
||||
static int idxpos = 0;
|
||||
static int idxnum = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,16 @@
|
|||
#ifndef SJ4_DICT_CONST_H
|
||||
#define SJ4_DICT_CONST_H
|
||||
|
||||
#define HUGE
|
||||
|
||||
#ifdef HUGE
|
||||
#define MAINSEGMENTLENGTH 2048
|
||||
#define MAININDEXLENGTH 32768
|
||||
#else
|
||||
#define MAINSEGMENTLENGTH 2048
|
||||
#define MAININDEXLENGTH 2048
|
||||
#define MAININDEXNUMBER 512
|
||||
#endif
|
||||
#define MAININDEXNUMBER 256
|
||||
|
||||
#define MAXYOMILENGTH 32
|
||||
#define MAXKANJILENGTH 32
|
||||
|
|
@ -70,8 +77,13 @@
|
|||
#define KANJIMODEMASK 0xf0
|
||||
#define ATRMSKANJIOFS 0xc0c0
|
||||
|
||||
#ifdef HUGE
|
||||
#define MAXHINDONUMBER 8000
|
||||
#define MAXOFFSETNUMBER 2000
|
||||
#else
|
||||
#define MAXHINDONUMBER 2000
|
||||
#define MAXOFFSETNUMBER 1000
|
||||
#endif
|
||||
|
||||
#ifdef ENGLISH
|
||||
#define ILLEGALFORMAT "Illegal format"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue