X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=0822aa70ea0c740ad2a3278ff4a82ff80612eae0;hb=a90c45ee54a358b17fa4d006417bab8c6cf8657e;hp=82d957124e4a368d5a64b066b79b7665fd1ac1e6;hpb=4b0f536ec8bd8b8b481fa267194fe283c00fdcb7;p=xboard.git diff --git a/args.h b/args.h index 82d9571..0822aa7 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 * @@ -206,6 +206,7 @@ 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 }, @@ -1009,7 +1010,7 @@ ParseArgs(GetFunc get, void *cl) break; case ArgColor: - ParseColor((int)ad->argLoc, argValue); + ParseColor((int)(intptr_t)ad->argLoc, argValue); break; case ArgAttribs: { @@ -1023,7 +1024,7 @@ ParseArgs(GetFunc get, void *cl) break; case ArgFont: - ParseFont(argValue, (int)ad->argLoc); + ParseFont(argValue, (int)(intptr_t)ad->argLoc); break; case ArgCommSettings: @@ -1119,13 +1120,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: @@ -1133,10 +1134,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