summaryrefslogtreecommitdiff
path: root/other/zylyx/src/common.h
blob: 273a83b5db3862782b35175aaf3e3d59b9bdc0f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#include <sys/time.h>
#include <netinet/in.h>
#include <unistd.h>

#ifndef	Z_COMMON_H
#define	Z_COMMON_H

#ifdef	DEBUG
void	debugp (char *filename, const char *str, ...);
void	hexdump (char *filename, unsigned char *data, unsigned int amount);
#endif
int			m_random (int lowmark, int highmark);
void			set_tv (struct timeval *tv, int seconds);
void			xstrupper (char *str);
void			scnprintf (char *os, size_t len, const char *str, ...);
unsigned long int	t_passed (struct timeval *old);
unsigned long int	tdiff (struct timeval *old, struct timeval *new);
char			*ipv4_print (char *dest, struct in_addr in, int padding);
void			*xrealloc (void *m_ptr, size_t newsize);
char			*xstrdup (char *str);
void			*xcalloc (int factor, size_t size);

#endif