delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/04/03:05:19

From: Quasar <haleyjd AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Alternative to fcvt for older DJGPP?
Date: 04 Aug 2003 06:43:37 GMT
Organization: Concentric Internet Services
Lines: 39
Message-ID: <15oavr9z6uf0m$.1l1oz07obzrud.dlg@40tude.net>
References: <76uzeozd7s3g.1sgoajp58hmqa$.dlg AT 40tude DOT net> <u4r0y6k6x DOT fsf AT elta DOT co DOT il> <1sb2cgsjrn9c1.1qat04crl2pqh$.dlg AT 40tude DOT net> <uwudt6hc8 DOT fsf AT elta DOT co DOT il>
NNTP-Posting-Host: 66.238.152.107
Mime-Version: 1.0
User-Agent: 40tude_Dialog/2.0.3.1
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019