[Gtkradiant] r334 - GtkRadiant/trunk/radiant

svn-noreply at zerowing.idsoftware.com svn-noreply at zerowing.idsoftware.com
Sat Nov 13 19:40:25 CST 2010

Author: rambetter
Date: Sat Nov 13 19:40:25 2010
New Revision: 334

In Radiant main() method, add putenv("LC_NUMERIC=C").
sscanf() and *printf() calls are all over the code, which are
locale-sensitive.  gtk_init() sets all locales.  So if you're in
Germany, your printf()'s will output e.g. "10,5" for ten and
a half.  Reading floating points with sscanf() is also totally broken
in locales such as Germany.  So, we can't really get rid of all the
*scanf()'s and the *printf()'s.  Instead, set LC_NUMERIC to "C".

Modified: GtkRadiant/trunk/radiant/main.cpp
Url: http://zerowing.idsoftware.com/viewcvs/radiant/GtkRadiant/trunk/radiant/main.cpp?view=diff&rev=334&p1=GtkRadiant/trunk/radiant/main.cpp&r1=333&p2=GtkRadiant/trunk/radiant/main.cpp&r2=334

More information about the Gtkradiant mailing list