[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#409992: texlive-base-bin: xdvi shrinkFactor 0 is broken



Package: texlive-base-bin
Version: 2005.dfsg.2-10
Severity: normal

I reported this as bug 357462 against tetex-bin, but noticed when I
moved to texlive that it was still unfixed.  So I debugged it a bit
myself:

"xdvi -s 0 foo.dvi" is supposed to auto-size the page within the
window, but it does not work.  The problem is the following code in
xdvi.c, approximately line 4217:

    if (resource.shrinkfactor == 0) /* protect against division by 0 */
        resource.shrinkfactor = 1;

The shrinkfactor gets changed to 1 before set_windowsize() is called,
so it's using an insanely large size instead of autosizing.

I simply commented out this code and it seems to work fine.  I'm not
sure if the division by 0 is still a problem, or when it might occur,
so the right fix might not be this simple.



Reply to: