LFX Mentorship 2023
src
include
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 */
is_file_exist
bool is_file_exist(const char *fname)
Check If file exists or not.
is_null_ptr
bool is_null_ptr(const void *ptr, const char *func_name)
Check if the pointer is a null pointer.
Generated by
1.9.1