overtime
This commit is contained in:
parent
b5efa9ea07
commit
1d9fc70142
6
Makefile
6
Makefile
@ -6,12 +6,12 @@
|
|||||||
# 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/03 17:29:02 by achubuko ### ########.fr #
|
# Updated: 2023/12/07 19:30:21 by achubuko ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
NAME=rush-02
|
NAME=rush-02
|
||||||
_CFLAGS = -Wall -Wextra -Werror
|
_CFLAGS = -Wall -Wextra -fsanitize=address
|
||||||
CFLAGS = -g
|
CFLAGS = -g
|
||||||
CFLAGS := $(_CFLAGS) $(CFLAGS)
|
CFLAGS := $(_CFLAGS) $(CFLAGS)
|
||||||
#####################################
|
#####################################
|
||||||
@ -20,7 +20,7 @@ CFLAGS := $(_CFLAGS) $(CFLAGS)
|
|||||||
|
|
||||||
# all: default rule
|
# all: default rule
|
||||||
# norme prerequisite is not mandatory
|
# norme prerequisite is not mandatory
|
||||||
all: $(NAME) norme
|
all: $(NAME)
|
||||||
|
|
||||||
# clean: Delete *.o for project and libraries
|
# clean: Delete *.o for project and libraries
|
||||||
clean:
|
clean:
|
||||||
|
@ -13,4 +13,5 @@
|
|||||||
|
|
||||||
void print_digit_words(char *str)
|
void print_digit_words(char *str)
|
||||||
{
|
{
|
||||||
|
///TODO:
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
/* Updated: 2023/12/03 23:36:29 by achubuko ### ########.fr */
|
/* Updated: 2023/12/03 23:36:29 by achubuko ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "ft_open.h"
|
#include "ft_open.h"
|
||||||
|
|
||||||
t_file *ft_open(char *path)
|
t_file *ft_open(char *path)
|
||||||
@ -45,7 +46,7 @@ void ft_growbuffer(t_file *f, ssize_t grow)
|
|||||||
cur[pos] = 0;
|
cur[pos] = 0;
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
free(prev);
|
// free(prev);
|
||||||
f->buffer = cur;
|
f->buffer = cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,13 @@ int main(int argc, char **argv)
|
|||||||
if (argc == 3)
|
if (argc == 3)
|
||||||
dict_update(d, argv[2]);
|
dict_update(d, argv[2]);
|
||||||
chk = invalid_arg_num(argv[1]);
|
chk = invalid_arg_num(argv[1]);
|
||||||
|
|
||||||
|
t_file *file = ft_open(argv[1]);
|
||||||
|
|
||||||
|
ft_buffer_line(file);
|
||||||
|
|
||||||
|
printf("%s\n", file->buffer);
|
||||||
|
|
||||||
if (!chk)
|
if (!chk)
|
||||||
print_digit_words(argv[1]);
|
print_digit_words(argv[1]);
|
||||||
else
|
else
|
||||||
|
@ -16,4 +16,6 @@
|
|||||||
# include "digits_to_words.h"
|
# include "digits_to_words.h"
|
||||||
# include "ft_utils.h"
|
# include "ft_utils.h"
|
||||||
# include "dict_struct.h"
|
# include "dict_struct.h"
|
||||||
|
#include "ft_open.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user