static void UpdateCounter(const char *name, unsigned *val, int initialise)
{
- int inh;
- int outh;
+ int inh=-1;
+ int outh=-1;
unsigned x[2];
int nread = 0;
int nwritten = 0;
if((s.st_mode & S_IFMT) == S_IFDIR && recursive)
dump_directory_tree_worker(str,1);
+
+ if(s.st_ino > 10000)
+ FatalError();
}
return retval;
}
-static unsigned long next = 1;
+extern int random_seed;
+
int myrand(void) {
- next = next * 1103515245 + 12345;
- return((unsigned)(next/65536) % 32768);
+ random_seed = random_seed * 1103515245 + 12345;
+ return((unsigned)(random_seed/65536) % 32768);
}
static void DoUpdateMainFile(void)
dump_directory_tree(fullPathName);
UpdateCounter(fullPowerUpName,&powerUps,0);
+ dump_directory_tree(fullPathName);
while(1){
UpdateCounter(fullStartName, &cycleStarts,0);
+ dump_directory_tree(fullPathName);
DoVerifyMainFile();
DoUpdateMainFile();
dump_directory_tree(fullPathName);
UpdateCounter(fullEndName,&cycleEnds,0);
+ dump_directory_tree(fullPathName);
}
}