Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/
Home

[Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8615) RFC: Splitting common/
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 1 May 2004 00:07:24 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8615 >

On Fri, Apr 30, 2004 at 10:54:56PM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8615 >
> 
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=8615 >
> > 
> > On Fri, Apr 30, 2004 at 05:38:34PM -0700, Jason Short wrote:
> > 
> >><URL: http://rt.freeciv.org/Ticket/Display.html?id=8615 >
> >>
> >>Per I. Mathisen wrote:
> >>
> >>>-static const char *general_int_to_text(int nr, int decade_exponent)
> >>>+const char *general_int_to_text(int nr, int decade_exponent)
> >>
> >>I have no idea what this function does just by looking at the prototype. 
> >>  nr?  decade?  general int?  If we make it public it should be more 
> >>self-explanatory.
> > 
> > It is more like a "format_big_number" the big number is given as a
> > mantissa ("nr") and a factor. The factor has the form
> > 10^exponent. exponent is "decade_exponent".
> 
> As "general" as this function may be, it should be changed to 
> int_to_text.  Then the caller (in the city code) can multiply by 1000.

You know that the reason for the function (and the exponent) is that
the final number can be >2^32?!

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "It is not yet possible to change operating system by writing
  to /proc/sys/kernel/ostype."              sysctl(2) man page




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