35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_print_program_name.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/08/07 23:08:02 by jhalford #+# #+# */
|
|
/* Updated: 2016/08/07 23:08:06 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
void ft_putchar(char c);
|
|
|
|
void ft_print_program_name(char *str)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
{
|
|
ft_putchar(str[i]);
|
|
i++;
|
|
}
|
|
ft_putchar('\n');
|
|
}
|
|
|
|
int main(int ac, char **argv)
|
|
{
|
|
if (ac > 0)
|
|
{
|
|
ft_print_program_name(argv[0]);
|
|
return (0);
|
|
}
|
|
}
|