Searched refs:tm (Results 1 - 25 of 113) sorted by relevance

12345

/ast/src/lib/libast/tm/
H A Dtmequiv.c30 #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 Dtmfix.c37 * 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 Dtmweek.c48 * 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 Dtmtime.c38 tmtime(register Tm_t* tm, int west) argument
40 return tmxsec(tmxtime(tm, west));
H A Dtmxtime.c42 * 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 Dtmxmake.c40 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 Dtmform.c33 #include <tm.h>
H A Dtmxdate.c120 * 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...]
H A Dtmxscan.c70 * 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 Dtmxfmt.c116 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 Dtmsleep.c31 #include <tm.h>
H A Dtmpoff.c31 #include <tm.h>
H A Dtmtype.c31 #include <tm.h>
/ast/src/lib/libast/comp/
H A Dstrftime.c30 #include <tm.h>
50 strftime(char* buf, size_t len, const char* format, const struct tm* tm)
59 * nl_langinfo() may call strftime() with bogus tm except for
63 if (tm->tm_sec < 0 || tm->tm_sec > 60 ||
64 tm->tm_min < 0 || tm->tm_min > 59 ||
65 tm->tm_hour < 0 || tm
[all...]
H A Dstrptime.c48 strptime(const char* s, const char* format, struct tm* ts)
53 Tm_t tm;
55 memset(&tm, 0, sizeof(tm));
56 tm.tm_sec = ts->tm_sec;
57 tm.tm_min = ts->tm_min;
58 tm.tm_hour = ts->tm_hour;
59 tm.tm_mday = ts->tm_mday;
60 tm.tm_mon = ts->tm_mon;
61 tm
[all...]
H A Dmktime.c30 #include <tm.h>
50 mktime(struct tm* ts)
53 Tm_t tm;
55 tm.tm_sec = ts->tm_sec;
56 tm.tm_min = ts->tm_min;
57 tm.tm_hour = ts->tm_hour;
58 tm.tm_mday = ts->tm_mday;
59 tm.tm_mon = ts->tm_mon;
60 tm.tm_year = ts->tm_year;
61 tm
[all...]
H A Dgetdate.c30 #include <tm.h>
53 extern struct tm*
59 Tm_t* tm;
61 static struct tm ts;
70 tm = tmmake(&t);
71 ts.tm_sec = tm->tm_sec;
72 ts.tm_min = tm->tm_min;
73 ts.tm_hour = tm->tm_hour;
74 ts.tm_mday = tm->tm_mday;
75 ts.tm_mon = tm
[all...]
/ast/src/lib/libast/misc/
H A Ddebug.c46 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/sfio/
H A Dsfpkrd.c40 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/libast/string/
H A Dfmttv.c25 #include <tm.h>
H A Dfmtclock.c29 #include <tm.h>
H A Dfmtls.c32 #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/cmd/dsslib/time_t/
H A Dtime_t.c397 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...]
/ast/src/cmd/paxlib/zoo/
H A Dzoo.c32 #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/lib/libvgraph/
H A Dkpvdebug.h27 { double tm; local
30 tm = (double)u.ru_utime.tv_sec + (double)u.ru_utime.tv_usec/1000000.0;
31 return tm;

Completed in 97 milliseconds

12345