docs(print): moving the actual documentation on the header

- The documentation on the header allow u to see on the files where the
header is inclued
This commit is contained in:
Raphael 2025-09-05 16:29:51 +02:00
parent ed64bd73d6
commit 701ce57f84
No known key found for this signature in database
6 changed files with 48 additions and 43 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/14 17:27:44 by rparodi #+# #+# */
/* Updated: 2025/09/04 11:56:27 by rparodi ### ########.fr */
/* Updated: 2025/09/05 16:23:43 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -44,13 +44,6 @@ static int _check_args(int fd, char c, va_list args, int *ret)
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;
@ -77,12 +70,6 @@ int ft_dprintf(int fd, const char *s, ...)
return (ret);
}
/**
* @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;

View file

@ -6,18 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 13:58:22 by rparodi #+# #+# */
/* Updated: 2025/09/01 17:46:44 by rparodi ### ########.fr */
/* Updated: 2025/09/05 16:23:43 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.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);

View file

@ -6,18 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 13:59:01 by rparodi #+# #+# */
/* Updated: 2025/09/01 17:46:30 by rparodi ### ########.fr */
/* Updated: 2025/09/05 16:23:43 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "print.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);

View file

@ -6,7 +6,7 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 13:59:18 by rparodi #+# #+# */
/* Updated: 2025/09/01 17:47:41 by rparodi ### ########.fr */
/* Updated: 2025/09/05 16:23:43 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -41,12 +41,6 @@ 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;

View file

@ -6,19 +6,13 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/09 13:58:46 by rparodi #+# #+# */
/* Updated: 2025/09/01 17:48:07 by rparodi ### ########.fr */
/* Updated: 2025/09/05 16:23:43 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "str.h"
#include <unistd.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));