отлично работает либвт мейк и подрубил работу мейка принтфа
This commit is contained in:
parent
ed3949df74
commit
fde85d4712
@ -0,0 +1,53 @@
|
||||
.PHONY: all clean fclean re
|
||||
|
||||
LIBFT = libft.a
|
||||
|
||||
NAME = libftprintf.a
|
||||
|
||||
SRCS = ft_printf.c ft_parser.c ft_parser_utils.c \
|
||||
ft_put_c.c ft_put_d.c ft_put_d_utilc.c \
|
||||
ft_put_p.c ft_put_s.c ft_put_u.c ft_put_x.c \
|
||||
ft_put_u_included.c ft_put_u_utilc.c \
|
||||
ft_put_x_included.c ft_put_x_utilc.c \
|
||||
ft_put_p_included.c ft_put_p_utilc.c \
|
||||
putmaket_utils.c ft_put_d_undersize.c
|
||||
|
||||
OBJ_DIR = ./obj/
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -Wall -Wextra -Werror
|
||||
|
||||
OBJS = $(SRCS:%.c=%.o)
|
||||
|
||||
OBJS_FILES = $(addprefix $(OBJ_DIR), $(OBJS))
|
||||
|
||||
PATH_PUT_UTILS = put_d put_p put_u put_x
|
||||
|
||||
PATH_MAKER = $(addprefix srcs/putchar_maker/, $(PATH_PUT_UTILS))
|
||||
|
||||
vpath %.c srcs srcs/parser srcs/putchar_maker $(PATH_MAKER)
|
||||
|
||||
vpath %.a ./libft
|
||||
|
||||
all : $(NAME)
|
||||
|
||||
$(NAME): $(LIBFT) $(OBJS_FILES)
|
||||
ar -rcs $(NAME) $(filter %.o, $^)
|
||||
|
||||
$(LIBFT): ./libft/src/*.c
|
||||
$(MAKE) all -C ./libft
|
||||
cp libft/libft.a $(NAME)
|
||||
|
||||
$(OBJ_DIR)%.o: %.c ft_printf.h
|
||||
$(CC) $(CFLAGS) -I. -c $< -o $@
|
||||
|
||||
clean :
|
||||
@$(MAKE) clean -C ./libft
|
||||
rm -rf $(OBJS_FILES)
|
||||
|
||||
fclean : clean
|
||||
make fclean -C ./libft
|
||||
rm -rf $(NAME)
|
||||
|
||||
re : fclean all
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/11/19 16:50:07 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 06:00:04 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:34:40 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
# define FT_PRINTF_H
|
||||
|
||||
# include <stdarg.h>
|
||||
# include "libft/libft.h"
|
||||
# include "libft/includes/libft.h"
|
||||
# include <stdlib.h>
|
||||
|
||||
typedef struct s_printf
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/11/19 16:46:57 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/14 21:59:53 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:33:52 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/11/23 18:47:42 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:50:42 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void szero(t_printf *params)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/11/25 13:33:20 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:48:22 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:04 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void printf_value(t_printf *list, int value)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/14 21:41:40 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
int ft_put_c(t_printf *list, va_list *name)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/14 21:55:46 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void print_hep(t_printf *list, long int value)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:30:38 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
int ft_prints(t_printf *list, char *value)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 00:57:51 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
int ft_put_u(t_printf *list, va_list *name)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 02:03:54 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void print_hex(unsigned int value, t_printf *list)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:21:31 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void d_iszero(t_printf *list, int value)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:22:28 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void d_isleft(t_printf *list, int value)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/15 17:12:10 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void for_diszero(t_printf *list, int value, int tmp, int c)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:55:32 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void p_isleft(t_printf *list, long int value)
|
||||
{
|
||||
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:26:52 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
int p_counter(t_printf *list, long int value)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:28:39 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void u_isleft(t_printf *list, unsigned int value)
|
||||
{
|
||||
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:29:15 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void for_uiszero(t_printf *list, unsigned int value, int tmp, unsigned int c)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:15:12 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void x_isleft(t_printf *list, unsigned int value)
|
||||
{
|
||||
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:30:04 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:36:14 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void for_xiszero(t_printf *list, unsigned int value, int tmp, unsigned int c)
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -6,11 +6,11 @@
|
||||
/* By: mdenys <mdenys@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2020/12/02 09:51:16 by mdenys #+# #+# */
|
||||
/* Updated: 2020/12/16 05:39:25 by mdenys ### ########.fr */
|
||||
/* Updated: 2021/01/11 18:35:27 by mdenys ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../ft_printf.h"
|
||||
#include "ft_printf.h"
|
||||
|
||||
void ft_putnbr_fd_count(t_printf *list, long int n, int fd)
|
||||
{
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user