if(tagsText) free(tagsText); tagsText = strdup(text);
tagsOptions[0].name = msg;
MarkMenu("View.Tags", TagsDlg);
- GenericPopUp(tagsOptions, title, TagsDlg, BoardWindow, NONMODAL, appData.topLevel);
+ GenericPopUp(tagsOptions + (msg == NULL), title, TagsDlg, BoardWindow, NONMODAL, appData.topLevel);
}
void
void
DisplayHelp (char *name)
{
- char *manFile = MANDIR "/man6/xboard.6";
- FILE *f = fopen(manFile, "r");
+ char buf[MSG_SIZ];
+ FILE *f;
+ if(currentCps) snprintf(buf, MSG_SIZ, "/usr/local/share/man/man6/%s.6", currentCps->program);
+ 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", currentCps->program);
+ f= fopen(buf, "r");
+ }
if(f) {
GetHelpText(f, name);
fclose(f);