mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-25 19:02:29 +02:00
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 git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5793 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
8a0039f202
commit
9c22c1b2e5
2
gui.c
2
gui.c
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "inst.h"
|
#include "inst.h"
|
||||||
@ -303,6 +304,7 @@ static void make_screen(GtkWidget *window)
|
|||||||
int gui_init(int *argc, char ***argv)
|
int gui_init(int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
gtk_init(argc, argv);
|
gtk_init(argc, argv);
|
||||||
|
setlocale(LC_ALL, "C"); /* damage control */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user