X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=3b798c2596884c84b3219a60f1ba73adda076fd5;hb=a7db862b2f44d23b358a1319cd8a374cf88c24fd;hp=b101ef4aaff8aa5d391c29715f816beb13301a5a;hpb=66a4d3394a1b23ab654e3fb6027ad9b5b2bd461c;p=xboard.git diff --git a/args.h b/args.h index b101ef4..3b798c2 100644 --- a/args.h +++ b/args.h @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -185,6 +185,7 @@ ArgDescriptor argDescriptors[] = { { "fd", ArgFilename, (void *) &appData.firstDirectory, FALSE, INVALID }, { "secondDirectory", ArgFilename, (void *) &appData.secondDirectory, FALSE, (ArgIniType) SECOND_DIRECTORY }, { "sd", ArgFilename, (void *) &appData.secondDirectory, FALSE, INVALID }, + { "variations", ArgBoolean, (void *) &appData.variations, TRUE, (ArgIniType) FALSE }, /* some options only used by the XBoard front end, and ignored in WinBoard */ /* Their saving is controlled by XBOARD, which in WinBoard is defined as FALSE */ @@ -205,10 +206,13 @@ ArgDescriptor argDescriptors[] = { { "pixmap", ArgFilename, (void *) &appData.pixmapDirectory, FALSE, INVALID }, { "bitmapDirectory", ArgFilename, (void *) &appData.bitmapDirectory, XBOARD, (ArgIniType) "" }, { "bm", ArgFilename, (void *) &appData.bitmapDirectory, FALSE, INVALID }, + { "soundDirectory", ArgFilename, (void *) &appData.soundDirectory, XBOARD, (ArgIniType) "" }, { "msLoginDelay", ArgInt, (void *) &appData.msLoginDelay, XBOARD, (ArgIniType) MS_LOGIN_DELAY }, { "pasteSelection", ArgBoolean, (void *) &appData.pasteSelection, XBOARD, (ArgIniType) FALSE }, { "dropMenu", ArgBoolean, (void *) &appData.dropMenu, TRUE, (ArgIniType) FALSE }, + { "pieceMenu", ArgBoolean, (void *) &appData.pieceMenu, TRUE, (ArgIniType) TRUE }, + { "sweepPromotions", ArgBoolean, (void *) &appData.sweepSelect, TRUE, (ArgIniType) FALSE }, { "remoteShell", ArgFilename, (void *) &appData.remoteShell, FALSE, (ArgIniType) REMOTE_SHELL }, { "rsh", ArgFilename, (void *) &appData.remoteShell, FALSE, INVALID }, { "remoteUser", ArgString, (void *) &appData.remoteUser, FALSE, INVALID }, @@ -453,6 +457,7 @@ ArgDescriptor argDescriptors[] = { { "soundIcsDraw", ArgFilename, (void *) &appData.soundIcsDraw, TRUE, (ArgIniType) "" }, { "soundIcsUnfinished", ArgFilename, (void *) &appData.soundIcsUnfinished, TRUE, (ArgIniType) "" }, { "soundIcsAlarm", ArgFilename, (void *) &appData.soundIcsAlarm, TRUE, (ArgIniType) "" }, + { "disguisePromotedPieces", ArgBoolean, (void *) &appData.disguise, TRUE, (ArgIniType) TRUE }, { "reuseFirst", ArgBoolean, (void *) &appData.reuseFirst, FALSE, (ArgIniType) TRUE }, { "reuse", ArgTrue, (void *) &appData.reuseFirst, FALSE, INVALID }, { "xreuse", ArgFalse, (void *) &appData.reuseFirst, FALSE, INVALID }, @@ -557,8 +562,8 @@ ArgDescriptor argDescriptors[] = { { "pieceToCharTable", ArgString, (void *) &appData.pieceToCharTable, FALSE, INVALID }, { "pieceNickNames", ArgString, (void *) &appData.pieceNickNames, FALSE, INVALID }, { "colorNickNames", ArgString, (void *) &appData.colorNickNames, FALSE, INVALID }, - { "flipBlack", ArgBoolean, (void *) &appData.upsideDown, TRUE, (ArgIniType) FALSE }, - { "allWhite", ArgBoolean, (void *) &appData.allWhite, TRUE, (ArgIniType) FALSE }, + { "flipBlack", ArgBoolean, (void *) &appData.upsideDown, FALSE, (ArgIniType) FALSE }, + { "allWhite", ArgBoolean, (void *) &appData.allWhite, FALSE, (ArgIniType) FALSE }, { "alphaRank", ArgBoolean, (void *) &appData.alphaRank, FALSE, (ArgIniType) FALSE }, { "firstAlphaRank", ArgBoolean, (void *) &first.alphaRank, FALSE, (ArgIniType) FALSE }, { "secondAlphaRank", ArgBoolean, (void *) &second.alphaRank, FALSE, (ArgIniType) FALSE }, @@ -1007,7 +1012,7 @@ ParseArgs(GetFunc get, void *cl) break; case ArgColor: - ParseColor((int)ad->argLoc, argValue); + ParseColor((int)(intptr_t)ad->argLoc, argValue); break; case ArgAttribs: { @@ -1021,7 +1026,7 @@ ParseArgs(GetFunc get, void *cl) break; case ArgFont: - ParseFont(argValue, (int)ad->argLoc); + ParseFont(argValue, (int)(intptr_t)ad->argLoc); break; case ArgCommSettings: @@ -1117,13 +1122,13 @@ SetDefaultsFromList() case ArgBoolean: case ArgTrue: case ArgFalse: - *(Boolean *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue; + *(Boolean *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue; break; case ArgInt: case ArgX: case ArgY: case ArgZ: - *(int *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue; + *(int *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue; break; case ArgString: case ArgFilename: @@ -1131,10 +1136,10 @@ SetDefaultsFromList() *(char **) argDescriptors[i].argLoc = (char *)argDescriptors[i].defaultValue; break; case ArgBoardSize: - *(int *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue; + *(int *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue; break; case ArgColor: - ParseColor((int)argDescriptors[i].argLoc, (char*)argDescriptors[i].defaultValue); + ParseColor((int)(intptr_t)argDescriptors[i].argLoc, (char*)argDescriptors[i].defaultValue); break; case ArgFloat: // floats cannot be casted to int without precision loss default: ; // some arg types cannot be initialized through table