Some of the LabelOptions in dialogs do have linefeeds. (In particular,
those in the Load Options dialog.) So we allow help clicks on them,
but add linefeed with the termination characters. Except that a leading
linefeed will be clipped off.
{
char *line, buf[MSG_SIZ], title[MSG_SIZ], text[10000], *p = text, *q = text;
int len, cnt = 0;
+ while(*name == '\n') name++;
snprintf(buf, MSG_SIZ, ".B %s", name);
len = strlen(buf);
- for(len=3; buf[len] && buf[len] != '(' && buf[len] != ':' && buf[len] != '.' && buf[len] != '?'; len++);
+ for(len=3; buf[len] && buf[len] != '(' && buf[len] != ':' && buf[len] != '.' && buf[len] != '?' && buf[len] != '\n'; len++);
buf[len] = NULLCHAR;
while(buf[--len] == ' ') buf[len] = NULLCHAR;
snprintf(title, MSG_SIZ, "Help on '%s'", buf+3);