2015-12-04 14:47:52 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2015-12-04 14:47:52 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
2016-09-06 16:44:05 +00:00
|
|
|
#ifndef _SHARED_H
|
|
|
|
#define _SHARED_H
|
2016-09-05 19:47:26 +00:00
|
|
|
|
2016-09-08 12:11:35 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2016-09-05 19:47:26 +00:00
|
|
|
#include <unistd.h>
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-08 08:01:49 +00:00
|
|
|
u32 get_random_num (const u32 min, const u32 max);
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-08 08:01:49 +00:00
|
|
|
u32 mydivc32 (const u32 dividend, const u32 divisor);
|
|
|
|
u64 mydivc64 (const u64 dividend, const u64 divisor);
|
|
|
|
|
|
|
|
void naive_replace (char *s, const u8 key_char, const u8 replace_char);
|
|
|
|
void naive_escape (char *s, size_t s_max, const u8 key_char, const u8 escape_char);
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2016-09-08 08:48:38 +00:00
|
|
|
void hc_sleep (const int sec);
|
|
|
|
|
2016-09-06 16:44:05 +00:00
|
|
|
#endif // _SHARED_H
|