diff options
Diffstat (limited to 'other/3wahas/common.h')
| -rw-r--r-- | other/3wahas/common.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/other/3wahas/common.h b/other/3wahas/common.h new file mode 100644 index 0000000..9f982fe --- /dev/null +++ b/other/3wahas/common.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | |||
| 2 | #include <sys/time.h> | ||
| 3 | #include <netinet/in.h> | ||
| 4 | #include <unistd.h> | ||
| 5 | |||
| 6 | #ifndef Z_COMMON_H | ||
| 7 | #define Z_COMMON_H | ||
| 8 | |||
| 9 | #ifdef DEBUG | ||
| 10 | void debugp (char *filename, const char *str, ...); | ||
| 11 | void hexdump (char *filename, unsigned char *data, unsigned int amount); | ||
| 12 | #endif | ||
| 13 | int m_random (int lowmark, int highmark); | ||
| 14 | void set_tv (struct timeval *tv, int seconds); | ||
| 15 | void xstrupper (char *str); | ||
| 16 | void scnprintf (char *os, size_t len, const char *str, ...); | ||
| 17 | unsigned long int tdiff (struct timeval *old, struct timeval *new); | ||
| 18 | char *ipv4_print (char *dest, struct in_addr in, int padding); | ||
| 19 | void *xrealloc (void *m_ptr, size_t newsize); | ||
| 20 | char *xstrdup (char *str); | ||
| 21 | void *xcalloc (int factor, size_t size); | ||
| 22 | char *allocncat (char **to, char *from, size_t len); | ||
| 23 | char *alloccat (char **to, char *from); | ||
| 24 | |||
| 25 | #endif | ||
| 26 | |||
