Re: Bug in ETA code on x64

2006-04-03 Thread Hrvoje Niksic
Thomas Braby <[EMAIL PROTECTED]> writes: >> eta_hrs = (int) (eta / 3600), eta %= 3600; > > Yes that also works. The cast is needed on Windows x64 because eta is > a wgint (which is 64-bit) but a regular int is 32-bit so otherwise a > warning is issued. The same is the case on 32-bit Windows, an

Re: Bug in ETA code on x64

2006-04-03 Thread Thomas Braby
- Original Message - From: Hrvoje Niksic <[EMAIL PROTECTED]> Date: Tuesday, March 28, 2006 7:23 pm > > in progress.c line 880: > > > >eta_hrs = (int)(eta / 3600, eta %= 3600); > >eta_min = (int)(eta / 60, eta %= 60); > >eta_sec = (int)(eta); > > This is weird. Did you compi

Re: Bug in ETA code on x64

2006-03-31 Thread Greg Hurrell
El 29/03/2006, a las 14:39, Hrvoje Niksic escribió: I can't see any good reason to use "," here. Why not write the line as: eta_hrs = eta / 3600; eta %= 3600; Because that's not equivalent. Well, it should be, because the comma operator has lower precedence than the assignment operato

Re: Bug in ETA code on x64

2006-03-29 Thread Hrvoje Niksic
Greg Hurrell <[EMAIL PROTECTED]> writes: > El 28/03/2006, a las 20:43, Tony Lewis escribió: > >> Hrvoje Niksic wrote: >> >>> The cast to int looks like someone was trying to remove a warning and >>> botched operator precedence in the process. >> >> I can't see any good reason to use "," here. Why

Re: Bug in ETA code on x64

2006-03-29 Thread Greg Hurrell
El 28/03/2006, a las 20:43, Tony Lewis escribió: Hrvoje Niksic wrote: The cast to int looks like someone was trying to remove a warning and botched operator precedence in the process. I can't see any good reason to use "," here. Why not write the line as: eta_hrs = eta / 3600; eta %

RE: Bug in ETA code on x64

2006-03-28 Thread Tony Lewis
Hrvoje Niksic wrote: > The cast to int looks like someone was trying to remove a warning and > botched operator precedence in the process. I can't see any good reason to use "," here. Why not write the line as: eta_hrs = eta / 3600; eta %= 3600; This makes it much less likely that someone

Re: Bug in ETA code on x64

2006-03-28 Thread Hrvoje Niksic
Thomas Braby <[EMAIL PROTECTED]> writes: > With wget 1.10.2 compiled using Visual Studio 2005 for Windows XP x64 > I was getting no ETA until late in the transfer, when I'd get things > like: > > 49:49:49 then 48:48:48 then 47:47:47 etc. > > So I checked the eta value in seconds and it was corre