diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-10-30 23:35:40 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-10-30 23:35:40 +0100 |
| commit | d63d6916249f5b40b81097854d8ca2c9d4d7d071 (patch) | |
| tree | b98fe6a060fdb632d00ddf9385f6579a32619f38 /convert_ptr.c | |
| parent | 22f334a19cabebf10727d7894102946ba23d0e37 (diff) | |
| download | ft_printf-d63d6916249f5b40b81097854d8ca2c9d4d7d071.tar.gz ft_printf-d63d6916249f5b40b81097854d8ca2c9d4d7d071.tar.bz2 ft_printf-d63d6916249f5b40b81097854d8ca2c9d4d7d071.zip | |
Normed converters
Diffstat (limited to 'convert_ptr.c')
| -rw-r--r-- | convert_ptr.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/convert_ptr.c b/convert_ptr.c index 2c288ac..aa24cb5 100644 --- a/convert_ptr.c +++ b/convert_ptr.c @@ -1,11 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* convert_ptr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/30 23:24:08 by cacharle #+# #+# */ +/* Updated: 2019/10/30 23:25:33 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include <stdarg.h> #include <stdlib.h> #include "header.h" char *convert_ptr(va_list ap, t_pformat *pformat) { - char *str = ITOA_HEX_LOW((long long unsigned int)va_arg(ap, void*)); + char *str; + str = ITOA_HEX_LOW((long long unsigned int)va_arg(ap, void*)); str = handle_precision(pformat, str); str = add_hex_prefix(str); str = handle_padding(pformat, str); |
