about summary refs log tree commit diff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/system.c2
-rw-r--r--src/base/system.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/base/system.c b/src/base/system.c
index 410cb699..5c6762ef 100644
--- a/src/base/system.c
+++ b/src/base/system.c
@@ -1828,6 +1828,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 7ba0c0a0..00c58c10 100644
--- a/src/base/system.h
+++ b/src/base/system.h
@@ -1203,6 +1203,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