diff options
| author | Teetime <TeetimeTW@yahoo.de> | 2012-06-13 03:23:03 +0200 |
|---|---|---|
| committer | Teetime <TeetimeTW@yahoo.de> | 2012-06-13 03:23:03 +0200 |
| commit | 977683d4f8f82633ba9ba6a26607b5451bd0c592 (patch) | |
| tree | 27e713566efa8a8e87a4cc5a6bbd8e88c114af81 /src/base | |
| parent | b297f0995a8e097c60e67d6372128e65c22f908b (diff) | |
| download | zcatch-977683d4f8f82633ba9ba6a26607b5451bd0c592.tar.gz zcatch-977683d4f8f82633ba9ba6a26607b5451bd0c592.zip | |
some changes...
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 |