Compare commits

..

No commits in common. "fdc1923211171debfc65fb7670950e2914091bbe" and "eadf7cde629cfc80d4a23cdf4f826abd48220704" have entirely different histories.

5 changed files with 2 additions and 40 deletions

View File

@ -15,8 +15,6 @@ section .text
syscall_failed:
push rbx
neg rax
mov rbx, rax
@ -24,7 +22,4 @@ section .text
mov [rax], rbx
mov rax, -1
pop rbx
ret

View File

@ -2,8 +2,6 @@ section .text
global ft_strcmp
ft_strcmp:
push rbx
xor rcx, rcx
loop:
@ -22,7 +20,4 @@ section .text
out:
sub bl, dl
movsx rax, bl
pop rbx
ret

View File

@ -5,8 +5,6 @@ extern ft_strcpy
section .text
global ft_strdup
ft_strdup:
push rbx
call ft_strlen
mov rbx, rdi
@ -22,13 +20,8 @@ section .text
call ft_strcpy
pop rbx
ret
error:
xor rax, rax
pop rbx
ret

View File

@ -14,15 +14,10 @@ section .text
syscall_failed:
push rbx
neg rax
mov rbx, rax
call __errno_location wrt ..plt
mov [rax], rbx
mov rax, -1
pop rbx
ret

View File

@ -163,19 +163,6 @@ void multiple_test_push_front()
}
}
void multiple_test_strdup(const char * const *values)
{
char *tmp;
for (size_t i = 0; values[i] != NULL; i++)
{
tmp = ft_strdup(values[i]);
test_str(tmp, values[i]);
free(tmp);
printf("\n");
}
}
int main()
{
printf("STRLEN\n");
@ -193,11 +180,8 @@ int main()
multiple_test_strcpy(ft_strcpy, strcpy_tests);
printf("\n");
printf("STRDUP\n");
const char *strdup_tests[] = {"yo", "", "bonjour", "co\0fgf", NULL};
multiple_test_strdup(strdup_tests);
printf("\n");
ft_write(1, "bozo\n", 5);
printf("%s\n", ft_strdup("sdsfsd"));
/*
printf("ATOI_BASE\n");
const char *atoi_base_tests[][2] = {{"0123", ""}, {"0123", "0"}, {"0123", "0123456789"}, {"bonjour", "bonjour"}, {"", ""}, {"bonjour", "salut"}, {"co\0fgf", "co\0fgf"}, NULL};