Compare commits
No commits in common. "bdf52892a0e626bcb69498f1440c21b9207851f5" and "4592bbeec076a9fec3b36ecde8355d8d00060c7e" have entirely different histories.
bdf52892a0
...
4592bbeec0
4
Makefile
4
Makefile
@ -6,7 +6,7 @@
|
|||||||
# By: achubuko <marvin@42.fr> +#+ +:+ +#+ #
|
# By: achubuko <marvin@42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/12/02 21:33:22 by achubuko #+# #+# #
|
# Created: 2023/12/02 21:33:22 by achubuko #+# #+# #
|
||||||
# Updated: 2023/12/02 23:31:19 by achubuko ### ########.fr #
|
# Updated: 2023/12/02 21:48:05 by achubuko ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -45,4 +45,4 @@ ofiles = $(foreach f, $(cfiles), $(subst .c,.o,$f))
|
|||||||
%.o: %.c %.h
|
%.o: %.c %.h
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
$(NAME): $(ofiles)
|
$(NAME): $(ofiles)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $(LOADLIBES) $(LDLIBS) $@ $^
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* ::: :::::::: */
|
|
||||||
/* digits_to_words.c :+: :+: :+: */
|
|
||||||
/* +:+ +:+ +:+ */
|
|
||||||
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
|
||||||
/* +#+#+#+#+#+ +#+ */
|
|
||||||
/* Created: 2023/12/02 23:40:54 by achubuko #+# #+# */
|
|
||||||
/* Updated: 2023/12/02 23:43:18 by achubuko ### ########.fr */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
#include "digits_to_words.h"
|
|
@ -1,14 +0,0 @@
|
|||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* ::: :::::::: */
|
|
||||||
/* digits_to_words.h :+: :+: :+: */
|
|
||||||
/* +:+ +:+ +:+ */
|
|
||||||
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
|
||||||
/* +#+#+#+#+#+ +#+ */
|
|
||||||
/* Created: 2023/12/02 23:35:43 by achubuko #+# #+# */
|
|
||||||
/* Updated: 2023/12/02 23:36:29 by achubuko ### ########.fr */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
#ifndef DIGITS_TO_WORDS_H
|
|
||||||
# define DIGITS_TO_WORDS_H
|
|
||||||
#endif
|
|
@ -6,7 +6,7 @@
|
|||||||
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/12/02 21:56:30 by achubuko #+# #+# */
|
/* Created: 2023/12/02 21:56:30 by achubuko #+# #+# */
|
||||||
/* Updated: 2023/12/02 23:45:23 by achubuko ### ########.fr */
|
/* Updated: 2023/12/02 22:41:05 by achubuko ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
#include "ft_utils.h"
|
#include "ft_utils.h"
|
||||||
@ -15,13 +15,3 @@ uint32_t ft_atoui32(char *str)
|
|||||||
{
|
{
|
||||||
return (*str - '0');
|
return (*str - '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ft_strlen(char *s)
|
|
||||||
{
|
|
||||||
size_t l;
|
|
||||||
|
|
||||||
l = 0;
|
|
||||||
while (*s++)
|
|
||||||
l++;
|
|
||||||
return (l);
|
|
||||||
}
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/12/02 21:01:21 by achubuko #+# #+# */
|
/* Created: 2023/12/02 21:01:21 by achubuko #+# #+# */
|
||||||
/* Updated: 2023/12/02 23:45:57 by achubuko ### ########.fr */
|
/* Updated: 2023/12/02 21:55:21 by achubuko ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
@ -18,5 +18,5 @@ int main(int argc, char **argv)
|
|||||||
write(1, "Error: program requires 1 or 2 arguments passed!", 48);
|
write(1, "Error: program requires 1 or 2 arguments passed!", 48);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
write(1, argv[1], ft_strlen(argv[1]));
|
write(1, argv[1], 1);
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,12 @@
|
|||||||
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/12/02 21:14:25 by achubuko #+# #+# */
|
/* Created: 2023/12/02 21:14:25 by achubuko #+# #+# */
|
||||||
/* Updated: 2023/12/02 23:43:11 by achubuko ### ########.fr */
|
/* Updated: 2023/12/02 21:25:18 by achubuko ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
#ifndef MAIN_H
|
#ifndef MAIN_H
|
||||||
# define MAIN_H
|
# define MAIN_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include "digits_to_words.h"
|
|
||||||
# include "ft_utils.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
2
tests/.gitignore
vendored
2
tests/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
/test_*
|
|
||||||
!test_*.c
|
|
@ -6,7 +6,7 @@
|
|||||||
# By: achubuko <marvin@42.fr> +#+ +:+ +#+ #
|
# By: achubuko <marvin@42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/12/02 22:04:03 by achubuko #+# #+# #
|
# Created: 2023/12/02 22:04:03 by achubuko #+# #+# #
|
||||||
# Updated: 2023/12/02 23:31:12 by achubuko ### ########.fr #
|
# Updated: 2023/12/02 23:06:56 by achubuko ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
NAME := test_ft_utils
|
NAME := test_ft_utils
|
||||||
|
BIN
tests/test_ft_utils
Executable file
BIN
tests/test_ft_utils
Executable file
Binary file not shown.
Reference in New Issue
Block a user