# HG changeset patch
# User edouard
# Date 1296577721 -3600
# Node ID 20a223828a06644e06b95655cb530d867bf82939
# Parent  72b51ec5be642b746d46494c0f155eda600a1b4a
Moved locales out of platform agnostic C template

diff -r 72b51ec5be64 -r 20a223828a06 targets/Linux/plc_Linux_main.c
--- a/targets/Linux/plc_Linux_main.c	Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/Linux/plc_Linux_main.c	Tue Feb 01 17:28:41 2011 +0100
@@ -8,6 +8,7 @@
 #include <signal.h>
 #include <stdlib.h>
 #include <pthread.h>
+#include <locale.h>
 
 /* provided by POUS.C */
 extern unsigned long long common_ticktime__;
@@ -75,6 +76,7 @@
 int startPLC(int argc,char **argv)
 {
     struct sigevent sigev;
+    setlocale(LC_NUMERIC, "C");
     /* Define Ttick to 1ms if common_ticktime not defined */
     Ttick = common_ticktime__?common_ticktime__:1000000;
 
diff -r 72b51ec5be64 -r 20a223828a06 targets/Win32/plc_Win32_main.c
--- a/targets/Win32/plc_Win32_main.c	Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/Win32/plc_Win32_main.c	Tue Feb 01 17:28:41 2011 +0100
@@ -6,6 +6,7 @@
 #include <sys/timeb.h>
 #include <time.h>
 #include <windows.h>
+#include <locale.h>
 
 /* provided by POUS.C */
 extern unsigned long long common_ticktime__;
@@ -62,6 +63,7 @@
 int startPLC(int argc,char **argv)
 {
 	unsigned long thread_id = 0;
+    setlocale(LC_NUMERIC, "C");
 	/* Define Ttick to 1ms if common_ticktime not defined */
     Ttick = common_ticktime__?common_ticktime__:1000000;
 
diff -r 72b51ec5be64 -r 20a223828a06 targets/plc_common_main.c
--- a/targets/plc_common_main.c	Tue Feb 01 11:05:07 2011 +0100
+++ b/targets/plc_common_main.c	Tue Feb 01 17:28:41 2011 +0100
@@ -2,7 +2,6 @@
  * Code common to all C targets
  **/
 
-#include <locale.h>
 #include "iec_types.h"
 /*
  * Prototypes of functions provided by generated C softPLC
@@ -67,7 +66,6 @@
 {
     int res = 0;
     init_level = 0;
-    setlocale(LC_NUMERIC, "C");
     config_init__();
     __init_debug();
     %(init_calls)s