docs: adding documentation on my libft
This commit is contained in:
parent
c947e43e51
commit
83cc8419a0
47 changed files with 624 additions and 44 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/14 17:27:44 by rparodi #+# #+# */
|
||||
/* Updated: 2024/10/31 16:12:37 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 18:01:28 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -43,6 +43,13 @@ int _check_args(int fd, char c, va_list args, int *ret_value)
|
|||
return (1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print on a file descriptor
|
||||
*
|
||||
* @param fd the file descriptor
|
||||
* @param s the string
|
||||
* @return the number of character printable
|
||||
*/
|
||||
int ft_dprintf(int fd, const char *s, ...)
|
||||
{
|
||||
size_t i;
|
||||
|
|
@ -69,6 +76,12 @@ int ft_dprintf(int fd, const char *s, ...)
|
|||
return (ret_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print on the standard output
|
||||
*
|
||||
* @param s the string
|
||||
* @return the number of character printable
|
||||
*/
|
||||
int ft_printf(const char *s, ...)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,18 @@
|
|||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/09 13:58:22 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/10 15:31:57 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 18:02:37 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
/**
|
||||
* @brief print an character on a file descriptor
|
||||
*
|
||||
* @param c the character to print
|
||||
* @param fd the file descriptor
|
||||
*/
|
||||
void ft_putchar_fd(char c, int fd)
|
||||
{
|
||||
write(fd, &c, 1);
|
||||
|
|
|
|||
|
|
@ -6,12 +6,18 @@
|
|||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/09 13:59:01 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/10 15:57:53 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 18:03:47 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
/**
|
||||
* @brief Print a string follow by a new line on a file descriptor
|
||||
*
|
||||
* @param s the string to print
|
||||
* @param fd the file descriptor
|
||||
*/
|
||||
void ft_putendl_fd(char *s, int fd)
|
||||
{
|
||||
ft_putstr_fd(s, fd);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/09 13:59:18 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/13 20:13:20 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 18:04:17 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -39,6 +39,12 @@ static int ft_check_sign(int n, char *str, size_t *i, int fd)
|
|||
return (n);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print a number on a file descriptor
|
||||
*
|
||||
* @param n the number to print
|
||||
* @param fd the file descriptor
|
||||
*/
|
||||
void ft_putnbr_fd(int n, int fd)
|
||||
{
|
||||
size_t i;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,18 @@
|
|||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/09 13:58:46 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/10 15:57:46 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 18:05:11 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
/**
|
||||
* @brief print a string on a file descriptor
|
||||
*
|
||||
* @param s the string to print
|
||||
* @param fd the file descriptor
|
||||
*/
|
||||
void ft_putstr_fd(char *s, int fd)
|
||||
{
|
||||
write(fd, s, ft_strlen(s));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue