diff options
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -11,7 +11,7 @@ int main(void) { fprintf(stderr,"\n"); { #undef arrsz -#define arrsz ((size_t)0x7) +#define arrsz ((size_t)0x8) uint64_t arr0[arrsz] = {0x0}; rgo_memfill(arr0,arrsz * sizeof (uint64_t),UINT8_C(0x0)); fprintf(stderr,"arr0[0]: %" PRIX64 "\n",arr0[(size_t)0x0]); @@ -65,7 +65,6 @@ int main(void) { #undef arrsz } fprintf(stderr,"\n"); -#if defined(__x86_64__) { char const * str0 = "Hello there! General Kenobi?"; fprintf(stderr,"str0: \"%s\"\n",str0); @@ -75,22 +74,26 @@ int main(void) { } fprintf(stderr,"\n"); { - char const * restrict str = "Oh my science!"; - size_t const len = rgo_strlen(str); - size_t pos0 = rgo_fndchr(str,' '); - size_t pos1 = rgo_fndbyte(str,len,(uint8_t)' '); + char const * restrict str = "Oh my science!"; + fprintf(stderr,"str: \"%s\"\n",str); + size_t len = rgo_strlen(str); + fprintf(stderr,"len: %zX\n",len); + size_t pos0 = rgo_fndchr(str,' '); + size_t pos1 = rgo_fndbyte(str,len,(uint8_t)' '); fprintf(stderr,"pos0: %zX\n",pos0); fprintf(stderr,"pos1: %zX\n",pos1); assert(pos0 == (size_t)0x2); assert(pos1 == pos0); str += pos0 + (size_t)0x1; + len = rgo_strlen(str); pos0 = rgo_fndchr(str,' '); pos1 = rgo_fndbyte(str,len,(uint8_t)' '); - fprintf(stderr,"pos0: zX\n",pos0); + fprintf(stderr,"pos0: %zX\n",pos0); fprintf(stderr,"pos1: %zX\n",pos1); assert(pos0 == (size_t)0x2); assert(pos1 == pos0); str += pos0 + (size_t)0x1; + len = rgo_strlen(str); pos0 = rgo_fndchr(str,' '); pos1 = rgo_fndbyte(str,len,(uint8_t)' '); fprintf(stderr,"pos0: %zX\n",pos0); @@ -99,6 +102,7 @@ int main(void) { assert(pos1 == pos0); } fprintf(stderr,"\n"); +#if defined(__x86_64__) { char const str0[] = "What's up, my guy?"; fprintf(stderr,"str0: \"%s\"\n",str0); |