Mail Archives: djgpp/2003/08/04/03:05:19
On 04 Aug 2003 08:56:55 +0200, Eli Zaretskii wrote:
> ``Several hundred KB of code'' is an extreme exaggeration: if you
> look closely at fcvt, you will see that all you need is 3 files:
> fcvt.c, fcvtbuf.c, and ecvtbuf.c, for a grand total of 4400 bytes.
>
> As for localeconv()->decimal_point[0], you could simply replace it
> with a `.' and be done with that.
OK, so I exaggerated ^_^ I'll check it out and do a complete walk
to be sure. Thanks for the tip on the locale function though. I
shouldn't need support for that in this particular piece of code.
> You can get only the 3 files in question via the CVSWeb interface to
> the DJGPP sources. See
>
> http://www.delorie.com/djgpp/cvs.html
>
Yeah, its easy to get code over CVS. I meant it would take a long
time if I wanted to fully upgrade my DJGPP installation.
> If that DOOM version requires an older Allegro library, it was
> probably already ported to DJGPP, and so someone who did that port
> already found a solution for fcvt, right? So how come you need to
> reinvent that solution?
I actively maintain this program. Besides adding tons of features and
bug fixes, I've also ported it to several other platforms (on which it
uses SDL rather than Allegro). I only still support DOS because its
relatively easy to keep it working, and there's a few very oldschool
people in the DOOM community that prefer it. The code that is in
question here is a "portable" snprintf implementation which I have added
recently because some of my target platforms totally lack or have
questionable implementations of snprintf and vsnprintf. It uses the
fcvt function in one place in its double formatting code.
James Haley
- Raw text -