diff options
author | amy <[email protected]> | 2023-04-14 13:22:32 +0000 |
---|---|---|
committer | amy <[email protected]> | 2023-04-14 13:22:32 +0000 |
commit | d769c253e8a6ddc67cf8424da2017d309e93f11b (patch) | |
tree | f62685a725836337ab29cd8c3448d49d53ed4004 /src/util.h |
init
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..a1bd599 --- /dev/null +++ b/src/util.h @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#ifndef __util__ +#define __util__ +#include "string.h" +void err_m(char*,void (*)(int),char*,int); +void warn_m(char*,char*,int ,...); +void info_m(char*,char*,int ,...); +void log_m(char*ca,char*f,int l,...); +void flag_handle(int argc,char* argv[]); +void sig_handle(void); +unsigned int_len(const unsigned n); +char* force_ca_length(char*inp,int len); +void pexit(int s); + +#define err(s,f,...) err_m(s,f,__FILE__,__LINE__,##__VA_ARGS__); +#define warn(s) warn_m(s,__FILE__,__LINE__); +#define info(s) info_m(s,__FILE__,__LINE__); +#define logm(s) log_m(s,__FILE__,__LINE__); + +#endif |