void
DisplayHelp (char *name)
{
+ static char *xboardMan;
char buf[MSG_SIZ], tidy[MSG_SIZ];
FILE *f;
+ if(!xboardMan) {
+ xboardMan = BufferCommandOutput("man -w xboard", MSG_SIZ); // obtain path to XBoard's man file
+ if(xboardMan) xboardMan[strlen(xboardMan)-1] = NULLCHAR; // strip off traling linefeed
+ }
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", xboardMan);
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);