Skip to content

Commit f22b40c

Browse files
committed
Update random function
1 parent 90ae59d commit f22b40c

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

BINARIES/LinuxChatScript64

131 KB
Binary file not shown.

SRC/mainSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ void ProcessInputFile()
11511151
//output user prompt
11521152
if (documentMode || silent) {;} // no prompt in document mode
11531153
else if (*userPrefix) printf((char*)"%s ", ReviseOutput(userPrefix));
1154-
else printf((char*)"%s",(char*)" >");
1154+
else printf((char*)"[%d]> ", volleyCount);
11551155

11561156
*ourMainInputBuffer = ' '; // leave space at start to confirm NOT a null init message, even if user does only a cr
11571157
ourMainInputBuffer[1] = 0;

SRC/os.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,11 +1481,16 @@ uint64 Hashit(unsigned char * data, int len,bool & hasUpperCharacters, bool & ha
14811481
return crc;
14821482
}
14831483

1484-
unsigned int random(unsigned int range)
1485-
{
1486-
if (regression || range <= 1) return 0;
1487-
unsigned int x = (unsigned int)X64_Table[randIndex++ % MAXRAND];
1488-
return x % range;
1484+
//unsigned int random(unsigned int range)
1485+
//{
1486+
// if (regression || range <= 1) return 0;
1487+
// unsigned int x = (unsigned int)X64_Table[randIndex++ % MAXRAND];
1488+
// printf((char*)"\r\nRandom number %d\r\n",x);
1489+
// return x % range;
1490+
//}
1491+
1492+
unsigned int random(unsigned int range) {
1493+
return rand() % range;
14891494
}
14901495

14911496
/////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)