Windows Help backend was only accepting \cfg{winhelp-filename} if it
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 May 2004 11:39:01 +0000 (11:39 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 3 May 2004 11:39:01 +0000 (11:39 +0000)
had a parent pointer (owing to putting the test inside the wrong if
block). This meant that the fake config directive added by
--winhelp=foo.hlp worked fine, but the one at the top of PuTTY's
first doc file didn't. Fixed.

git-svn-id: svn://svn.tartarus.org/sgt/halibut@4190 cda61777-01e9-0310-a592-d414129be87e

bk_whlp.c

index d11fd22..b146f94 100644 (file)
--- a/bk_whlp.c
+++ b/bk_whlp.c
@@ -97,8 +97,8 @@ void whlp_backend(paragraph *sourceform, keywordlist *keywords,
     filename = dupstr("output.hlp");
     for (p = sourceform; p; p = p->next) {
        p->private_data = NULL;
-       if (p->type == para_Config && p->parent) {
-           if (!ustricmp(p->keyword, L"winhelp-topic")) {
+       if (p->type == para_Config) {
+           if (p->parent && !ustricmp(p->keyword, L"winhelp-topic")) {
                char *topicname;
                whlp_convert(uadv(p->keyword), 0, &topicname, 0);
                /* Store the topic name in the private_data field of the