int values[MAX_OPTIONS];
ChessProgramState *currentCps;
+char dataDir[MSG_SIZ] = DATADIR, manDir[MSG_SIZ] = MANDIR;
//----------------------------Generic dialog --------------------------------------------
if(currentCps) {
TidyProgramName(currentCps == &first ? appData.firstChessProgram : appData.secondChessProgram, "localhost", tidy);
snprintf(buf, MSG_SIZ, "/usr/local/share/man/man6/%s.6", tidy);
- } else snprintf(buf, MSG_SIZ, "%s/man6/xboard.6", MANDIR);
+ } else snprintf(buf, MSG_SIZ, "%s/man6/xboard.6", manDir);
f = fopen(buf, "r");
if(!f && currentCps) { // engine manual could be in two places
snprintf(buf, MSG_SIZ, "/usr/share/man/man6/%s.6", tidy);
extern ProcRef cmailPR;
extern int shiftKey, controlKey;
+extern char dataDir[], manDir[];
/* in xgamelist.c or winboard.c */
void GLT_ClearList();
# define IMG ".png"
// redefine some defaults
# undef ICS_LOGON
-# undef DATADIR
-# undef MANDIR
# undef LOCALEDIR
# undef SETTINGS_FILE
# define ICS_LOGON "Library/Preferences/XboardICS.conf"
-# define DATADIR dataDir
-# define MANDIR manDir
# define LOCALEDIR localeDir
# define SETTINGS_FILE masterSettings
# define SYNC_MENUBAR gtkosx_application_sync_menubar(theApp)
- char dataDir[MSG_SIZ]; // for expanding ~~
- char manDir[MSG_SIZ];
char localeDir[MSG_SIZ];
char masterSettings[MSG_SIZ];
#else
typedef struct {char *name, *value; } Config;
static Config configList[] = {
{ "Datadir", DATADIR },
+ { "Mandir", MANDIR },
{ "Sysconfdir", SYSCONFDIR },
{ NULL }
};
{ // [HGM] initstring: kludge to fix bad bug. expand '\n' characters in init string and computer string.
static char buf[MSG_SIZ];
- snprintf(buf, MSG_SIZ, appData.sysOpen, DATADIR);
+ snprintf(buf, MSG_SIZ, appData.sysOpen, dataDir);
ASSIGN(appData.sysOpen, buf); // expand %s in -openCommand to DATADIR (usefull for OS X configuring)
EscapeExpand(buf, appData.firstInitString);
appData.firstInitString = strdup(buf);
if (*s == '~') {
if(s[1] == '~') { // use ~~ for XBoard's private data directory
- snprintf(d, 4*MSG_SIZ, DATADIR "%s", s+2);
+ snprintf(d, 4*MSG_SIZ, "%s%s", dataDir, s+2);
} else
if (*(s+1) == '/') {
safeStrCpy(d, getpwuid(getuid())->pw_dir, 4*MSG_SIZ );