47 #define RESET_COUNT 2000 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));
83 FILE *thisfile = NULL;
95 if ((f = fopen(
filename,
"rb")) != NULL) {
long long_rand(long limit)
FILE * open_file(const char *filename, const char *mode)
bool exists_file(const char *filename)
Check whether the file exists.