From 18e4257b27b685b75ac92a6820ee335136ede86b Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 17 Mar 2016 00:01:25 +0100 Subject: [PATCH] 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. --- dialogs.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) 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++; -- 1.7.0.4