X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=9122282e27481532cfa91c940aa2627a3259b1b4;hb=b8fda05a14b77f791e9646ffd715210aab0e9261;hp=3cea3de9ff89605ee6ea45a902f68c4b0223600e;hpb=ce2d35a73b69934537eb45682a45eda2b8f24b1a;p=xboard.git diff --git a/args.h b/args.h index 3cea3de..9122282 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, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -929,7 +929,7 @@ ParseSettingsFile(char *name, char **addr) MySearchPath(installDir, buf, fullname); // first look in user's own files f = fopen(fullname, "r"); if(f == NULL) { - snprintf(buf, MSG_SIZ, "%s/themes/conf", DATADIR); + snprintf(buf, MSG_SIZ, "%s/themes/conf", dataDir); MySearchPath(buf, name, fullname); // also look in standard place f = fopen(fullname, "r"); } @@ -1169,7 +1169,7 @@ ParseArgs(GetFunc get, void *cl) case ArgFilename: if(argValue[0] == '~' && argValue[1] == '~') { char buf[4*MSG_SIZ]; // expand ~~ - snprintf(buf, 4*MSG_SIZ, "%s%s", DATADIR, argValue+2); + snprintf(buf, 4*MSG_SIZ, "%s%s", dataDir, argValue+2); ASSIGN(*(char **) ad->argLoc, buf); break; } @@ -1463,6 +1463,11 @@ InitAppData(char *lpCmdLine) } else appData.timeIncrement = -1; } if(appData.movesPerSession <= 0) appData.movesPerSession = MOVES_PER_SESSION; // mps <= 0 is invalid in any case + if(*appData.defaultPathEGTB) { // append value of deprecated -defaultPathEGTB to -egtFormats + snprintf(buf, MAX_ARG_LEN, "%s%snalimov:%s", appData.egtFormats, (*appData.egtFormats ?"," : ""), appData.defaultPathEGTB); + ASSIGN(appData.egtFormats, buf); + ASSIGN(appData.defaultPathEGTB, ""); + } /* Open startup dialog if needed */ if ((!appData.noChessProgram && !chessProgram && !appData.icsActive) || @@ -1621,8 +1626,8 @@ SaveSettings(char* name) { char buf[MSG_SIZ]; snprintf(buf, MSG_SIZ, "%s", *(char**)ad->argLoc); #ifdef OSXAPP - if(strstr(buf, DATADIR) == buf) - snprintf(buf, MSG_SIZ, "~~%s", *(char**)ad->argLoc + strlen(DATADIR)); + if(strstr(buf, dataDir) == buf) + snprintf(buf, MSG_SIZ, "~~%s", *(char**)ad->argLoc + strlen(dataDir)); #endif if (strchr(buf, '\"')) { fprintf(f, OPTCHAR "%s" SEPCHAR "'%s'\n", ad->argName, buf);