diff --git a/c02/ex00/ft_strcpy_test.c b/c02/ex00/ft_strcpy_test.c index 968acad..e8a9356 100644 --- a/c02/ex00/ft_strcpy_test.c +++ b/c02/ex00/ft_strcpy_test.c @@ -7,11 +7,13 @@ int main(void) int arrlen = 4; char *teststrings[] = {"", "h", "he", "hey"}; char buf[BUFSIZE] = STR; + char *return_val; for (int j = 0; j < arrlen; ++j) { printf("####### dest = '|' * 10, src == '%s' #######\n", teststrings[j]); - ft_strcpy(buf, teststrings[j]); + return_val = ft_strcpy(buf, teststrings[j]); + printf("RetVal: %s\n", return_val); for (int i = 0; i < BUFSIZE; ++i) printf((buf[i] >= 32 && buf[i] <= 126) ? "%c\n" : "0x%x\n", buf[i]); } diff --git a/c02/ex00/ft_strcpy_test.c.tmp b/c02/ex00/ft_strcpy_test.c.tmp index 968acad..e8a9356 100644 --- a/c02/ex00/ft_strcpy_test.c.tmp +++ b/c02/ex00/ft_strcpy_test.c.tmp @@ -7,11 +7,13 @@ int main(void) int arrlen = 4; char *teststrings[] = {"", "h", "he", "hey"}; char buf[BUFSIZE] = STR; + char *return_val; for (int j = 0; j < arrlen; ++j) { printf("####### dest = '|' * 10, src == '%s' #######\n", teststrings[j]); - ft_strcpy(buf, teststrings[j]); + return_val = ft_strcpy(buf, teststrings[j]); + printf("RetVal: %s\n", return_val); for (int i = 0; i < BUFSIZE; ++i) printf((buf[i] >= 32 && buf[i] <= 126) ? "%c\n" : "0x%x\n", buf[i]); }