/string/ |
A D | test-stpncpy.c | 28 # define CHAR char macro 35 # define CHAR wchar_t macro 42 CHAR *SIMPLE_STPNCPY (CHAR *, const CHAR *, size_t); 43 CHAR *STUPID_STPNCPY (CHAR *, const CHAR *, size_t); 49 CHAR * 50 SIMPLE_STPNCPY (CHAR *dst, const CHAR *src, size_t n) in SIMPLE_STPNCPY() 64 CHAR * 65 STUPID_STPNCPY (CHAR *dst, const CHAR *src, size_t n) in STUPID_STPNCPY() 77 #undef CHAR
|
A D | test-strcspn.c | 31 # define CHAR char macro 38 # define CHAR wchar_t macro 44 typedef size_t (*proto_t) (const CHAR *, const CHAR *); 45 size_t SIMPLE_STRCSPN (const CHAR *, const CHAR *); 46 size_t STUPID_STRCSPN (const CHAR *, const CHAR *); 53 SIMPLE_STRCSPN (const CHAR *s, const CHAR *rej) in SIMPLE_STRCSPN() 55 const CHAR *r, *str = s; in SIMPLE_STRCSPN() 56 CHAR c; in SIMPLE_STRCSPN() 66 STUPID_STRCSPN (const CHAR *s, const CHAR *rej) in STUPID_STRCSPN() 78 #undef CHAR
|
A D | test-stpcpy.c | 28 # define CHAR char macro 33 # define CHAR wchar_t macro 38 CHAR *SIMPLE_STPCPY (CHAR *, const CHAR *); 43 CHAR * 44 SIMPLE_STPCPY (CHAR *dst, const CHAR *src) in SIMPLE_STPCPY() 50 #undef CHAR
|
A D | test-strlen.c | 29 # define CHAR char macro 34 # define CHAR wchar_t macro 38 typedef size_t (*proto_t) (const CHAR *); 41 simple_STRLEN (const CHAR *s) in simple_STRLEN() 43 const CHAR *p; in simple_STRLEN() 51 builtin_strlen (const CHAR *p) in builtin_strlen() 84 CHAR *buf = (CHAR *) (buf1); in do_test() 98 CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof (CHAR)); in do_random_tests() 149 do_test (sizeof (CHAR) * i, i); in test_main() 156 do_test (sizeof (CHAR) * 7, 1 << i); in test_main() [all …]
|
A D | test-strpbrk.c | 20 # define CHAR char macro 58 typedef CHAR *(*proto_t) (const CHAR *, const CHAR *); 59 CHAR *SIMPLE_STRPBRK (const CHAR *, const CHAR *); 60 CHAR *STUPID_STRPBRK (const CHAR *, const CHAR *); 66 CHAR * 67 SIMPLE_STRPBRK (const CHAR *s, const CHAR *rej) in SIMPLE_STRPBRK() 69 const CHAR *r; in SIMPLE_STRPBRK() 70 CHAR c; in SIMPLE_STRPBRK() 79 CHAR * 80 STUPID_STRPBRK (const CHAR *s, const CHAR *rej) in STUPID_STRPBRK() [all …]
|
A D | test-strchr.c | 44 # define CHAR char macro 60 # define CHAR wchar_t macro 75 typedef CHAR *(*proto_t) (const CHAR *, int); 77 CHAR * 83 return (CHAR *) s; in simple_STRCHR() 86 CHAR * 102 check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res) in check_result() 116 do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res) in do_one_test() 129 CHAR *result; in do_test() 130 CHAR *buf = (CHAR *) buf1; in do_test() [all …]
|
A D | test-strrchr.c | 31 # define CHAR wchar_t macro 38 # define CHAR char macro 44 typedef CHAR *(*proto_t) (const CHAR *, int); 45 CHAR *SIMPLE_STRRCHR (const CHAR *, int); 50 CHAR * 53 const CHAR *ret = NULL; in SIMPLE_STRRCHR() 56 if (*s == (CHAR) c) in SIMPLE_STRRCHR() 63 do_one_test (impl_t *impl, const CHAR *s, int c, CHAR *exp_res) in do_one_test() 82 CHAR *result; in do_test() 83 CHAR *buf = (CHAR *) buf1; in do_test() [all …]
|
A D | test-strncpy.c | 29 # define CHAR char macro 58 CHAR *SIMPLE_STRNCPY (CHAR *, const CHAR *, size_t); 59 CHAR *STUPID_STRNCPY (CHAR *, const CHAR *, size_t); 65 CHAR * 66 SIMPLE_STRNCPY (CHAR *dst, const CHAR *src, size_t n) in SIMPLE_STRNCPY() 68 CHAR *ret = dst; in SIMPLE_STRNCPY() 79 CHAR * 80 STUPID_STRNCPY (CHAR *dst, const CHAR *src, size_t n) in STUPID_STRNCPY() 93 typedef CHAR *(*proto_t) (CHAR *, const CHAR *, size_t); 131 CHAR *s1, *s2; in do_test() [all …]
|
A D | test-strcpy.c | 21 # define CHAR wchar_t macro 30 # define CHAR char macro 57 CHAR *SIMPLE_STRCPY (CHAR *, const CHAR *); 62 CHAR * 63 SIMPLE_STRCPY (CHAR *dst, const CHAR *src) in SIMPLE_STRCPY() 65 CHAR *ret = dst; in SIMPLE_STRCPY() 71 typedef CHAR *(*proto_t) (CHAR *, const CHAR *); 74 do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, in do_one_test() 99 CHAR *s1, *s2; in do_test() 111 s1 = (CHAR *) (buf1) + align1; in do_test() [all …]
|
A D | test-strnlen.c | 30 # define CHAR char macro 38 # define CHAR wchar_t macro 44 typedef size_t (*proto_t) (const CHAR *, size_t); 45 size_t SIMPLE_STRNLEN (const CHAR *, size_t); 51 SIMPLE_STRNLEN (const CHAR *s, size_t maxlen) in SIMPLE_STRNLEN() 78 if ((align + len) * sizeof (CHAR) >= page_size) in do_test() 81 CHAR *buf = (CHAR *) (buf1); in do_test() 131 CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof (CHAR)); in do_random_tests() 192 CHAR *s = (CHAR *) buf2; in do_page_tests() 243 size_t last_offset = page_size / sizeof (CHAR); in do_page_2_tests() [all …]
|
A D | test-strspn.c | 29 # define CHAR char macro 40 # define CHAR wchar_t macro 50 typedef size_t (*proto_t) (const CHAR *, const CHAR *); 51 size_t SIMPLE_STRSPN (const CHAR *, const CHAR *); 52 size_t STUPID_STRSPN (const CHAR *, const CHAR *); 59 SIMPLE_STRSPN (const CHAR *s, const CHAR *acc) in SIMPLE_STRSPN() 62 CHAR c; in SIMPLE_STRSPN() 76 STUPID_STRSPN (const CHAR *s, const CHAR *acc) in STUPID_STRSPN() 93 do_one_test (impl_t *impl, const CHAR *s, const CHAR *acc, size_t exp_res) in do_one_test() 109 CHAR *acc, *s; in do_test() [all …]
|
A D | test-memchr.c | 31 # define CHAR char macro 39 # define CHAR wchar_t macro 46 typedef CHAR *(*proto_t) (const CHAR *, int, size_t); 47 CHAR *SIMPLE_MEMCHR (const CHAR *, int, size_t); 52 CHAR * 56 if (*s++ == (CHAR) c) in SIMPLE_MEMCHR() 57 return (CHAR *) s - 1; in SIMPLE_MEMCHR() 62 do_one_test (impl_t *impl, const CHAR *s, int c, size_t n, CHAR *exp_res) in do_one_test() 78 CHAR *result; in do_test() 83 CHAR *buf = (CHAR *) (buf1); in do_test() [all …]
|
A D | test-strcat.c | 29 # define CHAR char macro 43 # define CHAR wchar_t macro 56 typedef CHAR *(*proto_t) (CHAR *, const CHAR *); 57 CHAR *SIMPLE_STRCAT (CHAR *, const CHAR *); 62 CHAR * 63 SIMPLE_STRCAT (CHAR *dst, const CHAR *src) in SIMPLE_STRCAT() 65 CHAR *ret = dst; in SIMPLE_STRCAT() 73 do_one_test (impl_t *impl, CHAR *dst, const CHAR *src) in do_one_test() 97 CHAR *s1, *s2; in do_test() 107 s1 = (CHAR *) (buf1) + align1; in do_test() [all …]
|
A D | test-strncmp.c | 46 simple_wcsncmp (const CHAR *s1, const CHAR *s2, size_t n) in simple_wcsncmp() 61 stupid_wcsncmp (const CHAR *s1, const CHAR *s2, size_t n) in stupid_wcsncmp() 87 # define CHAR char macro 118 typedef int (*proto_t) (const CHAR *, const CHAR *, size_t); 156 CHAR *s1, *s2; in do_test_limit() 207 CHAR *s1, *s2; in do_test() 247 CHAR *s1; in do_page_test() 363 CHAR *s1 = (CHAR *) (buf1 + 0xb2c); in check1() 364 CHAR *s2 = (CHAR *) (buf1 + 0xfd8); in check1() 413 CHAR *s1 = (CHAR *) (buf1 + (BUF1PAGES - 1) * page_size); in check3() [all …]
|
A D | test-memset.c | 38 # define CHAR char macro 46 # define CHAR wchar_t macro 53 CHAR *SIMPLE_MEMSET (CHAR *, int, size_t); 80 typedef CHAR *(*proto_t) (CHAR *, int, size_t); 98 CHAR * 102 CHAR *r = s, *end = s + n; in SIMPLE_MEMSET() 111 CHAR buf[n + 2]; in do_one_test() 112 CHAR *tstbuf = buf + 1; in do_one_test() 113 CHAR sentinel = c - 1; in do_one_test() 123 CHAR *res = CALL (impl, s, c, n); in do_one_test() [all …]
|
A D | test-strcmp.c | 96 # define CHAR char macro 131 typedef int (*proto_t) (const CHAR *, const CHAR *); 139 const CHAR *s1, const CHAR *s2, in check_result() 158 const CHAR *s1, const CHAR *s2, in do_one_test() 171 CHAR *s1, *s2; in do_test() 299 CHAR *s1 = (CHAR *) (buf1 + 0xb2c); in check() 300 CHAR *s2 = (CHAR *) (buf1 + 0xfd8); in check() 369 CHAR *s1 = (CHAR *) (buf1 + (BUF1PAGES - 1) * page_size); in check2() 370 CHAR *s2 = (CHAR *) (buf2 + (BUF1PAGES - 1) * page_size); in check2() 406 s1 = (CHAR *) (buffer1 + 0x8f8 / sizeof (CHAR)); in check3() [all …]
|
A D | test-strncat.c | 28 # define CHAR char macro 41 # define CHAR wchar_t macro 53 typedef CHAR *(*proto_t) (CHAR *, const CHAR *, size_t); 54 CHAR *STUPID_STRNCAT (CHAR *, const CHAR *, size_t); 55 CHAR *SIMPLE_STRNCAT (CHAR *, const CHAR *, size_t); 60 CHAR * 61 STUPID_STRNCAT (CHAR *dst, const CHAR *src, size_t n) in STUPID_STRNCAT() 63 CHAR *ret = dst; in STUPID_STRNCAT() 74 do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, size_t n) in do_one_test() 107 CHAR *s1, *s2; in do_test() [all …]
|
A D | test-memcmp.c | 36 # define CHAR wchar_t macro 63 # define CHAR char macro 86 typedef int (*proto_t) (const CHAR *, const CHAR *, size_t); 92 check_result (impl_t *impl, const CHAR *s1, const CHAR *s2, size_t len, in check_result() 108 do_one_test (impl_t *impl, const CHAR *s1, const CHAR *s2, size_t len, in do_one_test() 119 CHAR *s1, *s2; in do_test() 180 MEMCPY ((CHAR *) p2 + align2, (const CHAR *) p1 + align1, len); in do_random_tests() 183 MEMCPY ((CHAR *) p2 + align2, (const CHAR *) p1 + align1, pos); in do_random_tests() 199 r = CALL (impl, (CHAR *) p1 + align1, (const CHAR *) p2 + align2, in do_random_tests() 473 CHAR *s1 = (CHAR *) buf1 + max_length - length; in check2() [all …]
|
A D | stratcliff.c | 32 #ifndef CHAR 34 # define CHAR char macro 61 size_t nchars = size / sizeof (CHAR); in do_test() 62 CHAR *adr; in do_test() 63 CHAR *dest; in do_test() 66 adr = (CHAR *) mmap (NULL, 3 * size, PROT_READ | PROT_WRITE, in do_test() 170 CHAR *cp = STRCHR (&adr[outer], L('V')); in do_test() 209 CHAR *cp = STRRCHR (&adr[outer], L('V')); in do_test() 236 CHAR *cp = MEMCHR (&adr[outer], L('V'), 3 * size); in do_test() 252 CHAR *cp = MEMCHR (&adr[outer], L('V'), nchars - outer); in do_test() [all …]
|