finito
This commit is contained in:
parent
1822beefff
commit
cca279bf26
4
Makefile
4
Makefile
|
@ -6,14 +6,14 @@
|
||||||
# By: erey-bet <marvin@42.fr> +#+ +:+ +#+ #
|
# By: erey-bet <marvin@42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2022/09/27 04:19:30 by erey-bet #+# #+# #
|
# Created: 2022/09/27 04:19:30 by erey-bet #+# #+# #
|
||||||
# Updated: 2022/10/15 15:39:56 by erey-bet ### ########.fr #
|
# Updated: 2022/11/22 21:00:41 by erey-bet ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
SRCS = ft_get_size.c ft_power.c ft_printf.c ft_putchar.c ft_putnbr.c \
|
SRCS = ft_get_size.c ft_power.c ft_printf.c ft_putchar.c ft_putnbr.c \
|
||||||
ft_putnbrhex.c ft_putnbrhex_upper.c ft_putstr.c ft_putunbr.c ft_putvd.c
|
ft_putnbrhex.c ft_putnbrhex_upper.c ft_putstr.c ft_putunbr.c ft_putvd.c
|
||||||
OBJS = ${SRCS:.c=.o}
|
OBJS = ${SRCS:.c=.o}
|
||||||
CC = gcc
|
CC = clang
|
||||||
CFLAGS = -Wall -Wextra -Werror
|
CFLAGS = -Wall -Wextra -Werror
|
||||||
NAME = libftprintf.a
|
NAME = libftprintf.a
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2022/10/05 10:22:16 by erey-bet #+# #+# */
|
/* Created: 2022/10/05 10:22:16 by erey-bet #+# #+# */
|
||||||
/* Updated: 2022/10/10 22:49:10 by erey-bet ### ########.fr */
|
/* Updated: 2022/11/22 21:08:14 by erey-bet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ int ft_putnbr(int n)
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
nl = n;
|
nl = n;
|
||||||
nl *= (n > 0) - (n < 0);
|
if (nl < 0)
|
||||||
|
nl *= nl - 1;
|
||||||
len = ft_get_size(nl);
|
len = ft_get_size(nl);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue