X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=1da24488ce6fcfb700418efcb2a0f05e408a7081;hb=8e4a958eea326db65c7621b4c1840cdca97f6d07;hp=eb573c6c09bd7d2a4fef2f6f69a44fd353d99c68;hpb=3d9fcd78798d728341a7a41b19fefd5a24ed46d0;p=xboard.git diff --git a/args.h b/args.h index eb573c6..1da2448 100644 --- a/args.h +++ b/args.h @@ -112,6 +112,7 @@ char *firstEngineLine; char *secondEngineLine; char *icsNick; char *theme; +char *replace; void EnsureOnScreen(int *x, int *y, int minX, int minY); char StringGet(void *getClosure); @@ -223,7 +224,7 @@ ArgDescriptor argDescriptors[] = { { "flashRate", ArgInt, (void *) &appData.flashRate, XBOARD, (ArgIniType) FLASH_RATE }, { "pieceImageDirectory", ArgFilename, (void *) &appData.pieceDirectory, TRUE, (ArgIniType) "" }, { "pid", ArgFilename, (void *) &appData.pieceDirectory, FALSE, INVALID }, - { "trueColors", ArgBoolean, (void *) &appData.trueColors, TRUE, (ArgIniType) FALSE }, + { "trueColors", ArgBoolean, (void *) &appData.trueColors, XBOARD, (ArgIniType) (2*!XBOARD) }, { "jewelled", ArgInt, (void *) &appData.jewelled, FALSE, (ArgIniType) -1 }, { "soundDirectory", ArgFilename, (void *) &appData.soundDirectory, XBOARD, (ArgIniType) "" }, { "msLoginDelay", ArgInt, (void *) &appData.msLoginDelay, XBOARD, (ArgIniType) MS_LOGIN_DELAY }, @@ -617,7 +618,10 @@ ArgDescriptor argDescriptors[] = { { "epd", ArgTrue, (void *) &appData.epd, FALSE, INVALID }, { "inscriptions", ArgString, (void *) &appData.inscriptions, FALSE, (ArgIniType) "" }, { "autoInstall", ArgString, (void *) &appData.autoInstall, XBOARD, (ArgIniType) "" }, + { "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) "" }, @@ -1181,6 +1185,11 @@ ParseArgs(GetFunc get, void *cl) ASSIGN(*(char **) ad->argLoc, buf); break; } + if(replace) { // previous -replace option makes this string option conditional + char *p = (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 + } ASSIGN(*(char **) ad->argLoc, argValue); break;