Skip to content

Commit

Permalink
[dvips] tweak {scanpage,pprescan}.c (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Apr 19, 2020
1 parent eca7562 commit fb18458
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions source/texk/dvipsk/pprescan.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,20 @@ case 128: case 133: cmd = dvibyte(); /* set1, put1 commands drops through */
fprintf(stderr, "Wrong char code: %04X\n", mychar);
error("! a non-existent virtual character is being used; check vf/tfm files");
}
ffont0 = curfnt->localfonts;
if (ffont0==NULL)
curfnt = NULL;
else
ppreselectfont(ffont0->desc);
} else {
curpos = cd->packptr + 2;
curlim = curpos + (256*(long)(*cd->packptr)+(*(cd->packptr+1)));
ffont = curfnt->localfonts;
if (ffont==NULL)
curfnt = NULL;
else
ppreselectfont(ffont->desc);
}
ffont0 = curfnt->localfonts;
if (ffont0==NULL)
curfnt = NULL;
else
ppreselectfont(ffont0->desc);
} else if (curfnt->loaded == 3)
curfnt->chardesc[mychar].flags = EXISTS;
break;
Expand Down
15 changes: 10 additions & 5 deletions source/texk/dvipsk/scanpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,20 @@ case 128: case 133: cmd = dvibyte(); /* set1, put1 commands drops through */
fprintf(stderr, "Wrong char code: %04X\n", mychar);
error("! a non-existent virtual character is being used; check vf/tfm files");
}
ffont0 = curfnt->localfonts;
if (ffont0==NULL)
curfnt = NULL;
else if (!preselectfont(ffont0->desc))
goto outofmem;
} else {
curpos = cd->packptr + 2;
curlim = curpos + (256*(long)(*cd->packptr)+(*(cd->packptr+1)));
ffont = curfnt->localfonts;
if (ffont==NULL)
curfnt = NULL;
else if (!preselectfont(ffont->desc))
goto outofmem;
}
ffont0 = curfnt->localfonts;
if (ffont0==NULL)
curfnt = NULL;
else if (!preselectfont(ffont0->desc))
goto outofmem;
} else {
pagecost++;
if (!prescanchar(curfnt->chardesc + mychar))
Expand Down

0 comments on commit fb18458

Please sign in to comment.