#ifndef _H_UTILS
#define _H_UTILS

#include "system.h"
#include "defines.h"

void *my_malloc (size_t);
void my_free (void *);
void strset (char **, c_char, size_t);
time_t get_time (void);
tm get_localtime (void);
char *get_asctime (time_t, char *, size_t);
void string_time (time_t, char *);
char *ltoa (long int, char *, size_t);
char *itoa (int, char *, size_t);
char *u_itoa (u_int n, char *buf);
void random_init (void);
long int random_num (long int);
size_t num_spaces (c_char);
size_t num_notspaces (c_char);
void mask2nick (c_char, char *, size_t);
void mask2user (c_char, char *);
void mask2host (c_char, char *);
bool match_mask (c_char, c_char);
void make_generic_mask (c_char, char *);
void strsplit (c_char, char[][MSG_SIZE+1], u_char);
char *my_strncpy (char *, c_char, size_t);
c_char fullpath2file (c_char);
char *strip_crlf (char *);
void upper (char *);
void lower (char *);

#endif
