This commit is contained in:
LinlyBoi
2023-08-22 14:25:46 +03:00
parent 59e05c91fe
commit 297cf9c4a5
3 changed files with 20 additions and 6 deletions

17
puts.c
View File

@@ -6,10 +6,21 @@
*
* @str: pointers to "buffer" or string head
*
* Return: Naught
* Return: written bytes
*/
void _puts(char *str)
int _puts(char *str)
{
write(1, str, _strlen(str));
return (write(1, str, _strlen(str)));
}
/**
* _putchar - writes the character c to stdout
* @c: The character to print
*
* Return: On success 1.
* On error, -1 is returned, and errno is set appropriately.
*/
int _putchar(char c)
{
return (write(1, &c, 1));
}