Merge changes.
authormjsousa <msousa@fe.up.pt>
Wed, 09 May 2012 23:04:03 +0100
changeset 548 7cc08964e0a7
parent 547 dab341e80664 (current diff)
parent 539 1ff26534a54f (diff)
child 549 af9517cad953
Merge changes.
stage4/generate_c/generate_c.cc
--- a/lib/iec_std_lib.h	Wed May 09 23:00:10 2012 +0100
+++ b/lib/iec_std_lib.h	Wed May 09 23:04:03 2012 +0100
@@ -261,6 +261,7 @@
   broken_down_time.tm_mday = day;  /* day of month, from 1 to 31 */
   broken_down_time.tm_mon = month - 1;   /* month since January, in the range 0 to 11 */
   broken_down_time.tm_year = year - 1900;  /* number of years since 1900 */
+  broken_down_time.tm_isdst = 0; /* disable daylight savings time */
 
   epoch_seconds = mktime(&broken_down_time); /* determine number of seconds since the epoch, i.e. Jan 1st 1970 */
   if ((time_t)(-1) == epoch_seconds)
@@ -568,16 +569,16 @@
     }
     if(IN.tv_nsec == 0){
         res.len = snprintf((char*)&res.body, STR_MAX_LEN, "DT#%d-%2.2d-%2.2d-%2.2d:%2.2d:%d",
-                 broken_down_time->tm_year,
-                 broken_down_time->tm_mon,
+                 broken_down_time->tm_year + 1900,
+                 broken_down_time->tm_mon  + 1,
                  broken_down_time->tm_mday,
                  broken_down_time->tm_hour,
                  broken_down_time->tm_min,
                  broken_down_time->tm_sec);
     }else{
         res.len = snprintf((char*)&res.body, STR_MAX_LEN, "DT#%d-%2.2d-%2.2d-%2.2d:%2.2d:%g",
-                 broken_down_time->tm_year,
-                 broken_down_time->tm_mon,
+                 broken_down_time->tm_year + 1900,
+                 broken_down_time->tm_mon  + 1,
                  broken_down_time->tm_mday,
                  broken_down_time->tm_hour,
                  broken_down_time->tm_min,
--- a/stage4/generate_c/generate_c.cc	Wed May 09 23:00:10 2012 +0100
+++ b/stage4/generate_c/generate_c.cc	Wed May 09 23:04:03 2012 +0100
@@ -1665,7 +1665,8 @@
   s4o.print(s4o.indent_spaces);
   vardecl = new generate_c_vardecl_c(&s4o,
                                      generate_c_vardecl_c::constructorinit_vf,
-                                     generate_c_vardecl_c::global_vt);
+                                     generate_c_vardecl_c::global_vt,
+                                     symbol->configuration_name);
   vardecl->print(symbol);
   delete vardecl;
   s4o.print("\n");