[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-dev: [Patch] Gerbx: Use LC_NUMERIC for drill.c too( was:Gerbv ans strtod)



On Thu, May 17, 2007 at 12:09:04PM +0200, Uwe Bonnes wrote:
> >>>>> "Gabriel" == Gabriel Paubert <paubert@iram.es> writes:
> 
>     Gabriel> On Wed, May 16, 2007 at 08:00:46PM +0200, Uwe Bonnes wrote:
>     >> Hallo,
>     >> 
>     >> appended patch defined LC_NUMERIC also for gerbv.c.
>     >> 
>     >> This makes the warnings > Tool is wrong size: 0 > Warning: Tool 01
>     >> used without being defined
>     >> 
> 
>     Gabriel> Note that all programs that already link with glib (this
>     Gabriel> includes all gtk programs) do not need to reinvent the wheel:
>     Gabriel> they can use glib's g_ascii_strtod().
> 
>     Gabriel> The downside is that you have to go through all the code and
>     Gabriel> change all conversions between floating-point and text that are
>     Gabriel> affected (not the user interface ones). Besides that, it can
>     Gabriel> become more complex for things like writing to file, since
>     Gabriel> there is no locale independent variant of fprintf.
> 
> Another file in gerbv already uses setlocale(LC_NUMERIC). So my patch sticks
> to that to that convention. But thanks for the hint
> 

Then why did you run into the problems? Do you save and restore the
locale or could we just decide thet gerbv has to set LC_NUMERIC to
"C" early when initializing.

	Gabriel


_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev