tgrekov-philosophers
HIVE philosophers July 2024
Loading...
Searching...
No Matches
err.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* err.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/07/22 04:42:46 by tgrekov #+# #+# */
9
/* Updated: 2024/07/27 08:36:38 by tgrekov ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
20
#include <unistd.h>
21
29
int
err
(
const
char
*str,
int
retval)
30
{
31
int
len;
32
33
len = 0;
34
if
(str)
35
{
36
while
(*str++)
37
len++;
38
write(2, str - len - 1, len);
39
}
40
return
(retval);
41
}
err
int err(const char *str, int retval)
Write str to stderr and return retval.
Definition
err.c:29
src
mandatory
utils
err.c