From: H.G.Muller Date: Wed, 16 Mar 2016 23:01:25 +0000 (+0100) Subject: Also recognize .IX lines in man file for help clicks X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=18e4257b27b685b75ac92a6820ee335136ede86b;p=xboard.git Also recognize .IX lines in man file for help clicks Beside .B and .SS directives, which tend to mark item headers in the XBoard manual page, ".IX item" lines are now also recognized. Such lines are produced by pod2man for =item directives in the .pod file. --- diff --git a/dialogs.c b/dialogs.c index 4dce7f4..c939ea5 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2477,8 +2477,9 @@ GetHelpText (FILE *f, char *name) while(buf[--len] == ' ') buf[len] = NULLCHAR; snprintf(title, MSG_SIZ, "Help on '%s'", buf+3); while((line = ReadLine(f))) { - if(!strncmp(line, buf, len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3)) { - while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3) && strncmp(line, ".SS ", 4))) { + if(!strncmp(line, buf, len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3) + || !strncmp(line, ".IX Item \"", 10) && !strncmp(line+10, buf+3, len-3)) { + while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3) && strncmp(line, ".SS ", 4) && strncmp(line, ".IX ", 4))) { if(!*line) { *p++ = '\n'; *p++ = '\n'; q = p; continue; } if(*line == '.') continue; *p++ = ' '; cnt++;