equal
deleted
inserted
replaced
4 |
4 |
5 #include <stdio.h> |
5 #include <stdio.h> |
6 #include <sys/timeb.h> |
6 #include <sys/timeb.h> |
7 #include <time.h> |
7 #include <time.h> |
8 #include <windows.h> |
8 #include <windows.h> |
|
9 #include <locale.h> |
9 |
10 |
10 /* provided by POUS.C */ |
11 /* provided by POUS.C */ |
11 extern unsigned long long common_ticktime__; |
12 extern unsigned long long common_ticktime__; |
12 |
13 |
13 long AtomicCompareExchange(long* atomicvar, long compared, long exchange) |
14 long AtomicCompareExchange(long* atomicvar, long compared, long exchange) |
60 |
61 |
61 #define maxval(a,b) ((a>b)?a:b) |
62 #define maxval(a,b) ((a>b)?a:b) |
62 int startPLC(int argc,char **argv) |
63 int startPLC(int argc,char **argv) |
63 { |
64 { |
64 unsigned long thread_id = 0; |
65 unsigned long thread_id = 0; |
|
66 setlocale(LC_NUMERIC, "C"); |
65 /* Define Ttick to 1ms if common_ticktime not defined */ |
67 /* Define Ttick to 1ms if common_ticktime not defined */ |
66 Ttick = common_ticktime__?common_ticktime__:1000000; |
68 Ttick = common_ticktime__?common_ticktime__:1000000; |
67 |
69 |
68 debug_sem = CreateSemaphore( |
70 debug_sem = CreateSemaphore( |
69 NULL, // default security attributes |
71 NULL, // default security attributes |