aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-11-13 09:30:24 +0100
committerCharles <sircharlesaze@gmail.com>2019-11-13 09:30:24 +0100
commit80f5c6a1cef114cd5006431149506bb5d87403b6 (patch)
tree8462dbd3c0421755b84892a69102ecaef2c94fea
parent3f2ef05278d42233f0a9ee9652e152824a7103e4 (diff)
downloadft_printf-80f5c6a1cef114cd5006431149506bb5d87403b6.tar.gz
ft_printf-80f5c6a1cef114cd5006431149506bb5d87403b6.tar.bz2
ft_printf-80f5c6a1cef114cd5006431149506bb5d87403b6.zip
Removed double, normed
-rw-r--r--Makefile6
-rw-r--r--header.h4
-rw-r--r--main.c14
-rw-r--r--printer.c4
-rwxr-xr-xtestbin28784 -> 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 <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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
--- a/test
+++ b/test
Binary files differ