@@ -94,6 +94,7 @@ bool server = true; // default is server on LINUX
94
94
#endif
95
95
#endif
96
96
unsigned int port = 1024 ; // server port
97
+ int random_seed = -1 ; // random seed -1 means random seed is not set
97
98
bool commandLineCompile = false ;
98
99
99
100
PrepareMode tmpPrepareMode = NO_MODE; // controls what processing is done in preparation NO_MODE, POS_MODE, PREPARE_MODE
@@ -659,6 +660,7 @@ static void ProcessArgument(char* arg)
659
660
size_t len = strlen (hide);
660
661
if (hide[len - 1 ] == ' "' ) hide[len - 1 ] = 0 ;
661
662
}
663
+ else if (!strnicmp (arg, (char *)" seed=" , 5 )) random_seed = atoi (arg+5 );
662
664
#ifndef DISCARDSERVER
663
665
else if (!stricmp (arg,(char *)" serverretry" )) serverRetryOK = true ;
664
666
else if (!stricmp (arg,(char *)" local" )) server = false ; // local standalone
@@ -793,6 +795,10 @@ unsigned int InitSystem(int argcx, char * argvx[],char* unchangedPath, char* rea
793
795
794
796
int oldserverlog = serverLog;
795
797
serverLog = true ;
798
+ if (random_seed != -1 ) {
799
+ printf ((char *)" Set random number %d\r\n " , random_seed);
800
+ srand (random_seed);
801
+ }
796
802
797
803
#ifndef DISCARDSERVER
798
804
if (server)
@@ -1151,7 +1157,7 @@ void ProcessInputFile()
1151
1157
// output user prompt
1152
1158
if (documentMode || silent) {;} // no prompt in document mode
1153
1159
else if (*userPrefix) printf ((char *)" %s " , ReviseOutput (userPrefix));
1154
- else printf ((char *)" %s " ,( char *) " > " );
1160
+ else printf ((char *)" [%d]> " , volleyCount );
1155
1161
1156
1162
*ourMainInputBuffer = ' ' ; // leave space at start to confirm NOT a null init message, even if user does only a cr
1157
1163
ourMainInputBuffer[1 ] = 0 ;
0 commit comments