Fixed some problems win 32 bits GCC and Long Long literals
authoretisserant
Wed, 01 Aug 2007 13:50:14 +0200
changeset 48 3d24cc85bb3c
parent 47 017efb738d95
child 49 c96d1a4c23f8
Fixed some problems win 32 bits GCC and Long Long literals
lib/iec_std_lib.h
--- a/lib/iec_std_lib.h	Thu Jul 26 17:18:36 2007 +0200
+++ b/lib/iec_std_lib.h	Wed Aug 01 13:50:14 2007 +0200
@@ -676,23 +676,25 @@
     return res;
 }
     /* BCD */
+#define __bcd_digit(fac) 
 static inline ULINT __bcd_to_uint(LWORD IN){
     return IN & 0xf +
-           ((IN >>= 4) & 0xf) * 10 + 
-           ((IN >>= 4) & 0xf) * 100 + 
-           ((IN >>= 4) & 0xf) * 1000 + 
-           ((IN >>= 4) & 0xf) * 10000 + 
-           ((IN >>= 4) & 0xf) * 100000 + 
-           ((IN >>= 4) & 0xf) * 1000000 + 
-           ((IN >>= 4) & 0xf) * 10000000 + 
-           ((IN >>= 4) & 0xf) * 100000000 + 
-           ((IN >>= 4) & 0xf) * 1000000000 + 
-           ((IN >>= 4) & 0xf) * 10000000000 + 
-           ((IN >>= 4) & 0xf) * 100000000000 + 
-           ((IN >>= 4) & 0xf) * 1000000000000 + 
-           ((IN >>= 4) & 0xf) * 10000000000000 + 
-           ((IN >>= 4) & 0xf) * 100000000000000 + 
-           ((IN >>= 4) & 0xf) * 1000000000000000;
+           !(IN >>= 4) ? 0 : IN & 0xf * 10ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 100ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 1000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 10000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 100000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 1000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 10000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 100000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 1000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 10000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 100000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 1000000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 10000000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 100000000000000ULL + 
+           !(IN >>= 4) ? 0 : IN & 0xf * 1000000000000000ULL;
+           
 }
 static inline LWORD __uint_to_bcd(ULINT IN){
     return (IN - (IN /= 10))|