X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxboard.c;h=a94431335283f0de951f65d4338cf911939bd054;hb=51e9503489f2cee28a076bf52c56185a5283b069;hp=1b13b7ce896ad4714c6e8060429535ffcfc8f9e4;hpb=9ca523a5b93999a5bd327ab44f6829622d40c557;p=xboard.git diff --git a/xaw/xboard.c b/xaw/xboard.c index 1b13b7c..a944313 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -203,6 +203,7 @@ extern char *getenv(); #include "gettext.h" #include "draw.h" +#define SLASH '/' #ifdef __EMX__ #ifndef HAVE_USLEEP @@ -638,6 +639,12 @@ GetActualPlacement (Widget wg, WindowPlacement *wp) } void +GetPlacement (DialogClass dlg, WindowPlacement *wp) +{ // wrapper to shield back-end from widget type + if(shellUp[dlg]) GetActualPlacement(shells[dlg], wp); +} + +void GetWindowCoords () { // wrapper to shield use of window handles from back-end (make addressible by number?) // In XBoard this will have to wait until awareness of window parameters is implemented @@ -989,6 +996,23 @@ main (int argc, char **argv) exit(0); } + if(argc > 1 && !strcmp(argv[1], "--show-config")) { // [HGM] install: called to print config info + typedef struct {char *name, *value; } Config; + static Config configList[] = { + { "Datadir", DATADIR }, + { "Sysconfdir", SYSCONFDIR }, + { NULL } + }; + int i; + + for(i=0; configList[i].name; i++) { + if(argc > 2 && strcmp(argv[2], configList[i].name)) continue; + if(argc > 2) printf("%s", configList[i].value); + else printf("%-12s: %s\n", configList[i].name, configList[i].value); + } + exit(0); + } + programName = strrchr(argv[0], '/'); if (programName == NULL) programName = argv[0];