Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] snprintf, again
Home

Re: [Freeciv-Dev] snprintf, again

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] snprintf, again
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 26 Aug 1999 12:58:23 +0200

Alex Zepeda <jazepeda@xxxxxxxxxxx> writes:

> When (most likely if) I drop in snprintf, I'll most likely take Theo's
> implementation.  It's small, tidy and it works w/ Solaris[1].  If it
> doesn't work on MacOS or Win32, well, some *other* solution should be
> worked out for those platforms, while maintaing simple code on the
> platforms that support it.

Does it do %-parsing itself? I think that would be overkill, and would 
perhaps have subtle differences to the native %-parsing.

For Freeciv, I think we should use the simplest possible solution. If
it crashes, you don't really loose much. Avoiding buffer overrun
exploits would be nice, and David's idea would do that.

> * What about use of a true string class.  I would much favor QTL over STL
> for size and speed (and it's more portable to boot), but STL offers many
> of the same advantages. This would remedy the sprintf issues before they
> become an issue but would introduce a probably unwanted dependency on C++.

What's QTL? Well, I would really like to use that, too, but there are
too many people using Freeciv on machines with only C available. I
especially miss map<>...


        Falk


[Prev in Thread] Current Thread [Next in Thread]