| 1234567891011121314151617181920212223 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_puthex.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2017/05/01 17:08:27 by bchanot #+# #+# */
- /* Updated: 2017/05/01 17:14:54 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- void ft_puthex(unsigned char c, int maj)
- {
- char *hex;
- hex = ft_strdup(maj ? "0123456789ABCDEF" : "0123456789abcdef");
- ft_putchar(hex[c / 16]);
- ft_putchar(hex[c % 16]);
- ft_memdel((void **)&hex);
- }
|