/stdlib/ |
A D | random_r.c | 170 if (buf == NULL) in __srandom_r() 172 type = buf->rand_type; in __srandom_r() 176 state = buf->state; in __srandom_r() 186 kc = buf->rand_deg; in __srandom_r() 200 buf->fptr = &state[buf->rand_sep]; in __srandom_r() 201 buf->rptr = &state[0]; in __srandom_r() 233 if (buf == NULL) in weak_alias() 269 buf->state = state; in weak_alias() 360 state = buf->state; in weak_alias() 390 buf->fptr = fptr; in weak_alias() [all …]
|
A D | tst-rand48-2.c | 14 unsigned short int buf[3]; in do_test() local 32 buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e; in do_test() 34 if ((d = erand48 (buf)) < 0.0 || d >= 1.0) in do_test() 40 buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e; in do_test() 42 if (erand48_r (buf, &data, &d) != 0 || d < 0.0 || d >= 1.0) in do_test() 64 buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e; in do_test() 66 if ((l = nrand48 (buf)) < 0 || l > INT32_MAX) in do_test() 72 buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e; in do_test() 96 buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e; in do_test() 98 if ((l = jrand48 (buf)) < INT32_MIN || l > INT32_MAX) in do_test() [all …]
|
A D | tst-atof1.c | 8 char buf[100]; in do_test() local 9 snprintf (buf, sizeof (buf), "%g", atof ("0x10p-1")); in do_test() 10 if (strcmp (buf, "8") != 0) in do_test() 12 printf ("got \"%s\", expected \"8\"\n", buf); in do_test()
|
A D | tst-atof2.c | 41 char buf[100]; in do_test() local 42 snprintf (buf, sizeof (buf), "%g", atof (tests[i].str)); in do_test() 43 if (strcmp (buf, tests[i].expected) != 0) in do_test() 46 i, buf, tests[i].expected); in do_test()
|
A D | bug-strtod.c | 29 char buf[300]; \ 38 n = sprintf (buf, "%d", cnt); \ 39 memset (buf + n, '0', cnt); \ 40 sprintf (buf + n + cnt, ".000e-%d", cnt); \ 41 f = strto ## FSUF (buf, NULL); \ 51 buf, cnt, fstr, fcntstr); \
|
A D | tst-getrandom.c | 157 char buf[16]; in test_getentropy() local 158 memset (buf, '@', sizeof (buf)); in test_getentropy() 159 if (getentropy (buf, 0) != 0) in test_getentropy() 165 for (size_t i = 0; i < sizeof (buf); ++i) in test_getentropy() 166 if (buf[i] != '@') in test_getentropy() 173 if (getentropy (buf, sizeof (buf)) != 0) in test_getentropy() 181 _Static_assert (sizeof (buf) < sizeof (buf2), "buf and buf2 compatible"); in test_getentropy() 183 if (getentropy (buf2, sizeof (buf)) != 0) in test_getentropy() 192 if (memcmp (buf, buf2, sizeof (buf) == 0)) in test_getentropy() 199 for (size_t i = sizeof (buf); i < sizeof (buf2); ++i) in test_getentropy()
|
A D | test-canon.c | 124 char buf[PATH_MAX]; in do_test() local 126 getcwd (cwd, sizeof (buf)); in do_test() 130 if (realpath (NULL, buf) != NULL || errno != EINVAL) in do_test() 149 if (realpath ("", buf) != NULL || errno != ENOENT) in do_test() 165 buf[0] = '\0'; in do_test() 166 result = realpath (tests[i].in, buf); in do_test() 177 if (!check_path (buf, tests[i].out ? tests[i].out : tests[i].resolved)) in do_test() 181 buf); in do_test() 206 getcwd (buf, sizeof (buf)); in do_test() 207 if (strcmp (buf, cwd)) in do_test() [all …]
|
A D | tst-strfrom.h | 78 char buf[50], sbuf[5]; \ 94 rc = FTOSTR (buf, tests[i].size, tests[i].fmt, tests[i].t.FSUF); \ 95 rc1 = (strcmp (buf, tests[i].s) != 0) || (rc != tests[i].rc); \ 99 buf, rc, tests[i].s, tests[i].rc); \ 105 rc = FTOSTR (buf, 50, htest[i].fmt, htest[i].t.FSUF); \ 106 if (strcmp (buf, htest[i].exp[0]) == 0 \ 107 || strcmp (buf, htest[i].exp[1]) == 0 \ 108 || strcmp (buf, htest[i].exp[2]) == 0 \ 109 || strcmp (buf, htest[i].exp[3]) == 0) \ 114 "or %s\n", buf, rc, htest[i].exp[0], htest[i].exp[1], \
|
A D | tst-setcontext3.c | 51 const char buf[] = "Called exit function\n"; in exit_called() local 59 res = write (fd, buf, sizeof (buf)); in exit_called() 60 if (res != sizeof (buf)) in exit_called() 71 printf ("PASS: %s", buf); in exit_called()
|
A D | canonicalize.c | 67 # define __getcwd(buf, max) getcwd (buf, max, 0) argument 72 # define __getcwd(buf, max) getwd (buf) argument 315 char *buf; in realpath_stk() local 319 buf = link_buffer.data; in realpath_stk() 321 n = __readlink (rname, buf, bufsize - 1); in realpath_stk() 335 buf[n] = '\0'; in realpath_stk() 358 name = end = memcpy (extra_buf, buf, n); in realpath_stk() 361 if (IS_ABSOLUTE_FILE_NAME (buf)) in realpath_stk() 363 idx_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf); in realpath_stk() 365 dest = __mempcpy (rname, buf, pfxlen); in realpath_stk() [all …]
|
A D | tst-strtod.c | 87 char buf[100]; in do_test() local 124 sprintf (buf, "%f", strtod ("-0.0", NULL)); in do_test() 125 if (strcmp (buf, "-0.000000") != 0) in do_test() 127 printf (" strtod (\"-0.0\", NULL) returns \"%s\"\n", buf); in do_test()
|