LFX Mentorship 2023
baseutil.h
Go to the documentation of this file.
1 #ifndef BASEUTIL_H
4 #define BASEUTIL_H
5 
6 #include <stdbool.h>
7 
8 #define _BOLD_RED "\033[1m\033[31m"
9 #define _RESET_COLOR "\033[0m"
10 #define _ERROR_SIG _BOLD_RED "ERROR => " _RESET_COLOR
11 #define _SUCCESS true
12 #define _FAILED false
13 #define _NOT_FOUND -1
14 
19 bool is_null_ptr(const void *ptr, const char *func_name);
20 
24 bool is_file_exist(const char *fname);
25 
26 #endif /* BASEUTIL_H */
bool is_file_exist(const char *fname)
Check If file exists or not.
bool is_null_ptr(const void *ptr, const char *func_name)
Check if the pointer is a null pointer.