From 31feb3fe3c5194f7ad5cd2fc62dd04e4156396ef Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Sun, 23 Oct 2022 19:01:50 +0200 Subject: [PATCH] final --- .ft_vsprintf.c.swp | Bin 0 -> 12288 bytes 42-printf-tester | 1 - Makefile | 33 +++++---- a.out | Bin 38600 -> 0 bytes ft_putendl_fd.c => ft_dprintX.c | 15 ++-- ft_dprintarg.c | 34 +++++++++ ft_vprintf.c => ft_dprintf.c | 11 +-- ft_dprintflag.c | 23 ++++++ ft_ltoabase.c => ft_dprintl_base.c | 28 +++---- ft_ptoa.c => ft_dprintptr.c | 30 +++----- ft_strchr.c => ft_dprintul.c | 18 ++--- ft_ultoabase.c => ft_dprintul_base.c | 31 ++++---- ft_dprintx.c | 18 +++++ ft_ctoa.c => ft_isarg.c | 28 ++++--- main.c => ft_isdigit.c | 14 ++-- ft_itoa.c | 55 -------------- ft_printf.c | 10 +-- printf.h => ft_printf.h | 34 +++++---- ft_printf_tester | 1 - ft_putchar_fd.c | 7 +- ft_putstr_fd.c | 18 +++-- ft_strdup.c => ft_skipflag.c | 31 ++++---- ft_strjoin.c | 38 ---------- ft_strlen.c | 4 +- ft_vdprintf.c | 45 +++++++++--- ft_vsprintf.c | 105 --------------------------- 26 files changed, 254 insertions(+), 378 deletions(-) create mode 100644 .ft_vsprintf.c.swp delete mode 160000 42-printf-tester delete mode 100755 a.out rename ft_putendl_fd.c => ft_dprintX.c (68%) create mode 100644 ft_dprintarg.c rename ft_vprintf.c => ft_dprintf.c (69%) create mode 100644 ft_dprintflag.c rename ft_ltoabase.c => ft_dprintl_base.c (66%) rename ft_ptoa.c => ft_dprintptr.c (63%) rename ft_strchr.c => ft_dprintul.c (67%) rename ft_ultoabase.c => ft_dprintul_base.c (72%) create mode 100644 ft_dprintx.c rename ft_ctoa.c => ft_isarg.c (64%) rename main.c => ft_isdigit.c (72%) delete mode 100644 ft_itoa.c rename printf.h => ft_printf.h (57%) delete mode 160000 ft_printf_tester rename ft_strdup.c => ft_skipflag.c (62%) delete mode 100644 ft_strjoin.c delete mode 100644 ft_vsprintf.c diff --git a/.ft_vsprintf.c.swp b/.ft_vsprintf.c.swp new file mode 100644 index 0000000000000000000000000000000000000000..7ba401219b3dea3aa8dd552bbdbe9e62529a3334 GIT binary patch literal 12288 zcmeI2O>f*p9EYb|z@?$6y}^NhvTCv~>8|ap+F}|B^#utL5E2Rpst`F|JDJ3>SN3cm zq#+UlAvo}MK-?-JE+C;^IF=8<7ognWz<~=wNJt>Wf#293uXnYeh~!c1XLu+hRB#X6&)=uX|VD_{-S*dYXCOhCA5tg>3q_!@9Q6?%Hm&9uGo) z+iwTS$L%GKpW5ov;l2E8_)){0d3$OG9daV*a7ByUomI(jo?Iau0HRfCF!YZ1KNN# zpbcmP+JH8o4QK<}fHt5FXam~7m;txP*wp=u?LUA9{QX~j|G#~jv6sOVxbqNWTi_A! z%@kv=f;sT*DaPIcZ-PFE!BgNGcpR9Z1LnXPa2ovdAY(s(ufXTvQ*aA>1U>-og9P+} z51s*6z(r68v)~-~#A~+A4;4C-=4DhGH z*dO3`a2tFHJ_8?vcfmVAfB-CkN5M&8fZyQnS8x~H0k^=1;5~2vq~8dvfhC|1Z9p5) z2DAZf;QwM^pBafS21!Kqcpw^2FatG`qIRDR%UO@H)8c~AO~opwMdGM1y#6kVcug=B ziMNr|aXwFT=jLR*(Mt|J6^Q3Swh&s(`_Rpsl%)<&F{iS%!A9oV8}#czoNT+9h%(!hlas-Do4Q(# zkGCxoqlpn@k4P9sE<&Bb#vaT2R9>2_%NlB8BJU&cN>72rX(6UxEA7zQI>ey;q9kbeTdM3zoZNqA5sxzn)rhZ3s3hF?oVD zF~O=Nl!E?2KDuI77;f7Q!`Q3Wv-yQKCTTUONpe|nklAQp8p@^T)1 zpoL0W4|774dKFQ7q@3eX^wgjAsORudNWt3z7qNJ}rTpY-!J;YY)d)o*f^+|CKW4u9 zGQpMxJ->6af645<*K4o6_S$Pd=9`(@{i~MQZ8oNpgI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{8OQpcz%J z<>~w(3;&=(=)6i3TKKit$1ME%eoE&hno#9d`~6SFug72S-*q1T3;aK}@ay|7oxlAT z_#v|dcRiX+pHufNk`z{YUDx^VLFP5_>vQn~r^x>fc*%El z`}#g^pW+`;6Q1G+CEczb)_(t6NG{!umZAA{ zy%@{{)9vf?Mrnhju+mdo=0xAWL9jYA5M|A;&#@Y<`E@=`@oT)!uWXQ|I<1&OXg*Ch zXB_@pmPm?E>OegX|E1&bpZJJm_$FO2nv%8sCFAhl(;=D8u?&Efzgh8H?f2a+lK(tz zY8*w)Z_YDw*F<_`o2+cd_X1Fwg?~D8>haWOaRFvAF(CNf$2&#FDl7p*w=1!9=FiW6 O%UzP base_size - 1) { - out[--str_size] = base[n % base_size]; - n = n / base_size; + ft_dprintul_base(fd, n / base_size, base); + ft_putchar_fd(fd, base[n % base_size]); } - return (out); + else + ft_putchar_fd(fd, base[n]); + return (str_size - 1); } diff --git a/ft_dprintx.c b/ft_dprintx.c new file mode 100644 index 0000000..6d6de6e --- /dev/null +++ b/ft_dprintx.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_dprintx.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet +#include "ft_printf.h" -int main(void) +int ft_isdigit(int c) { - ft_printf("%% %@ %X\n", 255); + if (c <= '9' && c >= '0') + return (1); return (0); } diff --git a/ft_itoa.c b/ft_itoa.c deleted file mode 100644 index b74c738..0000000 --- a/ft_itoa.c +++ /dev/null @@ -1,55 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ft_itoa.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: cchauvet # include # include +# include size_t ft_strlen(const char *s); char *ft_strchr(const char *s, int c); -char *ft_strjoin(char *s1, char *s2); +int ft_isdigit(int c); +int ft_skipflag(const char *str); +int ft_isarg(int c); -char *ft_itoa(int n); -char *ft_ctoa(int c); -char *ft_strdup(const char *s); -char *ft_ptoa(void *ptr); -char *ft_utoa(unsigned int n); -char *ft_ltoabase(long int n, char *base); -char *ft_ultoabase(long unsigned int n, char *base); +int ft_dprintptr(int fd, void *ptr); +int ft_dprintl_base(int fd, long long n, char *base); +int ft_dprintul_base(int fd, unsigned long long n, char *base); +int ft_dprintul(int fd, unsigned long long n); +int ft_dprintx(int fd, unsigned int n); +int ft_dprint_upperx(int fd, unsigned int n); +int ft_dprintflag(int fd, const char *flag, va_list va); +int ft_dprintarg(int fd, int c, va_list va); int ft_printf(const char *format, ...); -int ft_vprintf(const char *format, va_list va); -char *ft_vsprintf(char *str, const char *format, va_list va); int ft_vdprintf(int fd, const char *format, va_list va); -void ft_putchar_fd(char c, int fd); -void ft_putstr_fd(char *s, int f); +int ft_putchar_fd(int fd, char c); +int ft_putstr_fd(int fd, char *str); #endif diff --git a/ft_printf_tester b/ft_printf_tester deleted file mode 160000 index a053a35..0000000 --- a/ft_printf_tester +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a053a3500c9124a5c64c95cd8ff9e78a783932c4 diff --git a/ft_putchar_fd.c b/ft_putchar_fd.c index e2460d1..d509e9c 100644 --- a/ft_putchar_fd.c +++ b/ft_putchar_fd.c @@ -6,13 +6,14 @@ /* By: cchauvet