Skip to content

Commit

Permalink
4 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosme Portuondo Barcena committed Oct 10, 2022
1 parent bcf4634 commit 90d2176
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 9 deletions.
14 changes: 13 additions & 1 deletion ft_printf.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:31:12 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:32:39 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */

#include <unistd.h>

void ft_print_c(char c)
Expand All @@ -11,7 +23,7 @@ void ft_print_str(char *str)
unsigned int i;

i = 0;
while(str[i] != '\0')
while (str[i] != '\0')
{
write(1, &str[i], 1);
i++;
Expand Down
12 changes: 12 additions & 0 deletions ft_putchar.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putchar.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:30:38 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:31:26 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */

#include "libftprintf.h"

void ft_putchar(char c)
Expand Down
13 changes: 13 additions & 0 deletions ft_puthexa.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_puthexa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:49:51 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:49:53 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */


13 changes: 13 additions & 0 deletions ft_putnbr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:49:01 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:49:03 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */


18 changes: 15 additions & 3 deletions ft_putstr.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:32:13 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:32:25 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */

#include "libftprintf.h"

int ft_putstr(char *str)
{
unsigned int i;

i = 0;
while(str[i] != '\0')
while (str[i] != '\0')
{
write(1, &str[i], 1);
i++;
}
}
}
13 changes: 13 additions & 0 deletions ft_strlen.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/10 09:50:43 by cportuon #+# #+# */
/* Updated: 2022/10/10 09:50:44 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */


10 changes: 5 additions & 5 deletions libftprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
/* ::: :::::::: */
/* libftprintf.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cportuon <marvin@42.fr> +#+ +:+ +#+ */
/* By: cportuon <cportuon@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/05 08:52:08 by cportuon #+# #+# */
/* Updated: 2022/10/06 08:21:11 by cportuon ### ########.fr */
/* Updated: 2022/10/10 09:31:55 by cportuon ### ########.fr */
/* */
/* ************************************************************************** */

#ifndef LIBFTPRINTF_H
# define LIBFTPRINTF_H

#include <stdarg.h>
#include <unistd.h>
# include<stdarg.h>
# include<unistd.h>

int ft_putchar(char c);
void ft_putchar(char c);

#endif

0 comments on commit 90d2176

Please sign in to comment.