Hi, In the days when I used to do "heavy duty" coding I maintained a library of "useful" routines. A printf library was one of these: I worked through the source code of about 6 or 7 different run-time libraries to get ideas.
I have no idea what I did with it - but I can recommend the constructioin of such a library as a good learning exercise, especially if you are a freelancer working on different platforms every few months. I also learned how huge a full printf library can be! regards, Richard ----- Original Message ----- From: <nobo...@web.de> To: <mspgcc-users@lists.sourceforge.net> Sent: Sunday, April 11, 2004 9:24 PM Subject: Re: [Mspgcc-users] sprintf( "%f" > Hi, > > with other compilers you have usually more problems: The 1.26A version from > IAR (90% of the code in the company i'm working is done only for that compiler) does not know how to sprintf/sscanf %hu or %u (and maybe %f, i didn't tested it) and some simple things like including from subdirectorys or simple C99 features like the restrict qualifier do not work. And the IAR guys even today think that it's okay to produce no warning for an statement with undefined behaviour and that their new 3.x version does not need it! > The easiest way seems to implement the %f support. > > Rolf > > mspgcc-users@lists.sourceforge.net schrieb am 11.04.04 15:09:33: > > > > Hermann Kraus wrote: > > > On Fri, 09 Apr 2004 14:09:59 +0200, Chris Liechti <cliec...@gmx.net> > > > wrote: > > > > > >> %f is not implemented in the *printf function(s) in mspgcc. you have > > >> to supply your own implementation if you want that format. > > >> > > >> one of the reasons is that floats are rarely used and the format > > >> implementation in *printf would use too much code for these users. > > > > > > What do you think about providing different versions of printf like in > > > avr-libc? > > > That would solve the problem for the users who need floats and it > > > wouldn't affect > > > the others. > > > > yep, you already can link your own implementation of a printf or > > vuprintf (that function is used in all the other *printf functions) > > > > its just that nobody made an alternative implementation so far. > > > > chris > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > Mspgcc-users mailing list > > Mspgcc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/04