/third_party/toybox/toys/pending/ |
D | telnetd.c | 206 static int handle_iacs(struct term_session *tm, int c, int fd) in handle_iacs() argument 211 curr = start = tm->buff2+tm->buff2_avail; in handle_iacs() 212 end = tm->buff2 + c -1; in handle_iacs() 213 tm->rem = 0; in handle_iacs() 230 tm->rem = 1; in handle_iacs() 247 tm->rem = end - curr; in handle_iacs() 256 curr++, tm->rem++; in handle_iacs() 259 tm->rem++; in handle_iacs() 262 tm->rem = 0; in handle_iacs() 270 memcpy(start + i, end - tm->rem, tm->rem); //put remaining if we break; in handle_iacs() [all …]
|
/third_party/abseil-cpp/absl/time/internal/cctz/src/ |
D | time_zone_libc.cc | 39 auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + _dstbias) { in tm_gmtoff() argument 40 const bool is_dst = tm.tm_isdst > 0; in tm_gmtoff() 43 auto tm_zone(const std::tm& tm) -> decltype(_tzname[0]) { in tm_zone() argument 44 const bool is_dst = tm.tm_isdst > 0; in tm_zone() 49 auto tm_gmtoff(const std::tm& tm) -> decltype(timezone) { 50 const bool is_dst = tm.tm_isdst > 0; 53 auto tm_zone(const std::tm& tm) -> decltype(tzname[0]) { 54 const bool is_dst = tm.tm_isdst > 0; 60 auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + 0) { 61 const bool is_dst = tm.tm_isdst > 0; [all …]
|
/third_party/skia/third_party/externals/abseil-cpp/absl/time/internal/cctz/src/ |
D | time_zone_libc.cc | 45 auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + _dstbias) { in tm_gmtoff() argument 46 const bool is_dst = tm.tm_isdst > 0; in tm_gmtoff() 49 auto tm_zone(const std::tm& tm) -> decltype(_tzname[0]) { in tm_zone() argument 50 const bool is_dst = tm.tm_isdst > 0; in tm_zone() 55 auto tm_gmtoff(const std::tm& tm) -> decltype(timezone) { 56 const bool is_dst = tm.tm_isdst > 0; 59 auto tm_zone(const std::tm& tm) -> decltype(tzname[0]) { 60 const bool is_dst = tm.tm_isdst > 0; 66 auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + 0) { 67 const bool is_dst = tm.tm_isdst > 0; [all …]
|
/third_party/musl/porting/liteos_m/kernel/src/time/ |
D | strftime.c | 19 static int week_num(const struct tm *tm) in week_num() argument 21 int val = (tm->tm_yday + 7U - (tm->tm_wday+6U)%7) / 7; in week_num() 24 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 31 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 32 if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year%400-1))) in week_num() 38 int jan1 = (tm->tm_wday + 371U - tm->tm_yday) % 7; in week_num() 39 if (jan1 != 4 && (jan1 != 3 || !is_leap(tm->tm_year))) in week_num() 45 const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, i… in __strftime_fmt_1() argument 54 if (tm->tm_wday > 6U) goto string; in __strftime_fmt_1() 55 item = ABDAY_1 + tm->tm_wday; in __strftime_fmt_1() [all …]
|
D | strptime.c | 9 char *strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) in strptime() argument 35 dest = &tm->tm_wday; in strptime() 40 dest = &tm->tm_mon; in strptime() 45 s = strptime(s, nl_langinfo(D_T_FMT), tm); in strptime() 54 dest = &tm->tm_mday; in strptime() 59 s = strptime(s, "%m/%d/%y", tm); in strptime() 63 dest = &tm->tm_hour; in strptime() 68 dest = &tm->tm_hour; in strptime() 73 dest = &tm->tm_yday; in strptime() 79 dest = &tm->tm_mon; in strptime() [all …]
|
/third_party/musl/src/time/ |
D | strftime.c | 19 static int week_num(const struct tm *tm) in week_num() argument 21 int val = (tm->tm_yday + 7U - (tm->tm_wday+6U)%7) / 7; in week_num() 24 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 31 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 32 if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year%400-1))) in week_num() 38 int jan1 = (tm->tm_wday + 371U - tm->tm_yday) % 7; in week_num() 39 if (jan1 != 4 && (jan1 != 3 || !is_leap(tm->tm_year))) in week_num() 45 const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, i… in __strftime_fmt_1() argument 54 if (tm->tm_wday > 6U) goto string; in __strftime_fmt_1() 55 item = ABDAY_1 + tm->tm_wday; in __strftime_fmt_1() [all …]
|
D | strptime.c | 9 char *strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) in strptime() argument 35 dest = &tm->tm_wday; in strptime() 40 dest = &tm->tm_mon; in strptime() 45 s = strptime(s, nl_langinfo(D_T_FMT), tm); in strptime() 54 dest = &tm->tm_mday; in strptime() 59 s = strptime(s, "%m/%d/%y", tm); in strptime() 63 dest = &tm->tm_hour; in strptime() 68 dest = &tm->tm_hour; in strptime() 73 dest = &tm->tm_yday; in strptime() 79 dest = &tm->tm_mon; in strptime() [all …]
|
/third_party/musl/porting/liteos_a/kernel/src/time/ |
D | strftime.c | 19 static int week_num(const struct tm *tm) in week_num() argument 21 int val = (tm->tm_yday + 7U - (tm->tm_wday+6U)%7) / 7; in week_num() 24 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 31 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 32 if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year%400-1))) in week_num() 38 int jan1 = (tm->tm_wday + 371U - tm->tm_yday) % 7; in week_num() 39 if (jan1 != 4 && (jan1 != 3 || !is_leap(tm->tm_year))) in week_num() 45 const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, i… in __strftime_fmt_1() argument 54 if (tm->tm_wday > 6U) goto string; in __strftime_fmt_1() 55 item = ABDAY_1 + tm->tm_wday; in __strftime_fmt_1() [all …]
|
D | strptime.c | 9 char *strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) in strptime() argument 35 dest = &tm->tm_wday; in strptime() 40 dest = &tm->tm_mon; in strptime() 45 s = strptime(s, nl_langinfo(D_T_FMT), tm); in strptime() 54 dest = &tm->tm_mday; in strptime() 59 s = strptime(s, "%m/%d/%y", tm); in strptime() 63 dest = &tm->tm_hour; in strptime() 68 dest = &tm->tm_hour; in strptime() 73 dest = &tm->tm_yday; in strptime() 79 dest = &tm->tm_mon; in strptime() [all …]
|
/third_party/toybox/toys/posix/ |
D | cal.c | 26 static char *calstrings(char *buf, struct tm *tm) in calstrings() argument 32 len = strftime(temp, 21, "%B %Y", tm); in calstrings() 40 if (tm->tm_mday>1) in calstrings() 41 start = (36+tm->tm_wday-tm->tm_mday)%7; in calstrings() 42 else start = tm->tm_wday; in calstrings() 46 if (tm->tm_mon == 1) { in calstrings() 47 int year = tm->tm_year; in calstrings() 50 } else if ((tm->tm_mon+(tm->tm_mon>6 ? 1 : 0)) & 1) len = 30; in calstrings() 72 struct tm *tm; in cal_main() local 77 tm = (struct tm *)toybuf; in cal_main() [all …]
|
/third_party/uboot/u-boot-2020.01/drivers/rtc/ |
D | m41t62.c | 56 static void m41t62_update_rtc_time(struct rtc_time *tm, u8 *buf) in m41t62_update_rtc_time() argument 64 tm->tm_sec = bcd2bin(buf[M41T62_REG_SEC] & 0x7f); in m41t62_update_rtc_time() 65 tm->tm_min = bcd2bin(buf[M41T62_REG_MIN] & 0x7f); in m41t62_update_rtc_time() 66 tm->tm_hour = bcd2bin(buf[M41T62_REG_HOUR] & 0x3f); in m41t62_update_rtc_time() 67 tm->tm_mday = bcd2bin(buf[M41T62_REG_DAY] & 0x3f); in m41t62_update_rtc_time() 68 tm->tm_wday = buf[M41T62_REG_WDAY] & 0x07; in m41t62_update_rtc_time() 69 tm->tm_mon = bcd2bin(buf[M41T62_REG_MON] & 0x1f); in m41t62_update_rtc_time() 73 tm->tm_year = bcd2bin(buf[M41T62_REG_YEAR]) + 100 + 1900; in m41t62_update_rtc_time() 78 tm->tm_sec, tm->tm_min, tm->tm_hour, in m41t62_update_rtc_time() 79 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t62_update_rtc_time() [all …]
|
D | s35392a.c | 131 static int validate_time(const struct rtc_time *tm) in validate_time() argument 133 if ((tm->tm_year < 2000) || (tm->tm_year > 2099)) in validate_time() 136 if ((tm->tm_mon < 1) || (tm->tm_mon > 12)) in validate_time() 139 if ((tm->tm_mday < 1) || (tm->tm_mday > 31)) in validate_time() 142 if ((tm->tm_wday < 0) || (tm->tm_wday > 6)) in validate_time() 145 if ((tm->tm_hour < 0) || (tm->tm_hour > 23)) in validate_time() 148 if ((tm->tm_min < 0) || (tm->tm_min > 59)) in validate_time() 151 if ((tm->tm_sec < 0) || (tm->tm_sec > 59)) in validate_time() 193 static int s35392a_rtc_get(DEV_TYPE *dev, struct rtc_time *tm) in s35392a_rtc_get() argument 213 tm->tm_sec = bcd2bin(date[S35390A_BYTE_SECS]); in s35392a_rtc_get() [all …]
|
D | x1205.c | 87 int rtc_get(struct rtc_time *tm) in rtc_get() argument 99 tm->tm_sec = bcd2bin(buf[CCR_SEC]); in rtc_get() 100 tm->tm_min = bcd2bin(buf[CCR_MIN]); in rtc_get() 101 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ in rtc_get() 102 tm->tm_mday = bcd2bin(buf[CCR_MDAY]); in rtc_get() 103 tm->tm_mon = bcd2bin(buf[CCR_MONTH]); /* mon is 0-11 */ in rtc_get() 104 tm->tm_year = bcd2bin(buf[CCR_YEAR]) in rtc_get() 106 tm->tm_wday = buf[CCR_WDAY]; in rtc_get() 111 tm->tm_sec, tm->tm_min, tm->tm_hour, in rtc_get() 112 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rtc_get() [all …]
|
D | rv8803.c | 37 static int rv8803_rtc_set(struct udevice *dev, const struct rtc_time *tm) in rv8803_rtc_set() argument 43 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in rv8803_rtc_set() 44 tm->tm_hour, tm->tm_min, tm->tm_sec); in rv8803_rtc_set() 46 if (tm->tm_year < 2000 || tm->tm_year > 2099) in rv8803_rtc_set() 49 buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); in rv8803_rtc_set() 50 buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon); in rv8803_rtc_set() 51 buf[RTC_DAY_REG_ADDR] = 1 << (tm->tm_wday & 0x7); in rv8803_rtc_set() 52 buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); in rv8803_rtc_set() 53 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in rv8803_rtc_set() 54 buf[RTC_MIN_REG_ADDR] = bin2bcd(tm->tm_min); in rv8803_rtc_set() [all …]
|
D | pcf2127.c | 46 static int pcf2127_rtc_set(struct udevice *dev, const struct rtc_time *tm) in pcf2127_rtc_set() argument 52 buf[i++] = bin2bcd(tm->tm_sec); in pcf2127_rtc_set() 53 buf[i++] = bin2bcd(tm->tm_min); in pcf2127_rtc_set() 54 buf[i++] = bin2bcd(tm->tm_hour); in pcf2127_rtc_set() 55 buf[i++] = bin2bcd(tm->tm_mday); in pcf2127_rtc_set() 56 buf[i++] = tm->tm_wday & 0x07; in pcf2127_rtc_set() 59 buf[i++] = bin2bcd(tm->tm_mon + 1); in pcf2127_rtc_set() 62 buf[i++] = bin2bcd(tm->tm_year % 100); in pcf2127_rtc_set() 70 static int pcf2127_rtc_get(struct udevice *dev, struct rtc_time *tm) in pcf2127_rtc_get() argument 82 tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); in pcf2127_rtc_get() [all …]
|
D | pl031.c | 63 static int pl031_get(struct udevice *dev, struct rtc_time *tm) in pl031_get() argument 67 if (!tm) in pl031_get() 72 rtc_to_tm(tim, tm); in pl031_get() 75 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in pl031_get() 76 tm->tm_hour, tm->tm_min, tm->tm_sec); in pl031_get() 84 static int pl031_set(struct udevice *dev, const struct rtc_time *tm) in pl031_set() argument 88 if (!tm) in pl031_set() 92 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in pl031_set() 93 tm->tm_hour, tm->tm_min, tm->tm_sec); in pl031_set() 96 tim = rtc_mktime(tm); in pl031_set()
|
/third_party/nghttp2/src/ |
D | timegm.c | 37 time_t nghttp2_timegm(struct tm *tm) { in nghttp2_timegm() argument 41 if (tm->tm_mon > 11) { in nghttp2_timegm() 44 num_leap_year = count_leap_year(tm->tm_year + 1900) - count_leap_year(1970); in nghttp2_timegm() 45 days = (tm->tm_year - 70) * 365 + num_leap_year + tm->tm_yday; in nghttp2_timegm() 46 t = ((int64_t)days * 24 + tm->tm_hour) * 3600 + tm->tm_min * 60 + tm->tm_sec; in nghttp2_timegm() 66 time_t nghttp2_timegm_without_yday(struct tm *tm) { in nghttp2_timegm_without_yday() argument 70 if (tm->tm_mon > 11) { in nghttp2_timegm_without_yday() 73 num_leap_year = count_leap_year(tm->tm_year + 1900) - count_leap_year(1970); in nghttp2_timegm_without_yday() 74 days = (tm->tm_year - 70) * 365 + num_leap_year + daysum[tm->tm_mon] + in nghttp2_timegm_without_yday() 75 tm->tm_mday - 1; in nghttp2_timegm_without_yday() [all …]
|
/third_party/musl/libc-test/src/functional/ |
D | time.c | 13 int tm_cmp(struct tm tm1, struct tm tm2) in tm_cmp() 26 char *tm_str(struct tm tm) in tm_str() argument 33 tm.tm_sec, tm.tm_min, tm.tm_hour, in tm_str() 34 tm.tm_mday, tm.tm_mon, tm.tm_year, in tm_str() 35 tm.tm_wday, tm.tm_yday, tm.tm_isdst); in tm_str() 39 #define TM(ss,mm,hh,md,mo,yr,wd,yd,dst) (struct tm){ \ 50 struct tm *tm; in sec2tm() local 54 tm = gmtime(&t); in sec2tm() 59 r = mktime(tm); in sec2tm() 62 m, tm_str(*tm), strerror(errno)); in sec2tm() [all …]
|
D | strptime.c | 17 static void checkStrptime(const char *s, const char *format, const struct tm *expected) { in checkStrptime() 18 struct tm tm = { }; in checkStrptime() local 21 ret = strptime(s, format, &tm); in checkStrptime() 24 } else if (tm.tm_sec != expected->tm_sec || in checkStrptime() 25 tm.tm_min != expected->tm_min || in checkStrptime() 26 tm.tm_hour != expected->tm_hour || in checkStrptime() 27 tm.tm_mday != expected->tm_mday || in checkStrptime() 28 tm.tm_mon != expected->tm_mon || in checkStrptime() 29 tm.tm_year != expected->tm_year) { in checkStrptime() 34 strftime(buf2, sizeof(buf2), "%FT%H:%M:%S%Z", &tm); in checkStrptime() [all …]
|
/third_party/uboot/u-boot-2020.01/post/drivers/ |
D | rtc.c | 59 static void rtc_post_restore (struct rtc_time *tm, unsigned int sec) in rtc_post_restore() argument 61 time_t t = rtc_mktime(tm) + sec; in rtc_post_restore() 118 struct rtc_time tm; in rtc_post_test() local 120 tm.tm_year = ynl; in rtc_post_test() 121 tm.tm_mon = i + 1; in rtc_post_test() 122 tm.tm_mday = daysnl[i]; in rtc_post_test() 123 tm.tm_hour = 23; in rtc_post_test() 124 tm.tm_min = 59; in rtc_post_test() 125 tm.tm_sec = 59; in rtc_post_test() 126 t = rtc_mktime(&tm); in rtc_post_test() [all …]
|
/third_party/uboot/u-boot-2020.01/drivers/ddr/marvell/a38x/ |
D | mv_ddr_topology.c | 48 struct mv_ddr_topology_map *tm = mv_ddr_topology_map_get(); in mv_ddr_topology_map_update() local 49 struct if_params *iface_params = &(tm->interface_params[0]); in mv_ddr_topology_map_update() 60 if (tm->cfg_src == MV_DDR_CFG_SPD) { in mv_ddr_topology_map_update() 62 val = mv_ddr_spd_dev_type_get(&tm->spd_data); in mv_ddr_topology_map_update() 69 if (mv_ddr_spd_timing_calc(&tm->spd_data, tm->timing_data) > 0) { in mv_ddr_topology_map_update() 75 iface_params->bus_width = mv_ddr_spd_dev_width_get(&tm->spd_data); in mv_ddr_topology_map_update() 78 iface_params->memory_size = mv_ddr_spd_die_capacity_get(&tm->spd_data); in mv_ddr_topology_map_update() 81 tm->bus_act_mask = mv_ddr_bus_bit_mask_get(); in mv_ddr_topology_map_update() 84 val = mv_ddr_spd_cs_bit_mask_get(&tm->spd_data); in mv_ddr_topology_map_update() 89 val = mv_ddr_spd_module_type_get(&tm->spd_data); in mv_ddr_topology_map_update() [all …]
|
/third_party/glib/glib/ |
D | gtimer.c | 327 mktime_utc (struct tm *tm) in mktime_utc() argument 339 if (tm->tm_mon < 0 || tm->tm_mon > 11) in mktime_utc() 342 retval = (tm->tm_year - 70) * 365; in mktime_utc() 343 retval += (tm->tm_year - 68) / 4; in mktime_utc() 344 retval += days_before[tm->tm_mon] + tm->tm_mday - 1; in mktime_utc() 346 if (tm->tm_year % 4 == 0 && tm->tm_mon < 2) in mktime_utc() 349 retval = ((((retval * 24) + tm->tm_hour) * 60) + tm->tm_min) * 60 + tm->tm_sec; in mktime_utc() 351 retval = timegm (tm); in mktime_utc() 391 struct tm tm = {0}; in g_time_val_from_iso8601() local 440 tm.tm_mday = mday; in g_time_val_from_iso8601() [all …]
|
/third_party/skia/third_party/externals/abseil-cpp/absl/time/ |
D | time_benchmark.cc | 92 struct tm tm; in BM_Time_ToDateTime_Libc() local 94 benchmark::DoNotOptimize(localtime_r(&t, &tm)); in BM_Time_ToDateTime_Libc() 96 benchmark::DoNotOptimize(localtime_s(&tm, &t)); in BM_Time_ToDateTime_Libc() 116 struct tm tm; in BM_Time_ToDateTimeUTC_Libc() local 118 benchmark::DoNotOptimize(gmtime_r(&t, &tm)); in BM_Time_ToDateTimeUTC_Libc() 120 benchmark::DoNotOptimize(gmtime_s(&tm, &t)); in BM_Time_ToDateTimeUTC_Libc() 201 struct tm tm; in BM_Time_FromCivil_Libc() local 203 tm.tm_year = 2014 - 1900; in BM_Time_FromCivil_Libc() 204 tm.tm_mon = 12 - 1; in BM_Time_FromCivil_Libc() 205 tm.tm_mday = 18; in BM_Time_FromCivil_Libc() [all …]
|
/third_party/abseil-cpp/absl/time/ |
D | time_benchmark.cc | 92 struct tm tm; in BM_Time_ToDateTime_Libc() local 94 benchmark::DoNotOptimize(localtime_r(&t, &tm)); in BM_Time_ToDateTime_Libc() 96 benchmark::DoNotOptimize(localtime_s(&tm, &t)); in BM_Time_ToDateTime_Libc() 116 struct tm tm; in BM_Time_ToDateTimeUTC_Libc() local 118 benchmark::DoNotOptimize(gmtime_r(&t, &tm)); in BM_Time_ToDateTimeUTC_Libc() 120 benchmark::DoNotOptimize(gmtime_s(&tm, &t)); in BM_Time_ToDateTimeUTC_Libc() 201 struct tm tm; in BM_Time_FromCivil_Libc() local 203 tm.tm_year = 2014 - 1900; in BM_Time_FromCivil_Libc() 204 tm.tm_mon = 12 - 1; in BM_Time_FromCivil_Libc() 205 tm.tm_mday = 18; in BM_Time_FromCivil_Libc() [all …]
|
/third_party/openssl/crypto/ |
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() 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() 90 tm->tm_year = time_year - 1900; in OPENSSL_gmtime_adj() 91 tm->tm_mon = time_month - 1; in OPENSSL_gmtime_adj() [all …]
|