diff options
Diffstat (limited to 'toxcore/util.h')
-rw-r--r-- | toxcore/util.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/toxcore/util.h b/toxcore/util.h index 90a3c8e4..71be84ca 100644 --- a/toxcore/util.h +++ b/toxcore/util.h | |||
@@ -5,8 +5,24 @@ | |||
5 | * Copyright 2013 plutooo | 5 | * Copyright 2013 plutooo |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __UTIL_H__ | ||
9 | #define __UTIL_H__ | ||
10 | |||
11 | #include <stdbool.h> | ||
12 | #include <stdint.h> | ||
13 | |||
8 | uint64_t now(); | 14 | uint64_t now(); |
9 | uint64_t random_64b(); | 15 | uint64_t random_64b(); |
10 | bool ipp_eq(IP_Port a, IP_Port b); | ||
11 | bool id_eq(uint8_t *dest, uint8_t *src); | 16 | bool id_eq(uint8_t *dest, uint8_t *src); |
12 | void id_cpy(uint8_t *dest, uint8_t *src); | 17 | void id_cpy(uint8_t *dest, uint8_t *src); |
18 | |||
19 | #undef LOGGING | ||
20 | /* #define LOGGING */ | ||
21 | #ifdef LOGGING | ||
22 | extern char logbuffer[512]; | ||
23 | void loginit(uint16_t port); | ||
24 | void loglog(char *text); | ||
25 | void logexit(); | ||
26 | #endif | ||
27 | |||
28 | #endif /* __UTIL_H__ */ | ||