#ifndef UTILS_H #define UTILS_H // http://c-faq.com/lib/randrange.html int randint(int N); // http://c-faq.com/lib/randrange.html // numbers in the range [M, N] could be generated with something like int randrange(int M, int N); int random_activate(int w); /** * Display a repr of the given string. * * This converts most \n\r\v\f\t codes, * defaults to \xHH (hex value). */ char *repr(const char *data); const char *strnstr(const char *source, int len, const char *needle); int rstrnstr(const char *buffer, int len, const char *find); int string_insert(char *buffer, int max_length, int pos, const char *insert); void pcopy(char *pstring, char *str); #endif