| /freebsd-13.1/contrib/netbsd-tests/lib/libutil/ |
| H A D | t_parsedate.c | 62 struct tm tm; in parsecheck() local 195 struct tm tm; in ATF_TC_BODY() local 215 tm = (struct tm){ in ATF_TC_BODY() 238 struct tm tm; in ATF_TC_BODY() local 287 tm.tm_sec = tm.tm_min = tm.tm_hour = 0; in ATF_TC_BODY() 293 tm.tm_sec = tm.tm_min = tm.tm_hour = 0; in ATF_TC_BODY() 386 tm.tm_hour = tm.tm_min = tm.tm_sec = 0; in ATF_TC_BODY() 392 tm.tm_hour = tm.tm_min = tm.tm_sec = 0; in ATF_TC_BODY() 398 tm.tm_hour = tm.tm_min = tm.tm_sec = 0; in ATF_TC_BODY() 412 tm.tm_sec = tm.tm_min = tm.tm_hour = 0; in ATF_TC_BODY() [all …]
|
| /freebsd-13.1/sys/kern/ |
| H A D | subr_terminal.c | 273 tm->tm_class->tc_fill(tm, &r, in terminal_set_winsize_blank() 402 tm->tm_class->tc_opened(tm, 1); in termtty_open() 411 tm->tm_class->tc_opened(tm, 0); in termtty_close() 434 tm->tm_class->tc_done(tm); in termtty_outwakeup() 437 tm->tm_class->tc_bell(tm); in termtty_outwakeup() 555 tm->tm_class->tc_cngrab(tm); in termcn_cngrab() 563 tm->tm_class->tc_cnungrab(tm); in termcn_cnungrab() 615 tm->tm_class->tc_done(tm); in termcn_cnputc() 637 tm->tm_class->tc_cursor(tm, p); in termteken_cursor() 663 tm->tm_class->tc_copy(tm, r, p); in termteken_copy() [all …]
|
| /freebsd-13.1/usr.sbin/newsyslog/ |
| H A D | ptimes.c | 133 struct tm tm; in parse8601() local 144 tm = ptime->tm; in parse8601() 173 if (tm.tm_year < 70 || tm.tm_mon < 0 || tm.tm_mon > 12 in parse8601() 203 if (tm.tm_sec < 0 || tm.tm_sec > 60 || tm.tm_min < 0 in parse8601() 208 ptime->tm = tm; in parse8601() 233 struct tm tm; in parseDWM() local 236 tm = ptime->tm; in parseDWM() 322 ptime->tm = tm; in parseDWM() 501 struct tm tm; in ptimeget_ctime_rfc5424() local 545 tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, in ptimeget_ctime_rfc5424() [all …]
|
| /freebsd-13.1/crypto/heimdal/lib/roken/ |
| H A D | strftime.c | 124 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 149 week_number_mon4 (const struct tm *tm) in week_number_mon4() argument 171 const struct tm *tm) in strftime() argument 206 tm->tm_min, in strftime() 231 tm->tm_mon + 1, tm->tm_mday); in strftime() 280 tm->tm_min, in strftime() 281 tm->tm_sec, in strftime() 306 tm->tm_min, in strftime() [all …]
|
| H A D | timegm.c | 51 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() 77 res += tm->tm_mday - 1; in rk_timegm() 79 res += tm->tm_hour; in rk_timegm() 81 res += tm->tm_min; in rk_timegm() [all …]
|
| /freebsd-13.1/crypto/heimdal/lib/asn1/ |
| H A D | timegm.c | 56 _der_timegm (struct tm *tm) in _der_timegm() argument 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() 95 struct tm * 96 _der_gmtime(time_t t, struct tm *tm) in _der_gmtime() argument 101 memset(tm, 0, sizeof(*tm)); in _der_gmtime() 131 tm->tm_mon++; in _der_gmtime() [all …]
|
| H A D | check-timegm.c | 42 struct tm tm; in test_timegm() local 45 memset(&tm, 0, sizeof(tm)); 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() 56 tm.tm_mday = 0; in test_timegm() 63 tm.tm_mon != 9 || in test_timegm() 64 tm.tm_mday != 1 || in test_timegm() 66 tm.tm_min != 3 || in test_timegm() [all …]
|
| /freebsd-13.1/usr.bin/localedef/ |
| H A D | time.c | 47 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() 138 tm.am = str; in add_time_list() 140 tm.pm = str; in add_time_list() 223 tm.am = NULL; in reset_time_list() 225 tm.pm = NULL; in reset_time_list() [all …]
|
| /freebsd-13.1/usr.bin/at/ |
| H A D | parsetime.c | 288 plus_or_minus(struct tm *tm, int delay) in plus_or_minus() argument 333 plus(struct tm *tm) in plus() argument 348 minus(struct tm *tm) in minus() argument 364 tod(struct tm *tm) in tod() argument 413 tm->tm_mday++; in tod() 414 tm->tm_wday++; in tod() 430 assign_date(struct tm *tm, long mday, long mon, long year) in assign_date() argument 458 (tm->tm_mon > mon ||(tm->tm_mon == mon && tm->tm_mday > mday))) in assign_date() 479 month(struct tm *tm) in month() argument 487 plus(tm); in month() [all …]
|
| /freebsd-13.1/crypto/openssh/openbsd-compat/ |
| H A D | strptime.c | 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 189 tm->tm_wday = i; in _strptime() 213 tm->tm_mon = i; in _strptime() 255 tm->tm_yday--; in _strptime() 268 tm->tm_mon--; in _strptime() 279 else if (tm->tm_hour == 12) in _strptime() 280 tm->tm_hour = 0; in _strptime() 290 else if (tm->tm_hour < 12) in _strptime() [all …]
|
| /freebsd-13.1/contrib/unbound/compat/ |
| H A D | strptime.c | 107 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() 164 tm->tm_year = ret*100 + (tm->tm_year%100); in unbound_strptime() 177 tm->tm_mday = ret; in unbound_strptime() 189 tm->tm_hour = ret; in unbound_strptime() 198 tm->tm_hour = ret; in unbound_strptime() 220 tm->tm_min = ret; in unbound_strptime() 232 if (tm->tm_hour < 0 || tm->tm_hour > 11) { /* %I */ in unbound_strptime() 256 tm->tm_sec = ret; in unbound_strptime() [all …]
|
| /freebsd-13.1/contrib/ntp/libntp/ |
| H A D | humandate.c | 21 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()
|
| H A D | prettydate.c | 62 static struct tm * 67 struct tm *tm = NULL; in get_struct_tm() local 144 INSIST(tm != NULL); 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 187 if (!tm) { in common_prettydate() 202 daynames[tm->tm_wday], months[tm->tm_mon], in common_prettydate() 203 tm->tm_mday, 1900 + tm->tm_year, tm->tm_hour, in common_prettydate() 204 tm->tm_min, tm->tm_sec, msec); in common_prettydate() [all …]
|
| H A D | uglydate.c | 21 struct tm *tm; in uglydate() local 30 tm = gmtime(&sec); in uglydate() 36 tm->tm_yday = 0; in uglydate() 37 tm->tm_hour = 0; in uglydate() 38 tm->tm_min = 0; in uglydate() 39 tm->tm_sec = 0; in uglydate() 41 year = tm->tm_year; in uglydate() 47 tm->tm_yday, tm->tm_hour, tm->tm_min, tm->tm_sec, in uglydate()
|
| /freebsd-13.1/contrib/file/src/ |
| H A D | cdf_time.c | 101 struct tm tm; in cdf_timestamp_to_timespec() local 125 tm.tm_mday = cdf_getday(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec() 126 tm.tm_mon = cdf_getmonth(tm.tm_year, CAST(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() 129 tm.tm_isdst = 0; in cdf_timestamp_to_timespec() 131 tm.tm_gmtoff = 0; in cdf_timestamp_to_timespec() 134 tm.tm_zone = UTC; in cdf_timestamp_to_timespec() 136 tm.tm_year -= 1900; in cdf_timestamp_to_timespec() 154 struct tm tm; in cdf_timespec_to_timestamp() local [all …]
|
| /freebsd-13.1/lib/libc/stdtime/ |
| H A D | strptime.c | 88 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument 261 tm->tm_min = i; in _strptime() 265 tm->tm_sec = i; in _strptime() 305 tm->tm_hour = i; in _strptime() 472 tm->tm_mon = i; in _strptime() 632 tm->tm_yday = start_of_month[isleap(tm->tm_year + in _strptime() 633 TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); in _strptime() 671 tm->tm_yday -= in _strptime() 680 tm->tm_mday = tm->tm_yday - in _strptime() 702 struct tm * __restrict tm, locale_t loc) in strptime_l() argument [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/ |
| H A D | o_time.c | 14 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result) in OPENSSL_gmtime() 16 struct tm *ts = NULL; in OPENSSL_gmtime() 69 static int julian_adj(const struct tm *tm, int off_day, long offset_sec, 72 int OPENSSL_gmtime_adj(struct tm *tm, int off_day, long offset_sec) in OPENSSL_gmtime_adj() argument 91 tm->tm_mon = time_month - 1; in OPENSSL_gmtime_adj() 92 tm->tm_mday = time_day; in OPENSSL_gmtime_adj() 96 tm->tm_sec = time_sec % 60; in OPENSSL_gmtime_adj() 103 const struct tm *from, const struct tm *to) in OPENSSL_gmtime_diff() 133 static int julian_adj(const struct tm *tm, int off_day, long offset_sec, in julian_adj() argument 145 offset_hms += tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec; in julian_adj() [all …]
|
| /freebsd-13.1/sys/dev/efidev/ |
| H A D | efirtc.c | 67 struct efi_tm tm; in efirtc_probe() local 135 struct efi_tm tm; in efirtc_gettime() local 142 ct.sec = tm.tm_sec; in efirtc_gettime() 143 ct.min = tm.tm_min; in efirtc_gettime() 145 ct.day = tm.tm_mday; in efirtc_gettime() 146 ct.mon = tm.tm_mon; in efirtc_gettime() 158 struct efi_tm tm; in efirtc_settime() local 172 bzero(&tm, sizeof(tm)); in efirtc_settime() 173 tm.tm_sec = ct.sec; in efirtc_settime() 174 tm.tm_min = ct.min; in efirtc_settime() [all …]
|
| /freebsd-13.1/usr.bin/calendar/ |
| H A D | day.c | 45 const struct tm tm0; 53 struct tm tp; in settimes() 81 struct tm tm, tp; in Mktime() local 86 tm = tm0; in Mktime() 87 tm.tm_mday = tp.tm_mday; in Mktime() 88 tm.tm_mon = tp.tm_mon; in Mktime() 95 tm.tm_year = y; in Mktime() 98 tm.tm_mon = m - 1; in Mktime() 101 tm.tm_mday = d; in Mktime() 106 (int)mktime(&tm), (int)t, asctime(&tm)); in Mktime() [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/asn1/ |
| H A D | a_time.c | 48 static void determine_days(struct tm *tm) in determine_days() argument 74 int asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) in asn1_time_to_tm() argument 81 struct tm tmp; in asn1_time_to_tm() 325 struct tm *ts; in ASN1_TIME_adj() 326 struct tm data; in ASN1_TIME_adj() 354 struct tm tm; in ASN1_TIME_to_generalizedtime() local 381 struct tm tm; in ASN1_TIME_set_string_X509() local 437 int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm) in ASN1_TIME_to_tm() argument 443 memset(tm, 0, sizeof(*tm)); in ASN1_TIME_to_tm() 473 struct tm stm; in ASN1_TIME_print() [all …]
|
| /freebsd-13.1/sys/sys/ |
| H A D | terminal.h | 153 typedef void tc_pre_input_t(struct terminal *tm); 154 typedef void tc_post_input_t(struct terminal *tm); 156 typedef void tc_done_t(struct terminal *tm); 159 typedef int tc_cngetc_t(struct terminal *tm); 161 typedef void tc_cngrab_t(struct terminal *tm); 162 typedef void tc_cnungrab_t(struct terminal *tm); 169 typedef void tc_bell_t(struct terminal *tm); 216 void terminal_set_winsize_blank(struct terminal *tm, 219 void terminal_mute(struct terminal *tm, int yes); 221 void terminal_input_raw(struct terminal *tm, char c); [all …]
|
| /freebsd-13.1/contrib/ntp/ntpd/ |
| H A D | refclock_pcf.c | 137 struct tm tm, *tp; in pcf_poll() local 148 ZERO(tm); in pcf_poll() 154 tm.tm_min = buf[5] * 10 + buf[4]; in pcf_poll() 155 tm.tm_sec = buf[3] * 10 + buf[2]; in pcf_poll() 161 if (tm.tm_year < 99) in pcf_poll() 162 tm.tm_year += 100; in pcf_poll() 164 t = mktime(&tm); in pcf_poll() 171 if ((tm.tm_isdst > 0 && tm.tm_gmtoff != 7200) in pcf_poll() 172 || (tm.tm_isdst == 0 && tm.tm_gmtoff != 3600) in pcf_poll() 173 || tm.tm_isdst < 0) { in pcf_poll() [all …]
|
| /freebsd-13.1/contrib/nvi/common/ |
| H A D | delete.c | 32 del(SCR *sp, MARK *fm, MARK *tm, int lmode) in del() argument 59 if (tm->lno >= lno) { in del() 60 if (tm->lno == lno) { in del() 63 eof = tm->cno != ENTIRE_LINE && tm->cno >= len ? 1 : 0; in del() 86 if (tm->lno == fm->lno) { in del() 93 MEMCPY(bp + fm->cno, p + (tm->cno + 1), in del() 94 len - (tm->cno + 1)); in del() 117 if (len != 0 && tm->cno != len - 1) { in del() 124 nlen = (len - (tm->cno + 1)) + tlen; in del() 134 MEMCPY(bp + tlen, p + (tm->cno + 1), len - (tm->cno + 1)); in del() [all …]
|
| /freebsd-13.1/contrib/apr/time/unix/ |
| H A D | timestr.c | 135 struct tm tm; in apr_strftime() local 136 memset(&tm, 0, sizeof tm); in apr_strftime() 137 tm.tm_sec = xt->tm_sec; in apr_strftime() 138 tm.tm_min = xt->tm_min; in apr_strftime() 139 tm.tm_hour = xt->tm_hour; in apr_strftime() 140 tm.tm_mday = xt->tm_mday; in apr_strftime() 141 tm.tm_mon = xt->tm_mon; in apr_strftime() 142 tm.tm_year = xt->tm_year; in apr_strftime() 143 tm.tm_wday = xt->tm_wday; in apr_strftime() 144 tm.tm_yday = xt->tm_yday; in apr_strftime() [all …]
|
| /freebsd-13.1/include/ |
| H A D | time.h | 101 struct tm { struct 120 char *asctime(const struct tm *); 127 struct tm *gmtime(const time_t *); 128 struct tm *localtime(const time_t *); 129 time_t mktime(struct tm *); 131 const struct tm * __restrict); 161 struct tm *gmtime_r(const time_t *, struct tm *); 162 struct tm *localtime_r(const time_t *, struct tm *); 167 struct tm * __restrict); 173 time_t timelocal(struct tm * const); [all …]
|