typedef struct {
int charset;
wchar_t *bullet, *lquote, *rquote, *titlepage, *sectsuffix, *listsuffix;
+ wchar_t *contents_text;
char *filename;
} whlpconf;
ret.rquote = uadv(ret.lquote);
ret.filename = dupstr("output.hlp");
ret.titlepage = L"Title page";
+ ret.contents_text = L"Contents";
ret.sectsuffix = L": ";
ret.listsuffix = L".";
ret.lquote = uadv(p->keyword);
ret.rquote = uadv(ret.lquote);
}
+ } else if (!ustricmp(p->keyword, L"contents")) {
+ ret.contents_text = uadv(p->keyword);
}
}
}
}
state.cntfp = fopen(cntname, "wb");
+ if (!state.cntfp) {
+ error(err_cantopenw, cntname);
+ return;
+ }
state.cnt_last_level = -1; state.cnt_workaround = 0;
/*
/* ------------------------------------------------------------------
* Begin the contents page.
*/
-
- whlp_begin_topic(h, contents_topic, "Contents", "DB(\"btn_up\")", NULL);
+ {
+ rdstringc rs = {0, 0, NULL};
+ whlp_rdadds(&rs, conf.contents_text, &conf, NULL);
+ whlp_begin_topic(h, contents_topic, rs.text, "DB(\"btn_up\")", NULL);
+ state.curr_topic = contents_topic;
+ sfree(rs.text);
+ }
/*
* The manual title goes in the non-scroll region, and also
whlp_navmenu(&state, p, &conf);
}
- state.curr_topic = contents_topic;
-
done_contents_topic = TRUE;
}