Fix bugs
This commit is contained in:
parent
a6a7858eaf
commit
69776245a7
20 changed files with 59721 additions and 58907 deletions
|
|
@ -63,12 +63,12 @@ set2nd(SJ4_CONTEXT CLREC* clrec) {
|
|||
static int cost_penalty(CLREC* clrec) {
|
||||
int c = clrec->jnode->cost;
|
||||
|
||||
if(c < 0xfff / 5 * 1) return 8;
|
||||
if(c < 0xfff / 5 * 2) return 4;
|
||||
if(c < 0xfff / 5 * 1) return 0;
|
||||
if(c < 0xfff / 5 * 2) return 1;
|
||||
if(c < 0xfff / 5 * 3) return 2;
|
||||
if(c < 0xfff / 5 * 4) return 1;
|
||||
return 0;
|
||||
};
|
||||
if(c < 0xfff / 5 * 4) return 4;
|
||||
return 8;
|
||||
}
|
||||
|
||||
void mk2claus(SJ4_CONTEXT2) {
|
||||
u_char* keepptr;
|
||||
|
|
@ -127,7 +127,7 @@ void mk2claus(SJ4_CONTEXT2) {
|
|||
|
||||
if(selcl->cl2len > clrec->cl2len) continue;
|
||||
|
||||
prty = priority(SJ4_CONTEXT_PASS clrec) - prty2 + cost_penalty(clrec);
|
||||
prty = priority(SJ4_CONTEXT_PASS clrec) - prty2 - cost_penalty(clrec);
|
||||
|
||||
prty2++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue