/third_party/toybox/toys/pending/ |
H A D | telnetd.c | 175 static int handle_iacs(struct term_session *tm, int c, int fd) in handle_iacs() argument 180 curr = start = tm->buff2+tm->buff2_avail; in handle_iacs() 181 end = tm->buff2 + c -1; in handle_iacs() 182 tm->rem = 0; in handle_iacs() 199 tm->rem = 1; in handle_iacs() 216 tm->rem = end - curr; in handle_iacs() 225 curr++, tm->rem++; in handle_iacs() 228 tm->rem++; in handle_iacs() 231 tm in handle_iacs() 273 struct term_session *tm = NULL; telnetd_main() local [all...] |
/third_party/musl/porting/linux/user/src/time/ |
H A D | strftime.c | 47 static int week_num(const struct tm *tm) in week_num() argument 49 int val = (tm->tm_yday + 7U - (tm->tm_wday+6U)%7) / 7; in week_num() 52 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 59 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 60 if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year%400-1))) in week_num() 66 int jan1 = (tm in week_num() 73 __strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) __strftime_fmt_1() argument 285 __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc) __strftime_l() argument 365 strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) strftime() argument [all...] |
H A D | strptime.c | 48 int __getzonename(const char *restrict s, struct tm *restrict tm) in __getzonename() argument 51 struct tm old; in __getzonename() 52 memcpy(&old, tm, sizeof(struct tm)); in __getzonename() 64 /* In the structure struct tm, tm_zone is declared as const char * type, so use static */ in __getzonename() 69 tm->__tm_zone = buf; in __getzonename() 73 struct tm *tmp = localtime(&t); in __getzonename() 75 tm->tm_isdst = tmp->tm_isdst; in __getzonename() 80 int __getgmtoff(const char *restrict s, struct tm *restric argument 131 strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) strptime() argument [all...] |
/third_party/musl/src/time/ |
H A D | strftime.c | 20 static int week_num(const struct tm *tm) in week_num() argument 22 int val = (tm->tm_yday + 7U - (tm->tm_wday+6U)%7) / 7; in week_num() 25 if ((tm->tm_wday + 371U - tm->tm_yday - 2) % 7 <= 2) in week_num() 32 int dec31 = (tm->tm_wday + 7U - tm->tm_yday - 1) % 7; in week_num() 33 if (dec31 == 4 || (dec31 == 5 && is_leap(tm->tm_year%400-1))) in week_num() 39 int jan1 = (tm in week_num() 46 __strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) __strftime_fmt_1() argument 235 __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc) __strftime_l() argument 301 strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) strftime() argument [all...] |
H A D | strptime.c | 9 int __getzonename(const char *restrict s, struct tm *restrict tm) in __getzonename() argument 12 struct tm old; in __getzonename() 13 memcpy(&old, tm, sizeof(struct tm)); in __getzonename() 25 /* In the structure struct tm, tm_zone is declared as const char * type, so use static */ in __getzonename() 30 tm->__tm_zone = buf; in __getzonename() 34 struct tm *tmp = localtime(&t); in __getzonename() 36 tm->tm_isdst = tmp->tm_isdst; in __getzonename() 41 int __getgmtoff(const char *restrict s, struct tm *restric argument 92 strptime(const char *restrict s, const char *restrict f, struct tm *restrict tm) strptime() argument [all...] |
H A D | localtime_r.c | 5 struct tm *__localtime_r(const time_t *restrict t, struct tm *restrict tm) in __localtime_r() argument 13 __secs_to_zone(*t, 0, &tm->tm_isdst, &tm->__tm_gmtoff, 0, &tm->__tm_zone, TZ_USE_ENV); in __localtime_r() 14 if (__secs_to_tm((long long)*t + tm->__tm_gmtoff, tm) < 0) { in __localtime_r() 18 return tm; in __localtime_r() 24 struct tm *localtime_noenv_ argument [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/time/time_gtest/ |
H A D | time_test.cpp | 60 * @tc.desc: Verify the correctness of the mktime function by checking the conversion of a struct tm to a time_t value 67 struct tm time; in HWTEST_F() 68 memset(&time, 0, sizeof(tm)); in HWTEST_F() 77 memset(&time, 0, sizeof(tm)); in HWTEST_F() 89 * @tc.desc: Verify the behavior of the mktime function when converting a struct tm representing a future date to a 96 struct tm time; in HWTEST_F() 97 memset(&time, 0, sizeof(tm)); in HWTEST_F() 118 * @tc.desc: Verify the behavior of the strftime function in correctly formatting a given struct tm time value into a 128 struct tm time; in HWTEST_F() 129 memset(&time, 0, sizeof(tm)); in HWTEST_F() 184 struct tm tm; HWTEST_F() local 320 struct tm tm = {}; HWTEST_F() local 340 struct tm tm; HWTEST_F() local 356 struct tm tm; HWTEST_F() local 371 struct tm tm; HWTEST_F() local 386 struct tm tm; HWTEST_F() local 401 struct tm tm; HWTEST_F() local 416 struct tm tm; HWTEST_F() local 431 const struct tm tm = {}; HWTEST_F() local 548 struct tm tm; HWTEST_F() local [all...] |
/third_party/musl/porting/liteos_a/kernel/src/time/ |
H A 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 in week_num() 45 __strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) __strftime_fmt_1() argument 215 __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc) __strftime_l() argument 276 strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) strftime() argument [all...] |
H A 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 in strptime() [all...] |
/third_party/musl/porting/liteos_m/kernel/src/time/ |
H A 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 in week_num() 45 __strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) __strftime_fmt_1() argument 215 __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc) __strftime_l() argument 276 strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) strftime() argument [all...] |
H A 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 in strptime() [all...] |
/third_party/musl/porting/uniproton/kernel/src/time/ |
H A 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 in week_num() 45 __strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *tm, locale_t loc, int pad) __strftime_fmt_1() argument 215 __strftime_l(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm, locale_t loc) __strftime_l() argument 276 strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) strftime() argument [all...] |
H A 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 in strptime() [all...] |
/third_party/skia/third_party/externals/abseil-cpp/absl/time/internal/cctz/src/ |
H A D | time_zone_libc.cc | 45 auto tm_gmtoff(const std::tm& tm) -> decltype(_timezone + _dstbias) { 46 const bool is_dst = tm.tm_isdst > 0; 49 auto tm_zone(const std::tm& tm) -> decltype(_tzname[0]) { in decltype() 50 const bool is_dst = tm.tm_isdst > 0; in decltype() 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 132 std::tm tm; make_time() local 159 std::tm tm; find_trans() local 209 std::tm tm; BreakTime() local [all...] |
H A D | time_zone_format.cc | 61 char* strptime(const char* s, const char* fmt, std::tm* tm) { in strptime() argument 63 input >> std::get_time(tm, fmt); in strptime() 112 std::tm ToTM(const time_zone::absolute_lookup& al) { in ToTM() 113 std::tm tm{}; in ToTM() 114 tm.tm_sec = al.cs.second(); in ToTM() 115 tm.tm_min = al.cs.minute(); in ToTM() 116 tm.tm_hour = al.cs.hour(); in ToTM() 117 tm in ToTM() 215 FormatTM(std::string* out, const std::string& fmt, const std::tm& tm) FormatTM() argument 338 const std::tm tm = ToTM(al); format() local 649 ParseTM(const char* dp, const char* fmt, std::tm* tm) ParseTM() argument 659 FromWeek(int week_num, weekday week_start, year_t* year, std::tm* tm) FromWeek() argument [all...] |
/third_party/toybox/toys/posix/ |
H A 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 in calstrings() 72 struct tm *tm; cal_main() local [all...] |
/third_party/libwebsockets/lib/roles/http/ |
H A D | date.c | 38 lws_http_date_render(char *buf, size_t len, const struct tm *tm) in lws_http_date_render() argument 40 const char *w = s + 36 + (3 * tm->tm_wday), *m = s + (3 * tm->tm_mon); in lws_http_date_render() 46 w[0], w[1], w[2], tm->tm_mday, m[0], m[1], m[2], in lws_http_date_render() 47 1900 + tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); in lws_http_date_render() 57 struct tm tm in lws_http_date_render_from_unix() 58 struct tm *tm = gmtime_r(t, &tmp); lws_http_date_render_from_unix() local 72 lws_http_date_parse(const char *b, size_t len, struct tm *tm) lws_http_date_parse() argument 137 struct tm tm; lws_http_date_parse_unix() local [all...] |
/third_party/musl/libc-test/src/functional/ |
H A D | time.c | 11 * add additional nonstandard fields to struct tm... */ 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 in tm_str() 50 struct tm *tm; sec2tm() local 68 tm2sec(struct tm *tm, int big, char *m) tm2sec() argument [all...] |
H A D | strptime.c | 13 * This function compares time and date fields of tm structure only. 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 in checkStrptime() 42 struct tm tm = { }; checkStrptimeTz() local [all...] |
/third_party/nghttp2/src/ |
H A 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 *t argument [all...] |
/third_party/node/deps/openssl/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 *t argument 133 julian_adj(const struct tm *tm, int off_day, long offset_sec, long *pday, int *psec) julian_adj() argument [all...] |
/third_party/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 *t argument 133 julian_adj(const struct tm *tm, int off_day, long offset_sec, long *pday, int *psec) julian_adj() argument [all...] |
/third_party/skia/third_party/externals/abseil-cpp/absl/time/ |
H A 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 251 struct tm tm; BM_Time_FromCivilDay0_Libc() local [all...] |
/third_party/ltp/lib/ |
H A D | tst_rtctime.c | 5 * This file is a implementation for rtc set read,covert to tm functions 58 void tst_rtc_time_to_tm(long long time, struct rtc_time *tm) in tst_rtc_time_to_tm() argument 68 tm->tm_wday = (days + 4) % 7; in tst_rtc_time_to_tm() 78 tm->tm_year = year - 1900; in tst_rtc_time_to_tm() 79 tm->tm_yday = days + 1; in tst_rtc_time_to_tm() 89 tm->tm_mon = month; in tst_rtc_time_to_tm() 90 tm->tm_mday = days + 1; in tst_rtc_time_to_tm() 92 tm->tm_hour = secs / 3600; in tst_rtc_time_to_tm() 93 secs -= tm->tm_hour * 3600; in tst_rtc_time_to_tm() 94 tm in tst_rtc_time_to_tm() 104 tst_rtc_tm_to_time(struct rtc_time *tm) tst_rtc_tm_to_time() argument [all...] |
/third_party/node/deps/openssl/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, cons argument 356 struct tm tm; ASN1_TIME_to_generalizedtime() local 383 struct tm tm; ASN1_TIME_set_string_X509() local 441 ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm) ASN1_TIME_to_tm() argument 474 ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) ASN1_TIME_print() argument 480 ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags) ASN1_TIME_print_ex() argument 488 ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags) ossl_asn1_time_print_ex() argument 572 struct tm tm; ASN1_TIME_normalize() local [all...] |