xboard_TEXINFOS = copyright.texi
man6_MANS = xboard.man
+install-data-local: $(srcdir)/xboard.conf
+ $(INSTALL_DATA) $(srcdir)/xboard.conf $(DESTDIR)/etc/xboard
+
xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi
$(srcdir)/texi2man $(srcdir)/xboard.texi > xboard.man || (rm -f xboard.man ; false)
if ((strchr(p, '\\') || strchr(p, '\n')) && !strchr(p, '}')) {
/* Quote multiline values or \-containing values
with { } if possible */
- fprintf(f, "/%s={%s}\n", ad->argName, p);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "{%s}\n", ad->argName, p);
} else {
/* Else quote with " " */
- fprintf(f, "/%s=\"", ad->argName);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "\"", ad->argName);
while (*p) {
if (*p == '\n') fprintf(f, "\n");
else if (*p == '\r') fprintf(f, "\\r");
break;
case ArgInt:
case ArgZ:
- fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%d\n", ad->argName, *(int *)ad->argLoc);
break;
case ArgX:
- fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc - wpMain.x); // [HGM] placement: stor relative value
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%d\n", ad->argName, *(int *)ad->argLoc - wpMain.x); // [HGM] placement: store relative value
break;
case ArgY:
- fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc - wpMain.y);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%d\n", ad->argName, *(int *)ad->argLoc - wpMain.y);
break;
case ArgFloat:
- fprintf(f, "/%s=%g\n", ad->argName, *(float *)ad->argLoc);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%g\n", ad->argName, *(float *)ad->argLoc);
break;
case ArgBoolean:
- fprintf(f, "/%s=%s\n", ad->argName,
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName,
(*(Boolean *)ad->argLoc) ? "true" : "false");
break;
case ArgTrue:
- if (*(Boolean *)ad->argLoc) fprintf(f, "/%s\n", ad->argName);
+ if (*(Boolean *)ad->argLoc) fprintf(f, OPTCHAR "%s\n", ad->argName);
break;
case ArgFalse:
- if (!*(Boolean *)ad->argLoc) fprintf(f, "/%s\n", ad->argName);
+ if (!*(Boolean *)ad->argLoc) fprintf(f, OPTCHAR "%s\n", ad->argName);
break;
case ArgColor:
SaveColor(f, ad);
case ArgFilename:
if(*(char**)ad->argLoc == NULL) break; // just in case
if (strchr(*(char **)ad->argLoc, '\"')) {
- fprintf(f, "/%s='%s'\n", ad->argName, *(char **)ad->argLoc);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "'%s'\n", ad->argName, *(char **)ad->argLoc);
} else {
- fprintf(f, "/%s=\"%s\"\n", ad->argName, *(char **)ad->argLoc);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "\"%s\"\n", ad->argName, *(char **)ad->argLoc);
}
break;
case ArgBoardSize:
#define ICS_TEXT_MENU_SIZE (IDM_CommandXLast - IDM_CommandX + 1)\r
#define XBOARD FALSE\r
\r
+#define OPTCHAR "/"\r
+#define SEPCHAR "="\r
+\r
#include "args.h"\r
\r
// front-end part of option handling\r
#define ICS_TEXT_MENU_SIZE 90
#define SetCurrentDirectory chdir
#define GetCurrentDirectory(SIZE, NAME) getcwd(NAME, SIZE)
+#define OPTCHAR "-"
+#define SEPCHAR " "
// these two must some day move to frontend.h, when they are implemented
Boolean EvalGraphIsUp();
default:
return;
}
- fprintf(f, "/%s=%s\n", ad->argName, name);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, name);
}
void
void
SaveAttribsArg(FILE *f, ArgDescriptor *ad)
{ // here the "argLoc" defines a table index. It could have contained the 'ta' pointer itself, though
- fprintf(f, "/%s=%s\n", ad->argName, (&appData.colorShout)[(int)ad->argLoc]);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, (&appData.colorShout)[(int)ad->argLoc]);
}
void
SaveColor(FILE *f, ArgDescriptor *ad)
{ // in WinBoard the color is an int and has to be converted to text. In X it would be a string already?
if(colorVariable[(int)ad->argLoc])
- fprintf(f, "/%s=%s\n", ad->argName, *(char**)colorVariable[(int)ad->argLoc]);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, *(char**)colorVariable[(int)ad->argLoc]);
}
void
SaveBoardSize(FILE *f, char *name, void *addr)
{ // wrapper to shield back-end from BoardSize & sizeInfo
- fprintf(f, "/%s=%s\n", name, appData.boardSize);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", name, appData.boardSize);
}
void
--- /dev/null
+;
+; xboard 4.4.1.20091022 Save Settings file
+;
+; This file contains the system-wide settings of XBoard, in so far they
+; deviate from the compiled-in defaults, and are not settable through menus,
+; to comfort users that have no history of xboard usage.
+; You can edit the values of options that are already set in this file,
+; or add other options that you think are convenient as defaults for all users.
+; This file is not automatically overwritten, because it redefines the
+; -saveSettingsFile to .xboardrc in the user's home directory, so that
+; user settings will be saved in a place the user has write access to.
+;
+; Looks
+;
+-internetChessServerInputBox false
+-titleInWindow false
+-showButtonBar true
+-moveHistoryUp false
+-evalGraphUp false
+-engineOutputUp false
+-monoMode false
+-flashCount 0
+-flashRate 5
+-fontSizeTolerance 4
+-clockFont -adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1
+-font -adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1
+-coordFont -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
+-pixmapDirectory ""
+-bitmapDirectory ""
+;
+; Behavior
+;
+-soundProgram "aplay -q"
+-pasteSelection false
+-keepLineBreaksICS false
+-timeDelay 1
+-autoDisplayComment true
+-autoDisplayTags true
+-lowTimeWarning false
+-icsAlarm false
+-icsAlarmTime 5000
+-msLoginDelay 0
+-delayBeforeQuit 0
+-delayAfterQuit 0
+;
+; PGN format & Game List
+;
+-pgnExtendedInfo true
+-saveOutOfBookInfo true
+-gameListTags "eprd"
+;
+; Engines & adjudicatons in engine-engine games
+;
+-firstChessProgram fairymax
+-secondChessProgram fairymax
+-niceEngines 0
+-polyglotDir ""
+-defaultPathEGTB "/egtb"
+-egtFormats ""
+-testClaims true
+-checkMates true
+-materialDraws true
+-trivialDraws false
+;
+; Save user settings.
+; Must be last in file to make user options prevail over system-wide settings!
+;
+-saveSettingsOnExit true
+-saveSettingsFile "~/.xboardrc"
+-settingsFile "~/.xboardrc"
+