-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.h
24 lines (21 loc) · 1.04 KB
/
utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef UTILS
#define UTILS
#include <stdint.h>
#define DEBUG_FLAG 1
#define DEBUG(fmt, ...) \
do \
{ \
if (DEBUG_FLAG) \
fprintf(stderr, "DEBUG:%s:%d:%s(): " fmt "\n", __FILE__, \
__LINE__, __func__, __VA_ARGS__); \
} while (0)
#define ERROR(fmt, ...) \
do \
{ \
fprintf(stderr, "ERROR:%s:%d:%s(): " fmt "\n", __FILE__, \
__LINE__, __func__, __VA_ARGS__); \
perror("errorno: "); \
} while (0)
void print_hex_buffer(unsigned char* buf, int count);
void isoformatts(char dst[35], uint32_t sec, uint32_t usec);
#endif /* UTILS */