Files
ft_printf/libftprintf/ft_va_hexadecimal_bonus.c

27 lines
1.1 KiB
C
Raw Normal View History

2022-04-13 08:01:46 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
2022-04-29 15:18:54 +02:00
/* ft_va_hexadecimal_bonus.c :+: :+: :+: */
2022-04-13 08:01:46 +02:00
/* +:+ +:+ +:+ */
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 11:55:33 by gbaconni #+# #+# */
2022-04-29 15:18:54 +02:00
/* Updated: 2022/04/29 14:41:30 by gbaconni ### ########.fr */
2022-04-13 08:01:46 +02:00
/* */
/* ************************************************************************** */
#include "libftprintf.h"
2022-04-29 15:18:54 +02:00
int ft_va_hexadecimal_bonus(const char *format, va_list ap, char *s)
2022-04-13 08:01:46 +02:00
{
2022-04-29 15:18:54 +02:00
int ret;
int flags;
2022-04-29 15:18:54 +02:00
(void) s;
2022-04-26 17:53:39 +02:00
ret = 0;
2022-04-29 15:18:54 +02:00
flags = ft_va_flags_bonus(format, ap);
if (flags & F_HASH)
2022-04-26 17:53:39 +02:00
ret += ft_puts("0x");
return (ret);
2022-04-13 08:01:46 +02:00
}