r5793 - trunk/eda/fped
werner at docs.openmoko.org
werner at docs.openmoko.org
Mon Jan 18 23:57:50 CET 2010
Author: werner
Date: 2010-01-18 23:57:49 +0100 (Mon, 18 Jan 2010)
New Revision: 5793
Modified:
trunk/eda/fped/gui.c
Log:
gtk_init calls setlocale(..., ""), which can upset all uses of scanf, printf,
etc. We restore sanity by resetting the locale to "C". Reported by Nick
Oestergaard.
- gui.c (gui_init): reset the locale to "C" after calling gtk_init
Modified: trunk/eda/fped/gui.c
===================================================================
--- trunk/eda/fped/gui.c 2010-01-12 02:18:58 UTC (rev 5792)
+++ trunk/eda/fped/gui.c 2010-01-18 22:57:49 UTC (rev 5793)
@@ -11,6 +11,7 @@
*/
+#include <locale.h>
#include <gtk/gtk.h>
#include "inst.h"
@@ -303,6 +304,7 @@
int gui_init(int *argc, char ***argv)
{
gtk_init(argc, argv);
+ setlocale(LC_ALL, "C"); /* damage control */
return 0;
}
More information about the commitlog
mailing list