tgrekov-fdf
HIVE fdf May 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/04/22 06:08:01 by tgrekov #+# #+# */
9/* Updated: 2024/06/24 08:36:39 by tgrekov ### ########.fr */
10/* */
11/* ************************************************************************** */
12
20#ifndef UTILS_H
21# define UTILS_H
22
23void **arr_free(void **arr);
24int arr_len(void **arr);
25void *err(const char *str, void *retval);
26int abs(int n);
27
28#endif
int abs(int n)
Get absolute value of n.
Definition abs.c:26
void ** arr_free(void **arr)
Free each element in a null-terminated array, and then the array itself.
Definition arr_free.c:30
int arr_len(void **arr)
Count number of elements in a null-terminated array.
Definition arr_len.c:26
void * err(const char *str, void *retval)
Wrapper around perror() that always returns retval.
Definition err.c:29