char currMove[20], moveMap[500][10], /* for analyze mode */ canPonder[20], threadOpt[20], varList[8000], anaOpt[20], checkOptions[8192] = "Ponder";\r
char pvs[99][999], board[100]; // XQ board for UCCI\r
char *nameWord = "name ", *valueWord = "value ", *wTime = "w", *bTime = "b", *wInc = "winc", *bInc = "binc", newGame; // keywords that differ in UCCI\r
-int unit = 1, drawOffer, scores[99], mpvSP, maxDepth, ponderAlways, newCnt;\r
+int unit = 1, drawOffer, scores[99], mpvSP, maxDepth, ponderAlways, newCnt, priority;\r
\r
FILE *toE, *fromE, *fromF;\r
int pid;\r
\r
if (! fSuccess) return GetLastError();\r
\r
-// if (0) { // in the future we could trigger this by an argument\r
-// SetPriorityClass(piProcInfo.hProcess, GetWin32Priority(appData.niceEngines));\r
-// }\r
+ if (priority > 0) { // for now only implement all lowered priorityies the same way\r
+ SetPriorityClass(piProcInfo.hProcess, BELOW_NORMAL_PRIORITY_CLASS);\r
+ }\r
\r
/* Close the handles we don't need in the parent */\r
CloseHandle(piProcInfo.hThread);\r
strcpy(buf, cmdLine); p = buf;\r
for (i=0;;) { argv[i++] = p; p = strchr(p, ' '); if (p == NULL) break; *p++ = 0; }\r
argv[i] = NULL;\r
+ if(priority) i = nice(priority);\r
execvp(argv[0], argv); // startup engine\r
\r
perror(argv[0]); exit(1); // could not start engine; quit.\r
if(argc == 2 && !strcmp(argv[1], "-v")) { printf("UCI2WB " VERSION " by H.G.Muller\n"); exit(0); }\r
if(argc > 1 && !strcmp(argv[1], "debug")) { debug = 1; argc--; argv++; }\r
if(argc > 1 && !strcmp(argv[1], "-var")) { strcpy(varList+1, argv[2]); *varList = ','; argc-=2; argv+=2; }\r
+ if(argc > 2 && !strcmp(argv[1], "-nice")) { sscanf(argv[2], "%d", &priority); argc-=2; argv+=2; }\r
if(argc > 1 && argv[1][0] == '-') { sc = argv[1][1]; argc--; argv++; }\r
if(argc < 2) { printf("usage is: U%cI2WB [debug] [-s] <engine.exe> [<engine directory>]\n", sc-32); exit(-1); }\r
if(argc > 2) dir = argv[2];\r
=head1 SYNOPSIS
-B<uci2wb> [debug] [-var <variant>] [-c|-s|-x] engine [directory]
+B<uci2wb> [debug] [-var <variant>] [-nice <priority>] [-c|-s|-x] engine [directory]
=head1 DESCRIPTION
(but, f.e. seirawan or 6x6+6_shogi) it has to be configured on the
uci2wb command line through this option.
+=item B<-nice <priority>>
+
+Runs the engine processes at the requested priority;
+positive values lower the priority.
+
=item B<debug>
Makes uci2wb report to the GUI everything it receives from the engine,