diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-06-02 19:19:12 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-06-02 19:19:12 +0000 |
| commit | 9e8ca006788e2148154711e1e67b88f495d94e26 (patch) | |
| tree | b3886338af0052ddf9dfbd6eb7212e317eb2bea5 /bk_whlp.c | |
| parent | 9c7ee9bd5c91b41792c40e12669b43aceea2a544 (diff) | |
| download | halibut-9e8ca006788e2148154711e1e67b88f495d94e26.zip halibut-9e8ca006788e2148154711e1e67b88f495d94e26.tar.gz halibut-9e8ca006788e2148154711e1e67b88f495d94e26.tar.bz2 halibut-9e8ca006788e2148154711e1e67b88f495d94e26.tar.xz | |
Introduce global (cross-backend) \cfg{contents} and \cfg{index}
commands, allowing the fixed words "Contents" and "Index" generated
in various output formats to be reconfigured into other languages.
[originally from svn r6724]
Diffstat (limited to 'bk_whlp.c')
| -rw-r--r-- | bk_whlp.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -24,6 +24,7 @@ struct bk_whlp_state { typedef struct { int charset; wchar_t *bullet, *lquote, *rquote, *titlepage, *sectsuffix, *listsuffix; + wchar_t *contents_text; char *filename; } whlpconf; @@ -73,6 +74,7 @@ static whlpconf whlp_configure(paragraph *source) { 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"."; @@ -122,6 +124,8 @@ static whlpconf whlp_configure(paragraph *source) { ret.lquote = uadv(p->keyword); ret.rquote = uadv(ret.lquote); } + } else if (!ustricmp(p->keyword, L"contents")) { + ret.contents_text = uadv(p->keyword); } } } @@ -314,9 +318,13 @@ void whlp_backend(paragraph *sourceform, keywordlist *keywords, /* ------------------------------------------------------------------ * Begin the contents page. */ - - whlp_begin_topic(h, contents_topic, "Contents", "DB(\"btn_up\")", NULL); - state.curr_topic = contents_topic; + { + 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 |