boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

date-time-stub.before (489B)


      1     } else if (tok == TOK___DATE__ || tok == TOK___TIME__) {
      2         time_t ti;
      3         struct tm *tm;
      4 
      5         time(&ti);
      6         tm = localtime(&ti);
      7         if (tok == TOK___DATE__) {
      8             snprintf(buf, sizeof(buf), "%s %2d %d", 
      9                      ab_month_name[tm->tm_mon], tm->tm_mday, tm->tm_year + 1900);
     10         } else {
     11             snprintf(buf, sizeof(buf), "%02d:%02d:%02d", 
     12                      tm->tm_hour, tm->tm_min, tm->tm_sec);
     13         }
     14         cstrval = buf;