/ast/src/lib/libast/tm/ |
H A D | tmequiv.c | 30 #include <tm.h> 50 * return the circa 2000 equivalent calendar year for tm 54 tmequiv(Tm_t* tm) argument 56 return tm->tm_year < (2038 - 1900) ? (tm->tm_year + 1900) : equiv[tm->tm_wday + tmisleapyear(tm->tm_year)];
|
H A D | tmtime.c | 38 tmtime(register Tm_t* tm, int west) argument 40 return tmxsec(tmxtime(tm, west));
|
H A D | tmweek.c | 48 * if week<0 then return week for tm 49 * if day<0 then set tm to first day of week 50 * otherwise set tm to day in week 51 * and return tm->tm_yday 55 tmweek(Tm_t* tm, int type, int week, int day) argument 61 if ((day = tm->tm_wday - tm->tm_yday % 7) < 0) 63 week = (tm->tm_yday + offset[day][type]) / 7; 67 week = (day > 0 && day < 6 || tmisleapyear(tm->tm_year - 1)) ? 53 : 52; 68 else if (week == 53 && (tm [all...] |
H A D | tmfix.c | 37 * correct out of bounds fields in tm 41 * tm is the return value 45 tmfix(register Tm_t* tm) argument 58 if (w = !tm->tm_sec && !tm->tm_min && !tm->tm_mday && !tm->tm_year && !tm->tm_yday && !tm->tm_isdst) 60 tm [all...] |
H A D | tmxtime.c | 42 * with other tm*() that may return static Tm_t* 46 tmxtime(register Tm_t* tm, int west) argument 54 struct tm* tl; 58 ts = *tm; 59 to = tm; 60 tm = &ts; 62 tmfix(tm); 63 y = tm->tm_year; 68 if ((n = tm->tm_mon) > 11) 73 t += tm_data.sum[n] + tm [all...] |
H A D | tmxmake.c | 40 tmxtm(register Tm_t* tm, Time_t t, Tm_zone_t* zone) argument 42 register struct tm* tp; 68 if (!(tm->tm_zone = zone)) 71 tm->tm_zone = &tm_data.zone[2]; 73 tm->tm_zone = tm_info.zone; 75 if ((o = 60 * tm->tm_zone->west) && x > o) 84 tm->tm_sec = n % 60 + leapsec; 86 tm->tm_min = n % 60; 88 tm->tm_hour = n % 24; 91 tm [all...] |
H A D | tmxfmt.c | 116 Tm_t* tm; local 126 tm = tmxtm(&ts, t, NiL); 247 n = TM_DAY_ABBREV + tm->tm_wday; 250 n = TM_DAY + tm->tm_wday; 254 n = TM_MONTH_ABBREV + tm->tm_mon; 257 n = TM_MONTH + tm->tm_mon; 263 cp = number(cp, ep, (long)(1900 + tm->tm_year) / 100, 2, width, pad); 266 cp = number(cp, ep, (long)tm->tm_mday, 2, width, pad); 272 cp = number(cp, ep, (long)tm->tm_mday, -2, width, pad); 282 n = tm [all...] |
H A D | tmxscan.c | 70 * generate a Time_t from tm + set 74 gen(register Tm_t* tm, register Set_t* set) argument 81 tm->tm_year = set->year; 84 if (set->year < 0 && set->mon < tm->tm_mon) 85 tm->tm_year++; 86 tm->tm_mon = set->mon; 88 tm->tm_mday = set->mday = 1; 94 tmweek(tm, set->weektype, set->week, set->wday); 102 tm->tm_mon = 0; 103 tm 174 register Tm_t* tm; local [all...] |
H A D | tmxdate.c | 120 * normalize <p,q> to power of 10 u in tm 124 powerize(Tm_t* tm, unsigned long p, unsigned long q, unsigned long u) argument 138 tm->tm_nsec += (int)(t % TMX_RESOLUTION); 139 tm->tm_sec += (int)(t / TMX_RESOLUTION); 159 register Tm_t* tm; local 209 tm = tmxtm(&ts, now, NiL); 210 tm_info.date = tm->tm_zone; 272 now = tmxtime(tm, zone); 285 otm = *tm; 318 tm [all...] |
/ast/src/lib/libast/misc/ |
H A D | debug.c | 46 double tm; local 52 tm = (double)ru.ru_utime.tv_sec + (double)ru.ru_utime.tv_usec/1000000.0; 54 return prev = tm; 55 return tm - prev;
|
/ast/src/lib/libast/string/ |
H A D | fmtls.c | 32 #include <tm.h> 55 time_t tm; local 87 tm = (flags & LS_ATIME) ? st->st_atime : (flags & LS_CTIME) ? st->st_ctime : st->st_mtime; 88 s = tmfmt(s, LS_W_LONG / 2, "%?%QL", &tm);
|
/ast/src/lib/libast/sfio/ |
H A D | sfpoll.c | 32 int sfpoll(Sfio_t** fa, reg int n, int tm) argument 34 int sfpoll(fa, n, tm) 37 int tm; /* time in millisecs for select/poll */ 83 { if((m = (*f->disc->exceptf)(f,SF_DPOLL,&tm,f->disc)) < 0) 138 while((np = SFPOLL(fds,m,tm)) < 0 ) 192 if(tm < 0) 196 tmb.tv_sec = tm/SECOND; 197 tmb.tv_usec = (tm%SECOND)*SECOND;
|
H A D | sfpkrd.c | 40 ssize_t sfpkrd(int fd, Void_t* argbuf, size_t n, int rc, long tm, int action) argument 42 ssize_t sfpkrd(fd, argbuf, n, rc, tm, action) 47 long tm; /* time-out */ 58 if(rc < 0 && tm < 0 && action <= 0) 73 if((t&STREAM_PEEK) && (ntry == 1 || tm < 0) ) 128 while(tm >= 0 || action > 0 || 142 if((r = SFPOLL(&po,1,tm)) < 0) 164 if(tm < 0) 168 tmb.tv_sec = tm/SECOND; 169 tmb.tv_usec = (tm [all...] |
/ast/src/lib/libpp/ |
H A D | ppbuiltin.c | 194 time_t tm; local 196 time(&tm); 197 a = p = ctime(&tm) + 4; 226 time_t tm; local 228 time(&tm); 229 p = ctime(&tm) + 11;
|
/ast/src/lib/libvgraph/ |
H A D | kpvdebug.h | 27 { double tm; local 30 tm = (double)u.ru_utime.tv_sec + (double)u.ru_utime.tv_usec/1000000.0; 31 return tm;
|
/ast/src/cmd/pax/ |
H A D | pax-tnef.c | 28 #include <tm.h> 72 Tm_t tm; local 141 tm.tm_year = swapget(ap->swap, s + 0, 2) - 1900; 142 tm.tm_mon = swapget(ap->swap, s + 2, 2) - 1; 143 tm.tm_mday = swapget(ap->swap, s + 4, 2); 144 tm.tm_hour = swapget(ap->swap, s + 6, 2); 145 tm.tm_min = swapget(ap->swap, s + 8, 2); 146 tm.tm_sec = swapget(ap->swap, s + 10, 2); 147 f->st->st_mtime = tmtime(&tm, TM_LOCALZONE);
|
/ast/src/cmd/paxlib/arj/ |
H A D | arj.c | 29 #include <tm.h> 112 Tm_t tm; local 179 memset(&tm, 0, sizeof(tm)); 180 tm.tm_year = ((dostime >> (16+9)) & 0x7f) + 80; 181 tm.tm_mon = ((dostime >> (16+5)) & 0x0f) - 1; 182 tm.tm_mday = ((dostime >> (16+0)) & 0x1f); 183 tm.tm_hour = ((dostime >> 11) & 0x1f); 184 tm.tm_min = ((dostime >> 5) & 0x3f); 185 tm [all...] |
/ast/src/cmd/paxlib/lha/ |
H A D | lha.c | 30 #include <tm.h> 102 Tm_t tm; local 164 memset(&tm, 0, sizeof(tm)); 165 tm.tm_year = ((dostime >> (16+9)) & 0x7f) + 80; 166 tm.tm_mon = ((dostime >> (16+5)) & 0x0f) - 1; 167 tm.tm_mday = ((dostime >> (16+0)) & 0x1f); 168 tm.tm_hour = ((dostime >> 11) & 0x1f); 169 tm.tm_min = ((dostime >> 5) & 0x3f); 170 tm [all...] |
/ast/src/cmd/paxlib/rar/ |
H A D | rar.c | 29 #include <tm.h> 93 Tm_t tm; local 193 memset(&tm, 0, sizeof(tm)); 194 tm.tm_year = ((dostime >> (16+9)) & 0x7f) + 80; 195 tm.tm_mon = ((dostime >> (16+5)) & 0x0f) - 1; 196 tm.tm_mday = ((dostime >> (16+0)) & 0x1f); 197 tm.tm_hour = ((dostime >> 11) & 0x1f); 198 tm.tm_min = ((dostime >> 5) & 0x3f); 199 tm [all...] |
/ast/src/lib/libexpr/ |
H A D | exeval.c | 31 #include <tm.h> 137 time_t tm; local 281 if ((tm = *((Sflong_t*)vp)) == -1) 282 tm = time(NiL); 283 *((char**)vp) = fmttime(txt ? txt : "%?%K", tm);
|
/ast/src/cmd/nmake/ |
H A D | make.c | 37 makescan(register Rule_t* r, Time_t* tm) argument 59 *tm = tevent;
|
H A D | misc.c | 321 Time_t tm; local 423 if (!isdigit(*s) || ((tm = timenum(s, &e)), *e)) 424 tm = tmxdate(s, &e, TMX_NOW); 425 if (*e || tm == TMX_NOTIME) 426 tm = CURTIME; 427 value->s = txt ? fmttmx(txt, tm) : timestr(tm);
|
H A D | state.c | 702 Time_t tm; local 710 for (p = scan(r, &tm); p; p = p->next)
|
/ast/src/cmd/paxlib/zoo/ |
H A D | zoo.c | 32 #include <tm.h> 98 Tm_t tm; local 238 memset(&tm, 0, sizeof(tm)); 239 tm.tm_year = ((dosdate >> 9) & 0x7f) + 80; 240 tm.tm_mon = ((dosdate >> 5) & 0x0f) - 1; 241 tm.tm_mday = ((dosdate ) & 0x1f); 242 tm.tm_hour = ((dostime >> 11) & 0x1f); 243 tm.tm_min = ((dostime >> 5) & 0x3f); 244 tm [all...] |
/ast/src/cmd/dsslib/time_t/ |
H A D | time_t.c | 397 Tm_t tm; member in struct:Tm_state_s 411 state->tm = *tmxmake(state->t); 438 state->tm = *tmxmake(t); 443 r->value.number = state->tm.tm_sec; 446 r->value.number = state->tm.tm_min; 449 r->value.number = state->tm.tm_hour; 452 r->value.number = state->tm.tm_mday; 455 r->value.number = state->tm.tm_mon; 458 r->value.number = 1900 + state->tm.tm_year; 461 r->value.number = state->tm [all...] |