#include "cutil.h"
#include "tprintf.h"
#include "callcpp.h"
#include <stdlib.h>
Go to the source code of this file.
◆ RESET_COUNT
◆ exists_file()
bool exists_file |
( |
const char * |
filename | ) |
|
Check whether the file exists.
Definition at line 92 of file cutil.cpp.
95 if ((f = fopen(
filename,
"rb")) != NULL) {
◆ long_rand()
long long_rand |
( |
long |
limit | ) |
|
Definition at line 56 of file cutil.cpp.
57 #if RAND_MAX < 0x1000000 61 num = (long) rand () << 16;
62 num |= rand () & 0xffff;
64 long result = num % limit;
70 return (
long)((double)limit * rand()/(RAND_MAX + 1.0));
◆ open_file()
FILE* open_file |
( |
const char * |
filename, |
|
|
const char * |
mode |
|
) |
| |
Definition at line 82 of file cutil.cpp.
83 FILE *thisfile = NULL;