From 80f5c6a1cef114cd5006431149506bb5d87403b6 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 13 Nov 2019 09:30:24 +0100 Subject: Removed double, normed --- Makefile | 6 +++--- header.h | 4 ++-- main.c | 14 +++++--------- printer.c | 4 +--- test | Bin 28784 -> 23144 bytes 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 9c7dbc1..68acda3 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,14 @@ # By: cacharle +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/10/28 17:41:14 by cacharle #+# #+# # -# Updated: 2019/11/09 01:06:42 by cacharle ### ########.fr # +# Updated: 2019/11/13 09:27:01 by cacharle ### ########.fr # # # # **************************************************************************** # LIBFT_ROOT = ./libft CC = gcc -CCFLAGS = -Wall -Wextra -g #-Werror +CCFLAGS = -Wall -Wextra -Werror LDFLAGS = -L. -lftprintf INCFLAGS = -I$(LIBFT_ROOT) @@ -25,7 +25,7 @@ NAME = libftprintf.a SRC = ft_printf.c utils.c printer.c parse.c list.c extract.c \ convert_int.c convert_uint.c convert_char.c convert_str.c \ convert_ptr.c convert_hex.c convert_percent.c convert_written.c \ - convert_none.c length_modifier.c parse_double.c convert_double.c + convert_none.c length_modifier.c OBJ = $(SRC:.c=.o) INCLUDE = header.h diff --git a/header.h b/header.h index e76884a..4110557 100644 --- a/header.h +++ b/header.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/29 00:06:46 by cacharle #+# #+# */ -/* Updated: 2019/11/13 08:57:56 by cacharle ### ########.fr */ +/* Updated: 2019/11/13 09:29:23 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -64,7 +64,7 @@ typedef struct s_flist t_pformat *content; } t_flist; -typedef struct +typedef struct s_printf_status { va_list ap; t_flist *flist; diff --git a/main.c b/main.c index bb0be59..e6e0031 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/28 04:25:09 by cacharle #+# #+# */ -/* Updated: 2019/11/13 08:50:26 by cacharle ### ########.fr */ +/* Updated: 2019/11/13 09:27:58 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -72,17 +72,13 @@ int main() ft_printf("left adjusted |%*d|\n", -5, 43); printf("left adjusted |%*d|\n", -5, 43); - ft_printf("overwrite |%*3d|\n", 5, 43); - printf("overwrite |%*3d|\n", 5, 43); - ft_printf("overwrite neg |%*-1d|\n", 0, 43); - printf("overwrite neg |%*-1d|\n", 0, 43); + /* ft_printf("overwrite |%*3d|\n", 5, 43); */ + /* printf("overwrite |%*3d|\n", 5, 43); */ + /* ft_printf("overwrite neg |%*-1d|\n", 0, 43); */ + /* printf("overwrite neg |%*-1d|\n", 0, 43); */ ft_printf("pointer field width |%15p|\n", &test); printf("pointer field width |%15p|\n", &test); - ft_printf("pointer precision |%.15p|\n", &test); - printf("pointer precision |%.15p|\n", &test); - ft_printf("pointer precision/width |%20.15p|\n", &test); - printf("pointer precision/width |%20.15p|\n", &test); ft_printf("bonjour%n", &test); printf("%d\n", test); diff --git a/printer.c b/printer.c index f4f80a0..0eab18b 100644 --- a/printer.c +++ b/printer.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/28 23:19:24 by cacharle #+# #+# */ -/* Updated: 2019/11/09 01:00:20 by cacharle ### ########.fr */ +/* Updated: 2019/11/13 09:28:35 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -59,8 +59,6 @@ char *convert_specifier(va_list ap, t_pformat *pformat) return (convert_percent(ap, pformat)); if (pformat->specifier == 'n') return (convert_written(ap, pformat)); - if (pformat->specifier == 'f') - return (convert_double(ap, pformat)); else return (convert_none(ap, pformat)); return (NULL); diff --git a/test b/test index 79835f6..473cbb5 100755 Binary files a/test and b/test differ -- cgit