libexpress 0.0.1
Express Server Framework in C
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1
8#ifndef __LIBEXPRESS_UTIL_H
9#define __LIBEXPRESS_UTIL_H 1
10
11#include <libcol/col.h>
12
20void print_info(const char *msg, color_t color, bool exit_process, bool print_line, const char* file, int line);
21
27#define success(msg) print_info(msg, GREEN, false, false, NULL, 0);
28#define warning(msg) print_info(msg, YELLOW, false, true, __FILE__, __LINE__);
29#define error(msg) print_info(msg, RED, true, true, __FILE__, __LINE__);
30
47char* tokenize(char* s, char c);
48
49#endif
char * tokenize(char *s, char c)
This splits the string s at the first occurence of character c in s.
Definition: util.c:30
void print_info(const char *msg, color_t color, bool exit_process, bool print_line, const char *file, int line)
An internal function used by error, warning and success to print the messages, along with necessary e...
Definition: util.c:5