Home
last modified time | relevance | path

Searched refs:tm (Results 1 – 25 of 772) sorted by relevance

12345678910>>...31

/NextBSD/sys/kern/
HDsubr_terminal.c57 #define TERMINAL_LOCK(tm) do { \ argument
58 if ((tm)->tm_flags & TF_CONS) \
59 mtx_lock_spin(&(tm)->tm_mtx); \
60 else if ((tm)->tm_tty != NULL) \
61 tty_lock((tm)->tm_tty); \
63 #define TERMINAL_UNLOCK(tm) do { \ argument
64 if ((tm)->tm_flags & TF_CONS) \
65 mtx_unlock_spin(&(tm)->tm_mtx); \
66 else if ((tm)->tm_tty != NULL) \
67 tty_unlock((tm)->tm_tty); \
[all …]
/NextBSD/crypto/heimdal/lib/roken/
HDstrftime.c124 week_number_sun (const struct tm *tm) in week_number_sun() argument
126 return (tm->tm_yday + 7 - (tm->tm_yday % 7 - tm->tm_wday + 7) % 7) / 7; in week_number_sun()
135 week_number_mon (const struct tm *tm) in week_number_mon() argument
137 int wday = (tm->tm_wday + 6) % 7; in week_number_mon()
139 return (tm->tm_yday + 7 - (tm->tm_yday % 7 - wday + 7) % 7) / 7; in week_number_mon()
149 week_number_mon4 (const struct tm *tm) in week_number_mon4() argument
151 int wday = (tm->tm_wday + 6) % 7; in week_number_mon4()
152 int w1day = (wday - tm->tm_yday % 7 + 7) % 7; in week_number_mon4()
155 ret = (tm->tm_yday + w1day) / 7; in week_number_mon4()
171 const struct tm *tm) in strftime() argument
[all …]
HDtimegm.c51 rk_timegm (struct tm *tm) in rk_timegm() argument
59 if (tm->tm_year < 0) in rk_timegm()
61 if (tm->tm_mon < 0 || tm->tm_mon > 11) in rk_timegm()
63 if (tm->tm_mday < 1 || tm->tm_mday > ndays[is_leap(tm->tm_year)][tm->tm_mon]) in rk_timegm()
65 if (tm->tm_hour < 0 || tm->tm_hour > 23) in rk_timegm()
67 if (tm->tm_min < 0 || tm->tm_min > 59) in rk_timegm()
69 if (tm->tm_sec < 0 || tm->tm_sec > 59) in rk_timegm()
72 for (i = 70; i < tm->tm_year; ++i) in rk_timegm()
75 for (i = 0; i < tm->tm_mon; ++i) in rk_timegm()
76 res += ndays[is_leap(tm->tm_year)][i]; in rk_timegm()
[all …]
/NextBSD/usr.sbin/newsyslog/
HDptimes.c74 struct tm basetm; /* Base Time expanded into fields */
75 struct tm tm; /* Time expanded into fields */ member
133 struct tm tm; in parse8601() local
144 tm = ptime->tm; in parse8601()
148 tm.tm_year = ((l / 1000000) - 19) * 100; in parse8601()
152 tm.tm_year -= tm.tm_year % 100; in parse8601()
153 tm.tm_year += l / 10000; in parse8601()
157 tm.tm_mon = (l / 100) - 1; in parse8601()
161 tm.tm_mday = l; in parse8601()
169 if (tm.tm_year < 70 || tm.tm_mon < 0 || tm.tm_mon > 12 in parse8601()
[all …]
/NextBSD/crypto/heimdal/lib/asn1/
HDtimegm.c56 _der_timegm (struct tm *tm) in _der_timegm() argument
64 if (tm->tm_year > ASN1_MAX_YEAR) in _der_timegm()
67 if (tm->tm_year < 0) in _der_timegm()
69 if (tm->tm_mon < 0 || tm->tm_mon > 11) in _der_timegm()
71 if (tm->tm_mday < 1 || tm->tm_mday > (int)ndays[is_leap(tm->tm_year)][tm->tm_mon]) in _der_timegm()
73 if (tm->tm_hour < 0 || tm->tm_hour > 23) in _der_timegm()
75 if (tm->tm_min < 0 || tm->tm_min > 59) in _der_timegm()
77 if (tm->tm_sec < 0 || tm->tm_sec > 59) in _der_timegm()
80 for (i = 70; i < tm->tm_year; ++i) in _der_timegm()
83 for (i = 0; i < tm->tm_mon; ++i) in _der_timegm()
[all …]
HDcheck-timegm.c42 struct tm tm; in test_timegm() local
45 memset(&tm, 0, sizeof(tm)); in test_timegm()
46 tm.tm_year = 106; in test_timegm()
47 tm.tm_mon = 9; in test_timegm()
48 tm.tm_mday = 1; in test_timegm()
49 tm.tm_hour = 10; in test_timegm()
50 tm.tm_min = 3; in test_timegm()
52 t = _der_timegm(&tm); in test_timegm()
56 tm.tm_mday = 0; in test_timegm()
57 t = _der_timegm(&tm); in test_timegm()
[all …]
/NextBSD/gnu/usr.bin/rcs/lib/
HDmaketime.c49 static int month_days P((struct tm const*));
75 month_days(tm) in month_days() argument
76 struct tm const *tm; in month_days()
78 int m = tm->tm_mon;
80 + (m==1 && isleap(tm->tm_year + TM_YEAR_ORIGIN));
87 struct tm *
92 struct tm *tm; local
98 if (localzone || !(tm = gmtime(&unixtime)))
99 tm = localtime(&unixtime);
100 return tm;
[all …]
HDpartime.c210 t->tm.tm_sec = t->tm.tm_min = t->tm.tm_hour = t->tm.tm_mday = t->tm.tm_mon
211 = t->tm.tm_year = t->tm.tm_wday = t->tm.tm_yday
469 s = parse_fixed (s, 4, &t->tm.tm_year);
484 if (t->tm.tm_hour == 12)
485 t->tm.tm_hour = 0;
489 if (t->tm.tm_hour != 12)
490 t->tm.tm_hour += 12;
503 s = parse_ranged (s, 2, 1, 31, &t->tm.tm_mday);
507 s = parse_ranged (s, 3, 1, 366, &t->tm.tm_yday);
508 t->tm.tm_yday--;
[all …]
/NextBSD/usr.bin/localedef/
HDtime.c47 struct lc_time_T tm; variable
52 (void) memset(&tm, 0, sizeof (tm)); in init_time()
68 tm.c_fmt = str; in add_time_str()
71 tm.x_fmt = str; in add_time_str()
74 tm.X_fmt = str; in add_time_str()
77 tm.ampm_fmt = str; in add_time_str()
84 tm.date_fmt = str; in add_time_str()
124 add_list(tm.mon, str, 12); in add_time_list()
127 add_list(tm.month, str, 12); in add_time_list()
130 add_list(tm.wday, str, 7); in add_time_list()
[all …]
/NextBSD/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/
HDtrim_map.c48 #define TRIM_MAP_ADD(tm, ts) do { \ argument
49 list_insert_tail(&(tm)->tm_head, (ts)); \
50 (tm)->tm_pending += TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \
53 #define TRIM_MAP_REM(tm, ts) do { \ argument
54 list_remove(&(tm)->tm_head, (ts)); \
55 (tm)->tm_pending -= TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \
143 trim_map_t *tm; in trim_map_create() local
148 tm = kmem_zalloc(sizeof (*tm), KM_SLEEP); in trim_map_create()
149 mutex_init(&tm->tm_lock, NULL, MUTEX_DEFAULT, NULL); in trim_map_create()
150 list_create(&tm->tm_head, sizeof (trim_seg_t), in trim_map_create()
[all …]
/NextBSD/gnu/usr.bin/gdb/libgdb/
HDMakefile.depend.amd6420 amd64-nat.o: tm.h
23 amd64-nat.po: tm.h
26 amd64-tdep.o: tm.h
29 amd64-tdep.po: tm.h
32 amd64bsd-nat.o: tm.h
35 amd64bsd-nat.po: tm.h
38 amd64fbsd-nat.o: tm.h
41 amd64fbsd-nat.po: tm.h
44 amd64fbsd-tdep.o: tm.h
47 amd64fbsd-tdep.po: tm.h
[all …]
/NextBSD/usr.bin/at/
HDparsetime.c285 plus_or_minus(struct tm *tm, int delay) in plus_or_minus() argument
293 tm->tm_year += delay; in plus_or_minus()
296 tm->tm_mon += delay; in plus_or_minus()
301 tm->tm_mday += delay; in plus_or_minus()
304 tm->tm_hour += delay; in plus_or_minus()
307 tm->tm_min += delay; in plus_or_minus()
317 tm->tm_isdst = -1; in plus_or_minus()
318 if (mktime(tm) < 0) in plus_or_minus()
330 plus(struct tm *tm) in plus() argument
337 plus_or_minus(tm, delay); in plus()
[all …]
/NextBSD/lib/libc/stdtime/
HDstrptime.c60 static char * _strptime(const char *, const char *, struct tm *, int *, locale_t);
86 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument
129 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime()
150 tm->tm_year = i * 100 - TM_YEAR_BASE; in _strptime()
156 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime()
163 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime()
182 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime()
189 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime()
195 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime()
201 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime()
[all …]
/NextBSD/gnu/lib/libgcc/
HDMakefile.depend18 __main.So: tm.h
21 _absvdi2.So: tm.h
24 _absvsi2.So: tm.h
27 _addvdi3.So: tm.h
30 _addvsi3.So: tm.h
33 _ashldi3.So: tm.h
36 _ashrdi3.So: tm.h
39 _bswapdi2.So: tm.h
42 _bswapsi2.So: tm.h
45 _clear_cache.So: tm.h
[all …]
/NextBSD/crypto/openssh/openbsd-compat/
HDstrptime.c57 static char *_strptime(const char *, const char *, struct tm *, int);
61 strptime(const char *buf, const char *fmt, struct tm *tm) in strptime() argument
63 return(_strptime(buf, fmt, tm, 1)); in strptime()
67 _strptime(const char *buf, const char *fmt, struct tm *tm, int initialize) in _strptime() argument
126 if (!(bp = _strptime(bp, _ctloc(d_t_fmt), tm, 0))) in _strptime()
132 if (!(bp = _strptime(bp, "%m/%d/%y", tm, 0))) in _strptime()
138 if (!(bp = _strptime(bp, "%H:%M", tm, 0))) in _strptime()
144 if (!(bp = _strptime(bp, "%I:%M:%S %p", tm, 0))) in _strptime()
150 if (!(bp = _strptime(bp, "%H:%M:%S", tm, 0))) in _strptime()
156 if (!(bp = _strptime(bp, _ctloc(t_fmt), tm, 0))) in _strptime()
[all …]
/NextBSD/contrib/unbound/compat/
HDstrptime.c107 unbound_strptime(const char *s, const char *format, struct tm *tm) in unbound_strptime() argument
139 tm->tm_wday = ret; in unbound_strptime()
150 tm->tm_mon = ret; in unbound_strptime()
153 if (!(s = unbound_strptime(s, "%x %X", tm))) { in unbound_strptime()
164 tm->tm_year = ret*100 + (tm->tm_year%100); in unbound_strptime()
167 tm->tm_year = ret*100 - TM_YEAR_BASE; in unbound_strptime()
177 tm->tm_mday = ret; in unbound_strptime()
180 if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) { in unbound_strptime()
189 tm->tm_hour = ret; in unbound_strptime()
198 tm->tm_hour = ret; in unbound_strptime()
[all …]
/NextBSD/contrib/file/src/
HDcdf_time.c101 struct tm tm; in cdf_timestamp_to_timespec() local
111 tm.tm_sec = (int)(t % 60); in cdf_timestamp_to_timespec()
114 tm.tm_min = (int)(t % 60); in cdf_timestamp_to_timespec()
117 tm.tm_hour = (int)(t % 24); in cdf_timestamp_to_timespec()
121 tm.tm_year = (int)(CDF_BASE_YEAR + (t / 365)); in cdf_timestamp_to_timespec()
123 rdays = cdf_getdays(tm.tm_year); in cdf_timestamp_to_timespec()
125 tm.tm_mday = cdf_getday(tm.tm_year, (int)t); in cdf_timestamp_to_timespec()
126 tm.tm_mon = cdf_getmonth(tm.tm_year, (int)t); in cdf_timestamp_to_timespec()
127 tm.tm_wday = 0; in cdf_timestamp_to_timespec()
128 tm.tm_yday = 0; in cdf_timestamp_to_timespec()
[all …]
/NextBSD/contrib/ntp/libntp/
HDhumandate.c21 struct tm * tm; in humanlogtime() local
24 tm = localtime(&cursec); in humanlogtime()
25 if (!tm) in humanlogtime()
31 tm->tm_mday, months[tm->tm_mon], in humanlogtime()
32 tm->tm_hour, tm->tm_min, tm->tm_sec); in humanlogtime()
48 struct tm * tm; in humantime() local
50 tm = localtime(&cursec); in humantime()
51 if (!tm) in humantime()
57 tm->tm_hour, tm->tm_min, tm->tm_sec); in humantime()
HDprettydate.c62 static struct tm *
67 struct tm *tm = NULL; in get_struct_tm() local
131 while ((tm = (*(local ? localtime : gmtime))(&ts)) == NULL) in get_struct_tm()
144 INSIST(tm != NULL); in get_struct_tm()
146 tm->tm_year += folds * SOLAR_CYCLE_YEARS; in get_struct_tm()
147 if (tm->tm_year <= 0 || tm->tm_year >= 200) in get_struct_tm()
151 return tm; in get_struct_tm()
166 struct tm *tm; in common_prettydate() local
181 tm = get_struct_tm(&sec, local); in common_prettydate()
182 if (!tm) { in common_prettydate()
[all …]
/NextBSD/contrib/ntp/tests/libntp/
HDhumandate.c27 struct tm* tm; in test_RegularTime() local
29 tm = localtime(&sample); in test_RegularTime()
30 TEST_ASSERT_TRUE(tm != NULL); in test_RegularTime()
32 snprintf(expected, 15, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); in test_RegularTime()
44 struct tm* tm; in test_CurrentTime() local
48 tm = localtime(&sample); in test_CurrentTime()
49 TEST_ASSERT_TRUE(tm != NULL); in test_CurrentTime()
51 snprintf(expected, 15, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec); in test_CurrentTime()
/NextBSD/gnu/usr.bin/cc/cc_tools/
HDMakefile.dep6 tm.h options.h \
11 tm.h options.h \
17 tm.h options.h \
21 tm.h options.h \
28 tm.h options.h \
33 tm.h options.h \
37 tm.h options.h \
42 tm.h options.h \
46 tm.h options.h \
51 tm.h options.h \
[all …]
/NextBSD/tools/KSE/rr/
HDrr.c86 static void runq_insert(struct uts_runq *q, struct kse_thr_mailbox *tm);
95 extern int thread_to_uts(struct kse_thr_mailbox *tm,
142 struct kse_thr_mailbox *tm; in init_uts() local
152 tm = (struct kse_thr_mailbox *)calloc(1, sizeof(struct kse_thr_mailbox)); in init_uts()
155 getcontext(&tm->tm_context); in init_uts()
166 pfmt("main() : 0x%x\n", tm); in init_uts()
167 pfmt("eip -> 0x%x\n", tm->tm_context.uc_mcontext.mc_eip); in init_uts()
168 tm->tm_context.uc_stack.ss_sp = p - MAIN_STACK_SIZE; in init_uts()
169 tm->tm_context.uc_stack.ss_size = MAIN_STACK_SIZE; in init_uts()
181 data->cur_thread = tm; in init_uts()
[all …]
/NextBSD/crypto/openssl/crypto/des/
HDdes_opts.c407 tm[index]=Time_F(STOP); \
408 fprintf(stderr,"%ld %s's in %.2f second\n",count,name,tm[index]); \
409 tm[index]=((double)COUNT(cb))/tm[index];
413 tm[index]*8,1.0e6/tm[index]);
426 double d, tm[16], max = 0; in main() local
435 tm[i] = 0.0; in main()
505 max = tm[0]; in main()
509 if (max < tm[1]) { in main()
510 max = tm[1]; in main()
515 if (max < tm[2]) { in main()
[all …]
/NextBSD/crypto/openssl/crypto/asn1/
HDa_utctm.c113 int asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d) in asn1_utctime_to_tm() argument
131 if (tm) in asn1_utctime_to_tm()
132 tm->tm_sec = 0; in asn1_utctime_to_tm()
149 if (tm) { in asn1_utctime_to_tm()
152 tm->tm_year = n < 50 ? n + 100 : n; in asn1_utctime_to_tm()
155 tm->tm_mon = n - 1; in asn1_utctime_to_tm()
158 tm->tm_mday = n; in asn1_utctime_to_tm()
161 tm->tm_hour = n; in asn1_utctime_to_tm()
164 tm->tm_min = n; in asn1_utctime_to_tm()
167 tm->tm_sec = n; in asn1_utctime_to_tm()
[all …]
/NextBSD/usr.bin/calendar/
HDday.c43 const struct tm tm0;
49 settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2) in settimes()
52 struct tm tp; in settimes()
89 struct tm tm, tp; in Mktime() local
94 tm = tm0; in Mktime()
95 tm.tm_mday = tp.tm_mday; in Mktime()
96 tm.tm_mon = tp.tm_mon; in Mktime()
97 tm.tm_year = tp.tm_year; in Mktime()
103 tm.tm_year = y; in Mktime()
106 tm.tm_mon = m - 1; in Mktime()
[all …]

12345678910>>...31