X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=d57b5769c18732e931761e39d29d5756f5e9e5c1;hb=c4709fa28f09b91b7d36c17cce477b7b9b498e6e;hp=6ecdcaf7b1a0b966134b4afd5efbcf41866dc0e3;hpb=9d32c01d675cb8e6a95a9492b1d9eb274653e1ca;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 6ecdcaf..d57b576 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2491,8 +2491,14 @@ GetHelpText (FILE *f, char *name) void DisplayHelp (char *name) { - char *manFile = MANDIR "/man6/xboard.6"; - FILE *f = fopen(manFile, "r"); + char buf[MSG_SIZ], *manFile = MANDIR "/man6/xboard.6"; + FILE *f; + if(currentCps) snprintf(manFile = buf, MSG_SIZ, "/usr/share/man/man6/%s.6", currentCps->program); + f = fopen(manFile, "r"); + if(!f && currentCps) { // engine manual could be in two places + snprintf(buf, MSG_SIZ, "/usr/man/man6/%s.6", currentCps->program); + f= fopen(buf, "r"); + } if(f) { GetHelpText(f, name); fclose(f);