2024-09-16 14:11:01 +02:00
|
|
|
#ifndef UTIL_H
|
|
|
|
#define UTIL_H
|
|
|
|
|
2024-09-25 23:31:10 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
2024-09-16 14:11:01 +02:00
|
|
|
#define LOG_ERROR 1
|
|
|
|
#define LOG_INFO 2
|
|
|
|
|
|
|
|
#define PATH_MAX 4096
|
|
|
|
|
|
|
|
void error(int fatal, const char *fmt, ...);
|
|
|
|
void *memalloc(size_t size);
|
|
|
|
char *replace_home(char *str);
|
2024-09-25 04:53:00 +02:00
|
|
|
void mkdir_p(const char *file);
|
2024-09-16 14:11:01 +02:00
|
|
|
void write_log(int type, const char *fmt, ...);
|
|
|
|
void print_bin(const unsigned char *ptr, size_t length);
|
|
|
|
|
|
|
|
#endif
|