mirror of
https://github.com/Ladebeze66/Piscine42.git
synced 2025-12-16 05:58:07 +01:00
40 lines
1.1 KiB
C
Executable File
40 lines
1.1 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_print_program_name.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/12/13 14:01:59 by fgras-ca #+# #+# */
|
|
/* Updated: 2022/12/13 14:56:15 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <unistd.h>
|
|
|
|
void ft_putchar(char c)
|
|
{
|
|
write(1, &c, 1);
|
|
}
|
|
|
|
void ft_putstr(char *str)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
{
|
|
write(1, &str[i], 1);
|
|
i++;
|
|
}
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
if (argc > 0)
|
|
{
|
|
ft_putstr(argv[0]);
|
|
ft_putchar('\n');
|
|
}
|
|
}
|