-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hrvoje Niksic wrote: > Micah Cowan <[EMAIL PROTECTED]> writes: > >> The prerelease still has a potential for crashes: in the Czech locales >> it will tend to crash if the download is large (or slow) enough to push >> minutes into the three-digit zone (that is, if it would take > 1 hour >> and 40 minutes). > > How can minutes get in the three-digit zone? Anything longer than an > hour should be printed using hours and minutes. Anything longer than > two days should be printed using days and hours. Anything longer than > 100 days should be printed with days only.
Er, yeah, you're right. The problem is when the units are both _two_ columns wide (because the "zbývá" still manages to push it to the limit). On my terminal, this results in writing to the last character position (which Wget normally tries to avoid); which then isn't overwritten when one of the columns goes down to only one digit (leaving, say, "1ss" at the end, instead of "1s"). >> Ideally, Wget wouldn't even scroll the screen, etc, in the face of >> two-long ETA strings; it should properly count how much space it >> has, rather than guesstimate. > > It wasn't supposed to be guesstimation; eta_to_human_short was > carefully coded not to exceed the size constraint expected by > create_image. You're right; however, its maxmium size plus the " zbývá " pushes it out one column too far. Petr's patch, of course, solves this, but unfortunately we're not the ones who should handle that patch. What I'd like to see happen (but won't for 1.11.1, and probably 1.12), is that Wget never tries to pack things into pre-determined field widths, but instead uses their actual maximum sizes. In this case, eta would get counted for 14 columns maximum (7 for "zbývá" and the spaces on either side, plus the 7 maximum for the maximum output length of eta_to_human_short). Knowing how large the translated string for "eta" is could perhaps help us to determine a more proper "minimum screen width" value at runtime. In the meantime, since it would solve this specific issue for now, perhaps we should expand the maximum fieldwidth for eta to be 14 instead of the current 13, adjusting the minimum screen width if necessary? - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHriw97M8hyUobTrERAuIaAJ45H6KtMHOeo+3DnqPqSLHLcItS7ACZAZPO lJJMeca56QT9ykGmxwW2/2Q= =eFJZ -----END PGP SIGNATURE-----
