X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=args.h;h=9122282e27481532cfa91c940aa2627a3259b1b4;hb=b8fda05a14b77f791e9646ffd715210aab0e9261;hp=56d9916804f119c48ab97fdce21bff5a5942203c;hpb=ebd7f78161504e46896f7d96bb41e29714b2fd53;p=xboard.git diff --git a/args.h b/args.h index 56d9916..9122282 100644 --- a/args.h +++ b/args.h @@ -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);