Created
February 10, 2017 01:19
-
-
Save zaydek-old/44a4f670e7100e1d4261ba466147c8ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <unistd.h> | |
size_t ft_strlen(char *s) | |
{ | |
size_t i; | |
i = 0; | |
while (s[i]) | |
++i; | |
return (i); | |
} | |
size_t ft_putstr(char *s) | |
{ | |
return (write(1, s, ft_strlen(s))); | |
} | |
void od_hoot(char *s, int n) | |
{ | |
if (*s) | |
ft_putstr(s) && ft_putstr(n ? " " : "\n"); | |
} | |
int main(int ac, char **av) | |
{ | |
if (--ac) | |
while (ac--) | |
od_hoot(*++av, ac); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment