diff options
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/system.c | 2 | ||||
| -rw-r--r-- | src/base/system.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/base/system.c b/src/base/system.c index ed0f41ec..99fd0380 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -1820,6 +1820,8 @@ char str_uppercase(char c) int str_toint(const char *str) { return atoi(str); } float str_tofloat(const char *str) { return atof(str); } +void init_rand() { srand(time(NULL)); } +int irand() { return rand(); } static int str_utf8_isstart(char c) diff --git a/src/base/system.h b/src/base/system.h index b3588dbf..bc4ee734 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -1194,6 +1194,9 @@ int str_isspace(char c); char str_uppercase(char c); unsigned str_quickhash(const char *str); +void init_rand(); +int irand(); + /* Function: gui_messagebox Display plain OS-dependent message box |