/time/ |
A D | tst-ftime_l.c | 15 char buf[1000]; in do_test() local 33 if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) in do_test() 41 " 1 MARCH 2002", buf); in do_test() 45 printf ("got \"%s\"\n", buf); in do_test() 48 if (strftime_l (buf, sizeof (buf), "%e %^B %Y", &tm, l) == 0) in do_test() 56 " 1 M\xc4RZ 2002", buf); in do_test() 88 n = strftime (buf, sizeof (buf), "%e %^B %Y", &tm); in do_test() 101 " 1 M\xc4RZ 2002", buf); in do_test() 111 if (strftime (buf, sizeof (buf), "%e %^B %Y", &tm) == 0) in do_test() 119 " 1 MARCH 2002", buf); in do_test() [all …]
|
A D | tst_wcsftime.c | 7 wchar_t buf[200]; in main() local 16 n = wcsftime (buf, sizeof (buf) / sizeof (buf[0]), in main() 21 wprintf (L"It is now %ls", buf); in main() 23 wcsftime (buf, sizeof (buf) / sizeof (buf[0]), L"%A\n", tp); in main() 25 wprintf (L"The weekday is %ls", buf); in main()
|
A D | tst-y2039.c | 33 char buf[500]; in do_test() local 36 TEST_VERIFY_EXIT (strftime (buf, sizeof buf, "%Y-%m-%d %H:%M:%S %Z", tm) in do_test() 38 puts (buf); in do_test() 39 TEST_VERIFY (strcmp (buf, "2039-04-30 14:00:00 PDT") == 0); in do_test() 46 TEST_VERIFY_EXIT (strftime (buf, sizeof buf, "%Y-%m-%d %H:%M:%S %Z", tm) in do_test() 48 puts (buf); in do_test() 49 TEST_VERIFY (strcmp (buf, "2039-04-30 14:00:00 PDT") == 0); in do_test()
|
A D | tst-strftime.c | 10 char buf[1000]; in do_bz18985() local 16 rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm); in do_bz18985() 22 if (0 != strcmp (buf, expected)) in do_bz18985() 37 rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm); in do_bz18985() 42 if (0 != strcmp (buf, expected)) in do_bz18985() 85 char *buf = NULL; in do_test() local 90 buf = (char *) realloc (buf, size); in do_test() 91 if (buf == NULL) in do_test() 118 free (buf); in do_test() 141 char buf[100]; in do_test() local [all …]
|
A D | tst-strptime2.c | 70 i = sprintf (buf, "%s %c", dummy_string, sign); in mkbuf() 123 p = strptime (buf, "%s %z", &tm); in compare() 154 char buf[buffer_size]; in do_test() local 170 sprintf (buf, "%s 1030", dummy_string); in do_test() 172 result |= compare (buf, expect, nresult); in do_test() 177 sprintf (buf, "%s Z", dummy_string); in do_test() 179 result |= compare (buf, expect, nresult); in do_test() 196 result |= compare (buf, expect, nresult); in do_test() 199 result |= compare (buf, expect, nresult); in do_test() 206 result |= compare (buf, expect, nresult); in do_test() [all …]
|
A D | ctime_r.c | 24 __ctime64_r (const __time64_t *t, char *buf) in __ctime64_r() argument 27 return __asctime_r (__localtime64_r (t, &tm), buf); in __ctime64_r() 37 ctime_r (const time_t *t, char *buf) in libc_hidden_def() 40 return __ctime64_r (&t64, buf); in libc_hidden_def()
|
A D | bug-asctime_r.c | 14 char buf[1000]; in do_test() local 16 buf[26] = '\xff'; in do_test() 17 char *s = asctime_r (tp, buf); in do_test() 23 if (buf[26] != '\xff') in do_test()
|
A D | test_time.c | 36 char buf[BUFSIZ]; in main() local 39 static char buf[BUFSIZ]; in main() local 40 sprintf(buf, "TZ=%s", *argv); in main() 41 if (putenv(buf)) in main() 47 puts (buf); in main() 70 else if (strftime (buf, sizeof (buf), "%a %b %d %X %Z %Y", tp) == 0) in main() 76 puts(buf); in main()
|
A D | asctime.c | 34 asctime_internal (const struct tm *tp, char *buf, size_t buflen) in asctime_internal() argument 56 int n = __snprintf (buf, buflen, format, in asctime_internal() 68 return buf; in asctime_internal() 75 __asctime_r (const struct tm *tp, char *buf) in __asctime_r() argument 77 return asctime_internal (tp, buf, 26); in __asctime_r()
|
A D | strptime.c | 30 strptime (const char *buf, const char *format, struct tm *tm) in strptime() argument 32 return __strptime_internal (buf, format, tm, NULL, _NL_CURRENT_LOCALE); in strptime()
|
A D | tst-posixtz.c | 40 char buf[100]; in do_test() local 51 snprintf (buf, sizeof (buf), in do_test() 57 fputs (buf, stdout); in do_test() 59 if (strcmp (buf, tests[cnt].result) == 0) in do_test()
|
A D | bug-asctime.c | 21 char buf[1000]; in do_test() local 23 s = asctime_r (tp, buf); in do_test()
|
A D | tst-cpuclock1.c | 36 static volatile char buf[4096]; in chew_cpu() local 38 for (size_t j = 0; j < sizeof buf; ++j) in chew_cpu() 39 buf[j] = 0xaa; in chew_cpu() 42 for (size_t j = 0; j < sizeof buf; ++j) in chew_cpu() 43 buf[j] = 0xbb; in chew_cpu() 44 write (nullfd, (char *) buf, sizeof buf); in chew_cpu()
|
A D | tst-strftime2.c | 156 char date[11], buf[100]; in do_test() local 176 r = strftime (buf, sizeof (buf), formats[j], &ttm); in do_test() 178 printf ("%s\t\"%s\"\t\"%s\"", date, formats[j], buf); in do_test() 179 if (strcmp (buf, ref[i][j][k]) != 0) in do_test()
|
A D | tst-strptime.c | 98 char buf[100]; in test_tm() local 116 strftime (buf, sizeof (buf), "%F %T", &tm); in test_tm() 123 buf, tm.tm_wday, tm.tm_yday); in test_tm() 125 if (strcmp (buf, tm_tests[i].output) != 0) in test_tm()
|
A D | tzfile.c | 267 struct alloc_buffer buf; in __tzfile_read() local 278 buf = alloc_buffer_create (transitions, total_size); in __tzfile_read() 283 (void) alloc_buffer_alloc_array (&buf, __time64_t, num_transitions); in __tzfile_read() 284 leaps = alloc_buffer_alloc_array (&buf, struct leap, num_leaps); in __tzfile_read() 285 types = alloc_buffer_alloc_array (&buf, struct ttinfo, num_types); in __tzfile_read() 286 type_idxs = alloc_buffer_alloc_array (&buf, unsigned char, num_transitions); in __tzfile_read() 287 zone_names = alloc_buffer_alloc_array (&buf, char, chars); in __tzfile_read() 289 tzspec = alloc_buffer_alloc_array (&buf, char, tzspec_len); in __tzfile_read() 293 *extrap = alloc_buffer_alloc_array (&buf, char, extra); in __tzfile_read() 294 if (alloc_buffer_has_failed (&buf)) in __tzfile_read()
|
A D | strftime_l.c | 569 CHAR_T buf[1 + (sizeof (int) < sizeof (time_t) in libc_hidden_def() local 986 bufp = buf + sizeof (buf) / sizeof (buf[0]); in libc_hidden_def() 1003 int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) in libc_hidden_def() 1040 cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); in libc_hidden_def() 1149 bufp = buf + sizeof (buf) / sizeof (buf[0]); in libc_hidden_def()
|
A D | strptime_l.c | 1252 strptime (const char *buf, const char *format, struct tm *tm LOCALE_PARAM) in strptime() argument 1254 return __strptime_internal (buf, format, tm, NULL LOCALE_ARG); in strptime()
|