[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB Gtk port



On Mon, 7 Mar 2005, Bill Wilson wrote:

>     gtk_set_locale();
>     setlocale(LC_NUMERIC, "POSIX");  /* use decimal point instead of comma, use "C" or "POSIX" */
>     gtk_disable_setlocale();
>     gtk_init(argc, argv);

That seems to be the best solution for me. Imagine you develop in Germany and
send your design to USA or make it open to everyone. In my opinion one should
always set LC_NUMERIC to POSIX in programs like that.

>     http://members.dslextreme.com/users/billw/test/pcb-gtk.tar.gz
>
> --- parse_l.l.orig	2005-03-07 18:59:17.000000000 -0600
> +++ parse_l.l	2005-03-07 18:59:42.000000000 -0600
> @@ -89,7 +89,7 @@ static	int		Parse(char *, char *, char *
> -FLOATING                -?[0-9]*"."[0-9]*
> +FLOATING                -?[0-9]*["."","][0-9]*

Well, is it guaranteed to be either ',' or '.' in all locales? IMHO whatever
locale we are in we should always save files in the same format, that means
using '.'.

Best regards,
--
Tomasz Motylewski
BFAD GmbH