Latest fix. Project finish
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/17 12:26:23 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/21 15:48:29 by dgaillet ### ########lyon.fr */
|
||||
/* Updated: 2025/11/21 17:08:15 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -15,14 +15,18 @@
|
||||
|
||||
static int padding_size(int space, int plus, t_arg *arg, int nbr)
|
||||
{
|
||||
int padding;
|
||||
int nbr_size;
|
||||
int padding;
|
||||
int nbr_size;
|
||||
unsigned int temp;
|
||||
|
||||
if (arg->padding < 0)
|
||||
return (0);
|
||||
padding = arg->padding - space - plus;
|
||||
if (nbr < 0)
|
||||
nbr_size = nbr_size_base(nbr * -1, 10);
|
||||
{
|
||||
temp = nbr * -1;
|
||||
nbr_size = nbr_size_base(temp, 10);
|
||||
}
|
||||
else
|
||||
nbr_size = nbr_size_base(nbr, 10);
|
||||
if (arg->dot > nbr_size || (arg->dot == 0 && !nbr))
|
||||
|
||||
22
test.c
22
test.c
@@ -1,22 +0,0 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/20 16:11:53 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/21 15:54:15 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ft_printf_bonus.h"
|
||||
#include <limits.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("===\t-\t===\n\n");
|
||||
printf("%d - ", printf("...%p...%p...\n", 0, 0));
|
||||
printf("%d\n\n", ft_printf("...%p...%p...\n", 0, 0));
|
||||
}
|
||||
Reference in New Issue
Block a user