aboutsummaryrefslogtreecommitdiff
path: root/printer.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-10-30 04:58:00 +0100
committerCharles <sircharlesaze@gmail.com>2019-10-30 04:58:00 +0100
commit001786c8ec464b1ae3e6321acfd984227cb1bbee (patch)
tree6c71dd227eb8a8c28cd529cb4cfc31879e845831 /printer.c
parentd963161275bcb3af4097872ba033da3ff9255606 (diff)
downloadft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.tar.gz
ft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.tar.bz2
ft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.zip
Added flags for x and X
Diffstat (limited to 'printer.c')
-rw-r--r--printer.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/printer.c b/printer.c
index 34cbd07..a4da1a1 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/10/30 00:56:05 by cacharle ### ########.fr */
+/* Updated: 2019/10/30 04:13:18 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -89,24 +89,24 @@ char *handle_padding(t_pformat *pformat, char *str)
return (tmp);
}
-char *handle_nbr_padding(t_pformat *pformat, char *str)
-{
- char *tmp;
- int len = ft_strlen(str);
- int i;
-
- if (!(IN_STR("+-", str[0]) && pformat->flags & FLAG_ZERO_PADDING))
- return (str);
- tmp[0] = str[0];
- len--;
- i = 1;
- while (i < pformat->min_width - len)
- tmp[i++] = '0';
- ft_strcpy(tmp + i , str + 1);
- ft_strcpy(str, tmp);
- free(tmp);
- return (str);
-}
+/* char *handle_nbr_padding(t_pformat *pformat, char *str) */
+/* { */
+/* char *tmp; */
+/* int len = ft_strlen(str); */
+/* int i; */
+/* */
+/* if (!(IN_STR("+-", str[0]) && pformat->flags & FLAG_ZERO_PADDING)) */
+/* return (str); */
+/* tmp[0] = str[0]; */
+/* len--; */
+/* i = 1; */
+/* while (i < pformat->min_width - len) */
+/* tmp[i++] = '0'; */
+/* ft_strcpy(tmp + i , str + 1); */
+/* ft_strcpy(str, tmp); */
+/* free(tmp); */
+/* return (str); */
+/* } */
char *handle_precision(t_pformat *pformat, char *str)
{