Re: CVS commit: src/bin/ps

2010-07-28 Thread Nicolas Joly
On Wed, Jul 28, 2010 at 01:14:40PM +0200, Alan Barrett wrote:
> On Tue, 27 Jul 2010, Nicolas Joly wrote:
> > v = ve->var;
> > -   doubleprintorsetwidth(v, getpcpu(k), 1, mode);
> > +   dbl = getpcpu(k);
> > +   doubleprintorsetwidth(v, dbl, (dbl >= 100.0) ? 0 : 1, mode);
> >  }
> 
> I think you need to test (dbl >= 99.95); otherwise values in the range
> from 99.95 to 99.... will be printed with one decimal place, as
> "100.0".

Right, will fix.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Re: CVS commit: src/bin/ps

2010-07-28 Thread Alan Barrett
On Tue, 27 Jul 2010, Nicolas Joly wrote:
>   v = ve->var;
> - doubleprintorsetwidth(v, getpcpu(k), 1, mode);
> + dbl = getpcpu(k);
> + doubleprintorsetwidth(v, dbl, (dbl >= 100.0) ? 0 : 1, mode);
>  }

I think you need to test (dbl >= 99.95); otherwise values in the range
from 99.95 to 99.... will be printed with one decimal place, as
"100.0".

--apb (Alan Barrett)