X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=cdf51aac7713c93f3f7dda84c4caa94853b421e5;hb=f25baeff5c938adec15bfd8c54094dddc112802d;hp=c6914b0e54307d9f6f0802a3d97e7816dca37b7b;hpb=4223777243f0d5c358c15307b5131d94a8030a3d;p=xboard.git diff --git a/args.h b/args.h index c6914b0..cdf51aa 100644 --- a/args.h +++ b/args.h @@ -112,6 +112,8 @@ char *firstEngineLine; char *secondEngineLine; char *icsNick; char *theme; +char *replace; +char *engineListFile; void EnsureOnScreen(int *x, int *y, int minX, int minY); char StringGet(void *getClosure); @@ -517,6 +519,7 @@ ArgDescriptor argDescriptors[] = { { "secondChessProgramNames", ArgString, (void *) &secondChessProgramNames, !XBOARD, (ArgIniType) SCP_NAMES }, { "themeNames", ArgString, (void *) &appData.themeNames, TRUE, (ArgIniType) "native -upf false -ub false -ubt false -pid \"\"\n" }, + { "engineList", ArgFilename, (void *) &engineListFile, TRUE, (ArgIniType) "" }, { "addMasterOption", ArgMaster, NULL, FALSE, INVALID }, { "installEngine", ArgInstall, (void *) &firstChessProgramNames, FALSE, (ArgIniType) "" }, { "installTheme", ArgInstall, (void *) &appData.themeNames, FALSE, (ArgIniType) "" }, @@ -620,6 +623,7 @@ ArgDescriptor argDescriptors[] = { { "replace", ArgString, (void *) &replace, FALSE, (ArgIniType) NULL }, { "fixedSize", ArgBoolean, (void *) &appData.fixedSize, TRUE, (ArgIniType) FALSE }, { "showMoveTime", ArgBoolean, (void *) &appData.moveTime, TRUE, (ArgIniType) FALSE }, + { "bmpSave", ArgInt, (void *) &appData.bmpSave, FALSE, 0 }, // [HGM] tournament options { "tourneyFile", ArgFilename, (void *) &appData.tourneyFile, FALSE, (ArgIniType) "" }, @@ -1184,9 +1188,9 @@ ParseArgs(GetFunc get, void *cl) break; } if(replace) { // previous -replace option makes this string option conditional - char *p = replace; + int differs = strcmp(*(char**) ad->argLoc, (char*) replace); free(replace); replace = NULL; // but expires in the process - if(strcmp(*(char**) ad->argLoc, p)) break; // only use to replace the given string + if(differs) break; // only use to replace the given string } ASSIGN(*(char **) ad->argLoc, argValue); break; @@ -1434,6 +1438,9 @@ InitAppData(char *lpCmdLine) /* Parse command line */ ParseArgs(StringGet, &lpCmdLine); + /* if separate engine list is used, parse that too */ + if(*engineListFile) ParseSettingsFile(engineListFile, &engineListFile); + if(appData.viewer && appData.viewerOptions[0]) ParseArgsFromString(appData.viewerOptions); if(appData.tourney && appData.tourneyOptions[0]) ParseArgsFromString(appData.tourneyOptions); chessProgram |= GetEngineLine(firstEngineLine, 0) || GetEngineLine(secondEngineLine, 1);