[go: nahoru, domu]

Skip to content

Commit

Permalink
some precision correction
Browse files Browse the repository at this point in the history
  • Loading branch information
bnidia committed May 21, 2022
1 parent 9209e6f commit d928a98
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 120 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: bnidia <bnidia@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/10/25 19:16:59 by bnidia #+# #+# #
# Updated: 2022/05/21 05:07:52 by bnidia ### ########.fr #
# Updated: 2021/10/26 16:05:02 by bnidia ### ########.fr #
# #
# **************************************************************************** #

Expand All @@ -23,7 +23,7 @@ SRC += ft_itoa_base.c ft_printf_common_functions.c
OBJ = $(addprefix $(OBJDIR), $(notdir $(SRC:.c=.o)))
D_FILES = $(addprefix $(OBJDIR), $(notdir$(SRC:.c=.d)))
HEADER = ft_printf.h
#

CC = gcc -Werror -Wall -Wextra
DEBUG_SWITCH = TRUE
ifeq ($(DEBUG_SWITCH), TRUE)
Expand Down Expand Up @@ -65,9 +65,12 @@ test:

test1:
echo "paulo-santana/ft_printf_tester"
git clone https://github.com/paulo-santana/ft_printf_tester.git
git clone https://github.com/rustem-spb/ft_printf_tester.git
# git clone https://github.com/paulo-santana/ft_printf_tester.git
bash -c "cd ft_printf_tester && sh test"
rm -rf ft_printf_tester
test11:
bash -c "cd ft_printf_tester && sh test"

test2:
echo "Tripouille/printfTester"
Expand Down
4 changes: 2 additions & 2 deletions ft_printf_common_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/* ::: :::::::: */
/* ft_printf_common_functions.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bnidia <bnidia@student.42.fr> +#+ +:+ +#+ */
/* By: bnidia <bnidia@student.21-school.ru> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 08:42:42 by bnidia #+# #+# */
/* Updated: 2022/05/21 05:02:51 by bnidia ### ########.fr */
/* Updated: 2022/04/09 10:17:11 by bnidia ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down
4 changes: 2 additions & 2 deletions ft_printf_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ int ft_s(t_pf *z, const char *str)
return (0);
}
strlen = (int)ft_strlen(str);
if (z->precision == 0)
strlen = 0;
if (z->precision != -1 && z->precision < strlen)
strlen = z->precision;
output_of_initial_spaces(z, strlen, 0);
if (z->precision > strlen || z->precision == -1)
z->precision = strlen;
Expand Down
113 changes: 0 additions & 113 deletions ft_printf_utils.c

This file was deleted.

0 comments on commit d928a98

Please sign in to comment.