This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: vfnprintf and floating point.


Sergei Organov wrote:
> 
 
> I just tried to separate floating point code from 'vfnprintf'
> routine. It was surprisingly easy to do, but I remember that it didn't
> seem so easy for similar code found in 'newlib'. The code found in
> eCos libc is much better organized, but it seems that "Inf" and "NaN"
> processing was removed from the code entirely. What's the reason?

newlib uses the "mprec" library, which is more precise but substantially
larger. I decided to avoid it because of the extra restrictions imposed on
embedded systems. However, I do want to add configurability to this in
future so people can choose the implementation they want. It's just not
there right now.
 
> If you interested, I just changed first argument of 'cvt' from
> 'double' to 'va_list*', and moved double argument extraction to this
> routine. I also provided 'void skip_double(va_list*)' that is used to
> skip double argument when floating point support is disabled in
> 'vfnprintf'.

Since you've already done it, if you send me the patch (use `cvs diff -u5')
then I'll put it in. You are working from the anonymous CVS version, yes? 

Jifl
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]