Skip to content

Commit 665aa6e

Browse files
author
Sylvain FLINOIS
committed
add auteur + lib propre
1 parent 622c919 commit 665aa6e

24 files changed

+209
-296
lines changed

auteur

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sflinois

libft/Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# By: sflinois <[email protected]> +#+ +:+ +#+ #
77
# +#+#+#+#+#+ +#+ #
88
# Created: 2017/01/10 11:48:48 by sflinois #+# #+# #
9-
# Updated: 2017/03/25 14:15:19 by sflinois ### ########.fr #
9+
# Updated: 2017/04/29 16:05:00 by sflinois ### ########.fr #
1010
# #
1111
# **************************************************************************** #
1212

@@ -41,10 +41,10 @@ SRC_NAME = ft_btree_create_node.c ft_btree_apply_prefix.c \
4141
ft_strnew.c ft_strnstr.c ft_strrchr.c \
4242
ft_strsplit.c ft_strstr.c ft_strsub.c \
4343
ft_strtrim.c ft_tolower.c ft_toupper.c \
44-
ft_itoa_base.c ft_digit_to_char.c ft_litoa_base.c \
45-
ft_litoa.c ft_imttoa.c ft_imttoa_base.c \
44+
ft_itoa_base.c ft_digit_to_char.c \
45+
ft_imttoa.c ft_imttoa_base.c get_next_line.c \
4646
ft_retwchar.c ft_retwstr.c ft_retnwstr.c \
47-
get_next_line.c
47+
ft_mtxnew.c
4848

4949
S_PRINTF_PATH = $(SRC_PATH)/printf
5050
S_PRINTF_NAME = ft_printf.c fct_printf_type_args.c fct_expr.c \
@@ -53,7 +53,6 @@ S_PRINTF_NAME = ft_printf.c fct_printf_type_args.c fct_expr.c \
5353
fct_printf_length.c fct_printf_parsing.c \
5454

5555
OBJ_PATH = objs
56-
O_PRINTF_PATH = o_printf
5756
CPPFLAGS = -Iincludes
5857

5958
LDFLAGS = -Llibft
@@ -62,15 +61,15 @@ LDLIBS = -lft
6261
NAME = libft.a
6362

6463
CC = gcc
65-
CFLAGS = -Wall -Wextra -Werror -g
64+
CFLAGS = -Wall -Wextra -Werror
6665

6766
OBJ_NAME = $(SRC_NAME:.c=.o)
6867
O_PRINTF_NAME = $(S_PRINTF_NAME:.c=.o)
6968

7069
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
7170
OBJ = $(addprefix $(OBJ_PATH)/,$(OBJ_NAME))
7271
S_PRINTF = $(addprefix $(S_PRINTF_PATH)/,$(S_PRINTF_NAME))
73-
O_PRINTF = $(addprefix $(O_PRINTF_PATH)/,$(O_PRINTF_NAME))
72+
O_PRINTF = $(addprefix $(OBJ_PATH)/,$(O_PRINTF_NAME))
7473

7574
all: $(NAME)
7675

@@ -83,8 +82,8 @@ $(OBJ_PATH)/%.o: $(SRC_PATH)/%.c
8382
@mkdir $(OBJ_PATH) 2> /dev/null || true
8483
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
8584

86-
$(O_PRINTF_PATH)/%.o : $(S_PRINTF_PATH)/%.c
87-
@mkdir $(O_PRINTF_PATH) 2> /dev/null || true
85+
$(OBJ_PATH)/%.o : $(S_PRINTF_PATH)/%.c
86+
@mkdir $(O_BJ_PATH) 2> /dev/null || true
8887
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
8988

9089
clean:

libft/includes/ft_printf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
/* By: sflinois <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2017/01/10 15:24:30 by sflinois #+# #+# */
9-
/* Updated: 2017/03/25 17:11:22 by sflinois ### ########.fr */
9+
/* Updated: 2017/04/29 12:04:51 by sflinois ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

1313
#ifndef FT_PRINTF_H
1414
# define FT_PRINTF_H
1515

1616
# include <stdarg.h>
17-
# include <inttypes.h>
1817
# include <string.h>
18+
# include <inttypes.h>
1919

2020
/*
2121
** Binary flags for printf flags

libft/includes/get_next_line.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

libft/includes/libft.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
/* By: sflinois <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2016/11/15 11:22:10 by sflinois #+# #+# */
9-
/* Updated: 2017/03/26 15:29:18 by sflinois ### ########.fr */
9+
/* Updated: 2017/04/29 16:04:20 by sflinois ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

1313
#ifndef LIBFT_H
1414

1515
# define LIBFT_H
16-
# include "get_next_line.h"
17-
# include "ft_printf.h"
16+
# define BUFF_SIZE 32
17+
1818
# include <string.h>
1919
# include <inttypes.h>
2020
# include <wchar.h>
@@ -33,6 +33,13 @@ typedef struct s_btree
3333
void *item;
3434
} t_btree;
3535

36+
typedef struct s_matrix
37+
{
38+
int nb_line;
39+
int nb_col;
40+
int **m;
41+
} t_matrix;
42+
3643
int ft_atoi(const char *str);
3744
void ft_bzero(void *s, size_t n);
3845
int ft_isalpha(int c);
@@ -73,9 +80,11 @@ int ft_strequ(char const *s1, char const *s2);
7380
void ft_striter(char *s, void (*f)(char *));
7481
void ft_striteri(char *s, void (*f)(unsigned int, char *));
7582
char *ft_strjoin(char const *s1, char const *s2);
83+
char *ft_strjoin_free(char *s1, char *s2);
7684
size_t ft_strlcat(char *dst, const char *src, size_t size);
7785
size_t ft_strlen(const char *s);
7886
size_t ft_wstrlen(wchar_t *wstr);
87+
size_t ft_wcharlen(wchar_t wc);
7988
char *ft_strmap(char const *s, char (*f)(char));
8089
char *ft_strmapi(char const *s, char (*f)(unsigned int, char));
8190
char *ft_strncat(char *s1, const char *s2, size_t n);
@@ -120,5 +129,6 @@ char *ft_retwstr(wchar_t *wstr);
120129
char *ft_retnwstr(wchar_t *wstr, size_t size);
121130
int get_next_line(const int fd, char **line);
122131
int ft_printf(const char *format, ...);
132+
t_matrix *ft_mtxnew(int nb_rows, int nb_cols, int **tab);
123133

124134
#endif

libft/srcs/ft_atoi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: sflinois <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2016/11/08 11:25:19 by sflinois #+# #+# */
9-
/* Updated: 2017/03/25 15:40:02 by sflinois ### ########.fr */
9+
/* Updated: 2017/01/10 14:41:09 by sflinois ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

libft/srcs/ft_base2base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: sflinois <[email protected]> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2016/11/14 13:14:43 by sflinois #+# #+# */
9-
/* Updated: 2017/01/10 13:30:52 by sflinois ### ########.fr */
9+
/* Updated: 2017/04/29 12:47:16 by sflinois ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

libft/srcs/ft_ctoa.c

Lines changed: 0 additions & 43 deletions
This file was deleted.

libft/srcs/ft_ctoa_base.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

libft/srcs/ft_litoa.c

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)