/freebsd/contrib/netbsd-tests/lib/libutil/ |
H A D | t_parsedate.c | 58 struct tm * time_to_tm(const time_t *, struct tm *), in parsecheck() argument 62 struct tm tm; in parsecheck() local 87 ATF_CHECK(time_to_tm(&t, &tm) != NULL); in parsecheck() 89 ATF_CHECK_MSG(tm.tm_year + 1900 == year, in parsecheck() 91 argstr, year, (int)tm.tm_year); in parsecheck() 93 ATF_CHECK_MSG(tm.tm_mon + 1 == month, in parsecheck() 95 argstr, month, (int)tm.tm_mon); in parsecheck() 97 ATF_CHECK_MSG(tm.tm_mday == day, in parsecheck() 99 argstr, day, (int)tm.tm_mday); in parsecheck() 101 ATF_CHECK_MSG(tm.tm_hour == hour, in parsecheck() [all …]
|
/freebsd/sys/kern/ |
H A D | subr_terminal.c | 55 #define TERMINAL_LOCK(tm) do { \ argument 56 if ((tm)->tm_flags & TF_CONS) \ 57 mtx_lock_spin(&(tm)->tm_mtx); \ 58 else if ((tm)->tm_tty != NULL) \ 59 tty_lock((tm)->tm_tty); \ 61 #define TERMINAL_UNLOCK(tm) do { \ argument 62 if ((tm)->tm_flags & TF_CONS) \ 63 mtx_unlock_spin(&(tm)->tm_mtx); \ 64 else if ((tm)->tm_tty != NULL) \ 65 tty_unlock((tm)->tm_tty); \ [all …]
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | strftime.c | 119 * Return the week number of `tm' (Sunday being the first day of the week) 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() 130 * Return the week number of `tm' (Monday being the first day of the week) 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() 143 * Return the week number of `tm' (Monday being the first day of the 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() [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() 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 …]
|
/freebsd/usr.sbin/newsyslog/ |
H A D | ptimes.c | 72 struct tm basetm; /* Base Time expanded into fields */ 73 struct tm tm; /* Time expanded into fields */ member 98 * We are usually called with a 'tm-year' value in days_pmonth() 131 struct tm tm; in parse8601() local 142 tm = ptime->tm; in parse8601() 146 tm.tm_year = ((l / 1000000) - 19) * 100; in parse8601() 151 tm.tm_year -= tm.tm_year % 100; in parse8601() 152 tm.tm_year += l / 10000; in parse8601() 157 tm.tm_mon = (l / 100) - 1; in parse8601() 162 tm.tm_mday = l; in parse8601() [all …]
|
/freebsd/crypto/heimdal/lib/asn1/ |
H A D | timegm.c | 56 _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 …]
|
H A D | check-timegm.c | 42 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 …]
|
/freebsd/usr.bin/localedef/ |
H A D | time.c | 45 struct lc_time_T tm; variable 50 (void) memset(&tm, 0, sizeof (tm)); in init_time() 66 tm.c_fmt = str; in add_time_str() 69 tm.x_fmt = str; in add_time_str() 72 tm.X_fmt = str; in add_time_str() 75 tm.ampm_fmt = str; in add_time_str() 82 tm.date_fmt = str; in add_time_str() 123 add_list(tm.mon, str, 12); in add_time_list() 126 add_list(tm.month, str, 12); in add_time_list() 129 add_list(tm.wday, str, 7); in add_time_list() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | TargetLoweringObjectFileImpl.h | 47 void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 64 const TargetMachine &TM) const override; 67 const TargetMachine &TM) const override; 70 const TargetMachine &TM) const override; 72 const TargetMachine &TM) const override; 77 const TargetMachine &TM) const override; 81 const TargetMachine &TM) const override; 90 const TargetMachine &TM, 96 const TargetMachine &TM, 107 const TargetMachine &TM) const override; [all …]
|
/freebsd/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() 31 struct tm data, *ts2 = &data; in OPENSSL_gmtime() 37 memcpy(result, ts2, sizeof(struct tm)); in OPENSSL_gmtime() 53 memcpy(result, ts, sizeof(struct tm)); in OPENSSL_gmtime() 60 * Take a tm structure and add an offset to it. This avoids any OS issues 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 78 if (!julian_adj(tm, off_day, offset_sec, &time_jd, &time_sec)) in OPENSSL_gmtime_adj() 88 /* Update tm structure */ in OPENSSL_gmtime_adj() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | humandate.c | 20 struct tm * tm; in humanlogtime() 23 tm = localtime(&cursec); in humanlogtime() 24 if (!tm) in humanlogtime() 30 tm->tm_mday, months[tm->tm_mon], in humanlogtime() 31 tm->tm_hour, tm->tm_min, tm->tm_sec); in humanlogtime() 47 struct tm * t in humantime() 21 struct tm * tm; humanlogtime() local 48 struct tm * tm; humantime() local [all...] |
H A D | uglydate.c | 20 struct tm *tm; in uglydate() 29 tm = gmtime(&sec); in uglydate() 35 tm->tm_yday = 0; in uglydate() 36 tm->tm_hour = 0; in uglydate() 37 tm->tm_min = 0; in uglydate() 38 tm->tm_sec = 0; in uglydate() 40 year = tm->tm_year; in uglydate() 46 tm->tm_yday, tm in uglydate() 21 struct tm *tm; uglydate() local [all...] |
/freebsd/lib/libc/stdtime/ |
H A D | strptime.c | 53 static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); 79 _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, in _strptime() argument 125 buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); in _strptime() 150 buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); in _strptime() 157 buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); in _strptime() 176 buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); in _strptime() 183 buf = _strptime(buf, "%H:%M", tm, GMTp, locale); in _strptime() 189 buf = _strptime(buf, tptr->ampm_fmt, tm, GMTp, locale); in _strptime() 195 buf = _strptime(buf, "%H:%M:%S", tm, GMTp, locale); in _strptime() 201 buf = _strptime(buf, tptr->X_fmt, tm, GMTp, locale); in _strptime() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | MachineModuleInfo.cpp | 58 : TM(std::move(MMI.TM)), in MachineModuleInfo() 59 Context(TM.getTargetTriple(), TM.getMCAsmInfo(), TM.getMCRegisterInfo(), in MachineModuleInfo() 60 TM.getMCSubtargetInfo(), nullptr, &TM.Options.MCOptions, false), in MachineModuleInfo() 62 Context.setObjectFileInfo(TM.getObjFileLowering()); in MachineModuleInfo() 69 MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM) in MachineModuleInfo() argument 70 : TM(*TM), Context(TM->getTargetTriple(), TM->getMCAsmInfo(), in MachineModuleInfo() 71 TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), in MachineModuleInfo() 72 nullptr, &TM->Options.MCOptions, false) { in MachineModuleInfo() 73 Context.setObjectFileInfo(TM->getObjFileLowering()); in MachineModuleInfo() 77 MachineModuleInfo::MachineModuleInfo(const LLVMTargetMachine *TM, in MachineModuleInfo() argument [all …]
|
/freebsd/contrib/tzcode/ |
H A D | newctime.3 | 19 .B [[deprecated]] char *asctime(struct tm const *tm); 22 .B "char *asctime_r(struct tm const *restrict tm," 25 .B struct tm *localtime(time_t const *clock); 27 .B "struct tm *localtime_r(time_t const *restrict clock," 28 .B " struct tm *restrict result);" 30 .B "struct tm *localtime_rz(timezone_t restrict zone," 32 .B " struct tm *restrict result);" 34 .B struct tm *gmtim [all...] |
H A D | zdump.c | 91 static char const *abbr(struct tm const *); 92 static intmax_t delta(struct tm *, struct tm *); 93 static void dumptime(struct tm const *); 96 static void showextrema(timezone_t, char *, time_t, struct tm *, time_t); 97 static void showtrans(char const *, struct tm const *, time_t, char const *, 189 static struct tm * 190 gmtime_r(time_t *tp, struct tm *tmp) in gmtime_r() 192 struct tm *r = gmtime(tp); in gmtime_r() 216 static struct tm * 365 struct tm tm; my_localtime_rz() local 602 struct tm tm, newtm; main() local 741 struct tm tm; hunt() local 852 struct tm tm, gmtm; show() local 975 format_local_time(char * buf,ptrdiff_t size,struct tm const * tm) format_local_time() argument 998 format_utc_offset(char * buf,ptrdiff_t size,struct tm const * tm,time_t t) format_utc_offset() argument 1070 istrftime(char * buf,ptrdiff_t size,char const * time_fmt,struct tm const * tm,time_t t,char const * ab,char const * zone_name) istrftime() argument 1147 showtrans(char const * time_fmt,struct tm const * tm,time_t t,char const * ab,char const * zone_name) showtrans() argument [all...] |
/freebsd/contrib/file/src/ |
H A D | cdf_time.c | 101 struct tm tm; in cdf_timestamp_to_timespec() local 111 tm.tm_sec = CAST(int, t % 60); in cdf_timestamp_to_timespec() 114 tm.tm_min = CAST(int, t % 60); in cdf_timestamp_to_timespec() 117 tm.tm_hour = CAST(int, t % 24); in cdf_timestamp_to_timespec() 121 tm.tm_year = CAST(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, 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() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPU.h | 61 createAMDGPULowerModuleLDSLegacyPass(const AMDGPUTargetMachine *TM = nullptr); 73 AMDGPUImageIntrinsicOptimizerPass(TargetMachine &TM) : TM(TM) {} in AMDGPUImageIntrinsicOptimizerPass() 77 TargetMachine &TM; 134 const AMDGPUTargetMachine &TM; member 135 AMDGPULowerModuleLDSPass(const AMDGPUTargetMachine &TM_) : TM(TM_) {} in AMDGPULowerModuleLDSPass() 145 AMDGPULowerBufferFatPointersPass(const TargetMachine &TM) : TM(TM) {} in AMDGPULowerBufferFatPointersPass() 149 const TargetMachine &TM; 228 AMDGPUPromoteAllocaPass(TargetMachine &TM) : TM(TM) {} in AMDGPUPromoteAllocaPass() 232 TargetMachine &TM; 237 AMDGPUPromoteAllocaToVectorPass(TargetMachine &TM) : TM(TM) {} in AMDGPUPromoteAllocaToVectorPass() [all …]
|
/freebsd/crypto/openssl/crypto/asn1/ |
H A D | a_time.c | 50 static void determine_days(struct tm *tm) in determine_days() argument 55 int y = tm->tm_year + 1900; in determine_days() 56 int m = tm->tm_mon; in determine_days() 57 int d = tm->tm_mday; in determine_days() 60 tm->tm_yday = ydays[m] + d - 1; in determine_days() 63 tm->tm_yday += leap_year(y); in determine_days() 73 tm->tm_wday = (d + (13 * m) / 5 + y + y / 4 + c / 4 + 5 * c + 6) % 7; in determine_days() 76 int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d) in ossl_asn1_time_to_tm() argument 83 struct tm tmp; in ossl_asn1_time_to_tm() 242 /* if tm is NULL, no need to adjust */ in ossl_asn1_time_to_tm() [all …]
|
/freebsd/usr.bin/at/ |
H A D | parsetime.c | 286 plus_or_minus(struct tm *tm, int delay) in plus_or_minus() argument 294 tm->tm_year += delay; in plus_or_minus() 297 tm->tm_mon += delay; in plus_or_minus() 302 tm->tm_mday += delay; in plus_or_minus() 305 tm->tm_hour += delay; in plus_or_minus() 308 tm->tm_min += delay; in plus_or_minus() 318 tm->tm_isdst = -1; in plus_or_minus() 319 if (mktime(tm) < 0) in plus_or_minus() 331 plus(struct tm *tm) in plus() argument 338 plus_or_minus(tm, delay); in plus() [all …]
|
/freebsd/sys/dev/efidev/ |
H A D | efirtc.c | 64 struct efi_tm tm; in efirtc_probe() local 72 if ((error = efi_get_time(&tm)) != 0) { in efirtc_probe() 132 struct efi_tm tm; in efirtc_gettime() local 135 error = efi_get_time(&tm); in efirtc_gettime() 139 ct.sec = tm.tm_sec; in efirtc_gettime() 140 ct.min = tm.tm_min; in efirtc_gettime() 141 ct.hour = tm.tm_hour; in efirtc_gettime() 142 ct.day = tm.tm_mday; in efirtc_gettime() 143 ct.mon = tm.tm_mon; in efirtc_gettime() 144 ct.year = tm.tm_year; in efirtc_gettime() [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | strptime.c | 57 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 …]
|
H A D | bsd-timegm.c | 50 time_t timegm(struct tm *tm) in timegm() argument 58 if (tm->tm_mon > 12 || in timegm() 59 tm->tm_mon < 0 || in timegm() 60 tm->tm_mday > 31 || in timegm() 61 tm->tm_min > 60 || in timegm() 62 tm->tm_sec > 60 || in timegm() 63 tm->tm_hour > 24) { in timegm() 64 /* invalid tm structure */ in timegm() 68 for (i = 70; i < tm->tm_year; ++i) in timegm() 71 for (i = 0; i < tm->tm_mon; ++i) in timegm() [all …]
|
/freebsd/sys/sys/ |
H A D | terminal.h | 144 typedef void tc_cursor_t(struct terminal *tm, const term_pos_t *p); 145 typedef void tc_putchar_t(struct terminal *tm, const term_pos_t *p, 147 typedef void tc_fill_t(struct terminal *tm, const term_rect_t *r, 149 typedef void tc_copy_t(struct terminal *tm, const term_rect_t *r, 151 typedef void tc_pre_input_t(struct terminal *tm); 152 typedef void tc_post_input_t(struct terminal *tm); 153 typedef void tc_param_t(struct terminal *tm, int cmd, unsigned int arg); 154 typedef void tc_done_t(struct terminal *tm); 156 typedef void tc_cnprobe_t(struct terminal *tm, struct consdev *cd); 157 typedef int tc_cngetc_t(struct terminal *tm); [all …]
|
/freebsd/usr.bin/calendar/ |
H A D | day.c | 43 const struct tm tm0; 49 settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2) in settimes() 51 struct tm tp; in settimes() 79 struct tm tm, tp; in Mktime() local 84 tm = tm0; in Mktime() 85 tm.tm_mday = tp.tm_mday; in Mktime() 86 tm.tm_mon = tp.tm_mon; in Mktime() 87 tm.tm_year = tp.tm_year; in Mktime() 93 tm.tm_year = y; in Mktime() 96 tm.tm_mon = m - 1; in Mktime() [all …]
|