/picolibc-3.7.0-3.6.0/newlib/testsuite/newlib.locale/ |
D | UTF-8.c | 140 int i; in main() local 158 for (i = 2; i < 7; i++) in main() 160 retval = mbtowc (&wchar, first[i-1], MAX_BYTES); in main() 161 if (retval == i) in main() 162 printf("2.1.%d: U-%08lx\n", i, (long) wchar); in main() 164 printf("2.1.%d: Invalid\n", i); in main() 168 for (i = 1; i < 7; i++) in main() 170 retval = mbtowc (&wchar, last[i-1], MAX_BYTES); in main() 171 if (retval == i) in main() 172 printf("2.2.%d: U-%08lx\n", i, (long) wchar); in main() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libm/ld/common/ |
D | k_rem_pio2.c | 297 int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; in __kernel_rem_pio2() local 311 for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j]; in __kernel_rem_pio2() 314 for (i=0;i<=jk;i++) { in __kernel_rem_pio2() 315 for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; in __kernel_rem_pio2() 316 q[i] = fw; in __kernel_rem_pio2() 322 for(i=0,j=jz,z=q[jz];j>0;i++,j--) { in __kernel_rem_pio2() 324 iq[i] = (int32_t)(z-two24*fw); in __kernel_rem_pio2() 335 i = (iq[jz-1]>>(24-q0)); n += i; in __kernel_rem_pio2() 336 iq[jz-1] -= i<<(24-q0); in __kernel_rem_pio2() 344 for(i=0;i<jz ;i++) { /* compute 1-q */ in __kernel_rem_pio2() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libm/math/ |
D | kf_rem_pio2.c | 53 __int32_t jz, jx, jv, jp, jk, carry, n, iq[20], i, j, k, m, q0, ih; in __kernel_rem_pio2f() local 70 for (i = 0; i <= m; i++, j++) in __kernel_rem_pio2f() 71 f[i] = (j < 0) ? zero : (float)ipio2[j]; in __kernel_rem_pio2f() 74 for (i = 0; i <= jk; i++) { in __kernel_rem_pio2f() 76 fw += x[j] * f[jx + i - j]; in __kernel_rem_pio2f() 77 q[i] = fw; in __kernel_rem_pio2f() 83 for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--) { in __kernel_rem_pio2f() 85 iq[i] = (__int32_t)(z - two8 * fw); in __kernel_rem_pio2f() 96 i = (iq[jz - 1] >> (8 - q0)); in __kernel_rem_pio2f() 97 n += i; in __kernel_rem_pio2f() [all …]
|
D | k_rem_pio2.c | 163 __int32_t jz, jx, jv, jp, jk, carry, n, iq[20], i, j, k, m, q0, ih; in __kernel_rem_pio2() local 180 for (i = 0; i <= m; i++, j++) in __kernel_rem_pio2() 181 f[i] = (j < 0) ? zero : (__float64)ipio2[j]; in __kernel_rem_pio2() 184 for (i = 0; i <= jk; i++) { in __kernel_rem_pio2() 186 fw += x[j] * f[jx + i - j]; in __kernel_rem_pio2() 187 q[i] = fw; in __kernel_rem_pio2() 193 for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--) { in __kernel_rem_pio2() 195 iq[i] = (__int32_t)(z - two24 * fw); in __kernel_rem_pio2() 206 i = (iq[jz - 1] >> (24 - q0)); in __kernel_rem_pio2() 207 n += i; in __kernel_rem_pio2() [all …]
|
D | sf_jn.c | 26 __int32_t i, hx, ix, sgn; in jnf() local 55 for (i = 1; i < n; i++) { in jnf() 57 b = b * ((float)(i + i) / x) - a; /* avoid underflow */ in jnf() 70 for (a = one, i = 2; i <= n; i++) { in jnf() 71 a *= (float)i; /* a = n! */ in jnf() 123 for (t = zero, i = 2 * (n + k); i >= m; i -= 2) in jnf() 124 t = one / (i / x - t); in jnf() 139 for (i = n - 1, di = (float)(i + i); i > 0; i--) { in jnf() 147 for (i = n - 1, di = (float)(i + i); i > 0; i--) { in jnf() 173 __int32_t i, hx, ix, ib; in ynf() local [all …]
|
/picolibc-3.7.0-3.6.0/test/ |
D | malloc_stress.c | 62 int i; in shuffle_order() local 63 for (i = 0; i < NUM_MALLOC; i++) in shuffle_order() 64 order[i] = i; in shuffle_order() 65 for (i = 0; i < NUM_MALLOC - 1; i++) { in shuffle_order() 66 int j = randint(NUM_MALLOC - 1 - i) + i + 1; in shuffle_order() 68 int t = order[i]; in shuffle_order() 69 order[i] = order[j]; in shuffle_order() 75 fill_block(int i) in fill_block() argument 77 block_data[i] = randint(256); in fill_block() 78 if (blocks[i]) in fill_block() [all …]
|
D | timegm.c | 54 unsigned i; in main() local 58 for (i = 0; i < NUM_TEST; i++) { in main() 59 tests[i].time = random(); in main() 60 gmtime_r(&tests[i].time, &tests[i].tm); in main() 62 printf (" .time = %ld,\n", tests[i].time); in main() 64 printf (" .tm_sec = %d,\n", tests[i].tm.tm_sec); /* Seconds (0-60) */ in main() 65 printf (" .tm_min = %d,\n", tests[i].tm.tm_min); /* Minutes (0-59) */ in main() 66 printf (" .tm_hour = %d,\n", tests[i].tm.tm_hour); /* Hours (0-23) */ in main() 67 … printf (" .tm_mday = %d,\n", tests[i].tm.tm_mday); /* Day of the month (1-31) */ in main() 68 printf (" .tm_mon = %d,\n", tests[i].tm.tm_mon); /* Month (0-11) */ in main() [all …]
|
D | test-strtod.c | 115 int i; in main() local 126 for (i = 0; i < (int) NTESTS; i++) { in main() 127 d = strtod(tests[i].string, &end); in main() 128 if (d != tests[i].dvalue) { in main() 129 printf("strtod(\"%s\"): got %.17e %a want %.17e %a\n", tests[i].string, in main() 130 d, d, tests[i].dvalue, tests[i].dvalue); in main() 135 tests[i].string, end); in main() 138 f = strtof(tests[i].string, &end); in main() 139 if (f != tests[i].fvalue) { in main() 140 printf("strtof(\"%s\"): got %.17e %a want %.17e %a\n", tests[i].string, in main() [all …]
|
D | ffs.c | 55 slow_ffs(int i) in slow_ffs() argument 58 if (!i) in slow_ffs() 60 for (p = 1; (i & (1 << (p - 1))) == 0; p++) in slow_ffs() 66 slow_ffsl(long int i) in slow_ffsl() argument 69 if (!i) in slow_ffsl() 71 for (p = 1; (i & (1L << (p - 1))) == 0; p++) in slow_ffsl() 77 slow_ffsll(long long int i) in slow_ffsll() argument 80 if (!i) in slow_ffsll() 82 for (p = 1; (i & (1LL << (p - 1))) == 0; p++) in slow_ffsll() 110 for (size_t i = 0; i < sizeof(long long) * 8; i++) { in main() local [all …]
|
/picolibc-3.7.0-3.6.0/test/libc-testsuite/ |
D | qsort.c | 52 int i; in tcmp() local 54 for (i = 0; i < 3; i++) { in tcmp() 55 c = (int) a->b[i] - (int) b->b[i]; in tcmp() 92 int i; in test_qsort() local 96 for (i=0; i<(int) (sizeof(s)/sizeof(char *)-1); i++) { in test_qsort() 97 if (strcmp(s[i], s[i+1]) > 0) { in test_qsort() 99 for (i=0; i<(int)(sizeof(s)/sizeof(char *)); i++) in test_qsort() 100 printf("\t%s\n", s[i]); in test_qsort() 106 for (i=0; i<(int)(sizeof(n)/sizeof(n[0])-1); i++) { in test_qsort() 107 if (n[i] > n[i+1]) { in test_qsort() [all …]
|
D | sscanf.c | 37 TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \ 53 int i; in test_sscanf() local 63 TEST(i, sscanf("hello, world\n", "%s %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 67 TEST(i, sscanf("hello, world\n", "%[hel]%s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 71 TEST(i, sscanf("hello, world\n", "%[hel] %s", a, b), 2, "only %d fields, expected %d"); in test_sscanf() 79 TEST(i, sscanf("hello, world\n", "%8c%8c", a, b), 1, "%d fields, expected %d"); in test_sscanf() 83 …TEST(i, sscanf("56789 0123 56a72", "%2d%d%*d %[0123456789]\n", &x, &y, a), 3, "only %d fields, exp… in test_sscanf() 84 TEST(i, x, 56, "%d != %d"); in test_sscanf() 85 TEST(i, y, 789, "%d != %d"); in test_sscanf() 88 …TEST(i, sscanf("011 0x100 11 0x100 100", "%i %i %o %x %x\n", &x, &y, &z, &u, &v), 5, "only %d fiel… in test_sscanf() [all …]
|
D | strtol.c | 49 int i; in test_strtol() local 68 TEST2(i, c-s, 10, "wrong final position %d != %d"); in test_strtol() 69 TEST2(i, errno, ERANGE, "missing errno %d != %d"); in test_strtol() 72 TEST2(i, c-s, 11, "wrong final position %d != %d"); in test_strtol() 73 TEST2(i, errno, ERANGE, "missing errno %d != %d"); in test_strtol() 76 TEST2(i, c-s, 10, "wrong final position %d != %d"); in test_strtol() 77 TEST2(i, errno, ERANGE, "missing errno %d != %d"); in test_strtol() 80 TEST2(i, c-s, 2, "wrong final position %d != %d"); in test_strtol() 81 TEST2(i, errno, 0, "spurious errno %d != %d"); in test_strtol() 84 TEST2(i, c-s, 2, "wrong final position %d != %d"); in test_strtol() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libc/locale/ |
D | newlocale.c | 126 int i; in newlocale() local 150 for (i = 1; i < _LC_LAST; ++i) in newlocale() 152 if (((1 << i) & category_mask) != 0) in newlocale() 156 const char *cat = (locale[0] == '\0') ? __get_locale_env (i) in newlocale() 163 strcpy (new_categories[i], cat); in newlocale() 166 strcpy (new_categories[i], base ? base->categories[i] : "C"); in newlocale() 169 for (i = 1; i < _LC_LAST; ++i) in newlocale() 173 if (base && (((1 << i) & category_mask) == 0 in newlocale() 174 || !strcmp (base->categories[i], new_categories[i]))) in newlocale() 176 strcpy (tmp_locale.categories[i], new_categories[i]); in newlocale() [all …]
|
D | duplocale.c | 79 int i; in duplocale() local 82 (void) i; in duplocale() 97 for (i = 1; i < _LC_LAST; ++i) in duplocale() 98 if (locobj->lc_cat[i].buf) in duplocale() 102 tmp_locale.lc_cat[i].ptr = NULL; in duplocale() 103 tmp_locale.lc_cat[i].buf = NULL; in duplocale() 104 tmp_locale.categories[i][0] = '\0'; /* __loadlocale tests this! */ in duplocale() 105 if (!__loadlocale (&tmp_locale, i, locobj->categories[i])) in duplocale() 121 while (--i > 0) in duplocale() 122 if (tmp_locale.lc_cat[i].buf) in duplocale() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libc/string/ |
D | str-two-way.h | 202 size_t i; /* Index into current byte of NEEDLE. */ in two_way_short_needle() local 224 i = MAX (suffix, memory); in two_way_short_needle() 225 while (i < needle_len && (CANON_ELEMENT (needle[i]) in two_way_short_needle() 226 == CANON_ELEMENT (haystack[i + j]))) in two_way_short_needle() 227 ++i; in two_way_short_needle() 228 if (needle_len <= i) in two_way_short_needle() 231 i = suffix - 1; in two_way_short_needle() 232 while (memory < i + 1 && (CANON_ELEMENT (needle[i]) in two_way_short_needle() 233 == CANON_ELEMENT (haystack[i + j]))) in two_way_short_needle() 234 --i; in two_way_short_needle() [all …]
|
D | uniset | 260 for $i (keys(%category)) { 261 $used{$i} = "[${cat}]" if $category{$i} eq $cat; 266 for $i (keys(%category)) { 267 delete $used{$i} if $category{$i} eq $cat; 272 for $i (keys(%category)) { 273 delete $used{$i} unless $category{$i} eq $cat; 284 $i = ord($_); 285 $used{$i} .= "[${setname}]" unless $remove; 286 delete $used{$i} if $remove; 299 for ($i = $first; $i <= $last; $i++) { [all …]
|
D | strverscmp.c | 67 size_t i, dp, j; in strverscmp() local 72 for (dp=i=0; l[i]==r[i]; i++) { in strverscmp() 73 int c = l[i]; in strverscmp() 75 if (!isdigit(c)) dp=i+1, z=1; in strverscmp() 82 for (j=i; isdigit(l[j]); j++) in strverscmp() 85 } else if (z && dp<i && (isdigit(l[i]) || isdigit(r[i]))) { in strverscmp() 88 return (unsigned char)(l[i]-'0') - (unsigned char)(r[i]-'0'); in strverscmp() 91 return l[i] - r[i]; in strverscmp()
|
/picolibc-3.7.0-3.6.0/newlib/testsuite/newlib.string/ |
D | memmove1.c | 96 size_t i; in fill() local 97 for (i = 0; i < MAX*3; i++) in fill() 98 dest[i] = (10 + i) % MAX; in fill() 104 size_t i; in main() local 116 for (i = 0; i < MAX; i++) in main() 122 xmemmove (to_test + MAX, 1 + from_test + MAX, i); in main() 126 mymemmove (to_known + MAX, 1 + from_known + MAX, i); in main() 131 DEBUGP ("memmove failed non-overlap test for %lu bytes\n", (unsigned long) i); in main() 136 for (i = 0; i < MAX; i++) in main() 139 for (j = 0; j < i; j++) in main() [all …]
|
D | tstring.c | 41 int i; in mycopy() local 43 for (i = 0; i < size; ++i) in mycopy() 45 target[i] = source[i]; in mycopy() 51 int i; in myset() local 53 for (i = 0; i < size; ++i) in myset() 55 target[i] = ch; in myset() 78 unsigned i, j, k, x, z = 0, align_test_iterations; in main() local 251 for (i = j-1; i <= j+1; ++i) in main() 255 if (i <= 16 * sizeof(long)) in main() 258 if (i <= 2 * sizeof(long) + 1) in main() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libc/iconv/ces/ |
D | euc.c | 106 int i; in euc_from_ucs_init() local 146 for (i = 0; i < MAX_CS_NUM && data->desc[i].csname != NULL; i++) in euc_from_ucs_init() 148 data->data[i] = _iconv_from_ucs_ces_handlers_table.init ( in euc_from_ucs_init() 149 data->desc[i].csname); in euc_from_ucs_init() 150 if (data->data[i] == NULL) in euc_from_ucs_init() 168 int i; in euc_from_ucs_close() local 171 for (i = 0; i < MAX_CS_NUM; i++) in euc_from_ucs_close() 173 if (((euc_data_t *)data)->data[i] != NULL) in euc_from_ucs_close() 175 ((euc_data_t *)data)->data[i]); in euc_from_ucs_close() 188 int i; in euc_convert_from_ucs() local [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libm/test/ |
D | math2.c | 75 int i; in test_frexp() local 89 for (i = 0; i < 1000; i++) in test_frexp() 93 line(i); in test_frexp() 136 r = frexp(64.0, &i); in test_frexp() 139 test_iok(i, 7); in test_frexp() 141 r = frexp(96.0, &i); in test_frexp() 144 test_iok(i, 7); in test_frexp() 163 int i; in test_mod() local 168 for (i = 0; i < 1000; i++) in test_mod() 172 line(i); in test_mod() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libc/stdlib/ |
D | ldtoa.c | 377 double i; member 465 register int i; in eclear() local 467 for (i = 0; i < NE; i++) in eclear() 481 register int i; in emov() local 483 for (i = 0; i < NE; i++) in emov() 552 int i; in eisnan() local 557 for (i = 0; i < NE - 1; i++) in eisnan() 578 register int i; in einfin() local 581 for (i = 0; i < NE - 1; i++) in einfin() 586 for (i = 0; i < NE - 1; i++) in einfin() [all …]
|
D | gdtoa-hexnan.c | 67 int i) in L_shift() argument 71 i = 8 - i; in L_shift() 72 i <<= 2; in L_shift() 73 j = ULbits - i; in L_shift() 76 x[1] >>= i; in L_shift() 87 int havedig, hd0, i, nbits; in hexnan() local 95 havedig = hd0 = i = 0; in hexnan() 101 if (x < x1 && i < 8) in hexnan() 102 L_shift(x, x1, i); in hexnan() 104 i = 8; in hexnan() [all …]
|
/picolibc-3.7.0-3.6.0/newlib/libc/machine/spu/ |
D | stdio.c | 44 int i; in __sfp() local 45 for (i = 0; i < SPE_FOPEN_MAX; i++) { in __sfp() 46 if (!__fp[i]._fp) { in __sfp() 47 return &__fp[i]; in __sfp() 57 int i; in __cleanup() local 58 for (i = 0; i < SPE_FOPEN_MAX; i++) { in __cleanup() 59 if (__fp[i]._fp) { in __cleanup() 60 fclose(&__fp[i]); in __cleanup()
|
/picolibc-3.7.0-3.6.0/newlib/libc/argz/ |
D | buf_findstr.c | 19 size_t i = 0; in _buf_findstr() local 22 for (i = 0; i < *buf_len; i++) in _buf_findstr() 24 if (str[0] == (*buf)[i]) in _buf_findstr() 26 j = i; in _buf_findstr() 27 while (str[j - i] && (str[j - i] == (*buf)[j])) j++; in _buf_findstr() 28 if(str[j - i] == '\0') in _buf_findstr() 37 if (i == *buf_len) in _buf_findstr()
|