[Dev-luatex] Strange code in dvigen.w
Lars Hamren
lh at sdu.se
Wed Oct 26 00:59:10 CEST 2016
Hi,
I came across this code in the current luatex trunk:
void out_cmd(void)
{
if ((oval < 0x100) && (oval >= 0)) {
if ((ocmd != set1) || (oval > 127)) {
if ((ocmd == fnt1) && (oval < 64))
oval += fnt_num_0;
else
dvi_out(ocmd);
}
} else {
if ((oval < 0x10000) && (oval >= 0)) {
dvi_out(ocmd + 1);
} else {
if ((oval < 0x1000000) && (oval >= 0)) {
dvi_out(ocmd + 2);
} else {
dvi_out(ocmd + 3);
if (oval >= 0) {
dvi_out(oval / 0x1000000);
} else {
oval += 0x40000000;
oval += 0x40000000;
dvi_out((oval / 0x1000000) + 128);
oval = oval % 0x1000000;
}
dvi_out(oval / 0x10000); <---------- Remove?
oval = oval % 0x10000;
}
dvi_out(oval / 0x10000); <----------
oval = oval % 0x10000;
}
dvi_out(oval / 0x100);
oval = oval % 0x100;
}
dvi_out(oval);
}
It seems that the same byte gets written twice in some cases (see the arrows).
When compiling tlb0735.lvt in the latex test suite, the output is not accepted
by e.g. xdvi. I test with 0.95 and texlive.
Cheers
/Lars
More information about the dev-luatex
mailing list