tgrekov-philosophers
HIVE philosophers July 2024
Loading...
Searching...
No Matches
utils.h
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* utils.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/07/22 04:45:16 by tgrekov #+# #+# */
9/* Updated: 2024/08/25 12:37:23 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef UTILS_H
14# define UTILS_H
15
16# include "../philosopher/philo.h"
17
18int atoi_errable(const char *str, int *n);
19int err(const char *str, int retval);
20int ft_strlen(char *str);
21int intlen(int n);
22int ullen(unsigned long n);
23unsigned long timestamp(void);
24int wrap_ix(int i, int max);
25
26#endif
int atoi_errable(const char *str, int *n)
Converts ascii digits from str to a signed integer, output into n . Returns 0 on success,...
int err(const char *str, int retval)
Write str to stderr and return retval.
Definition err.c:29
unsigned long timestamp(void)
Millisecond timestamp since this function was first called.
Definition timestamp.c:27