winhelp: Remember last added page.
This commit is contained in:
parent
8e639ec392
commit
6af0e45d79
|
@ -443,15 +443,14 @@ static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigned off
|
||||||
|
|
||||||
if (hlpfile->first_page)
|
if (hlpfile->first_page)
|
||||||
{
|
{
|
||||||
HLPFILE_PAGE *p;
|
hlpfile->last_page->next = page;
|
||||||
|
page->prev = hlpfile->last_page;
|
||||||
for (p = hlpfile->first_page; p->next; p = p->next);
|
hlpfile->last_page = page;
|
||||||
page->prev = p;
|
|
||||||
p->next = page;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hlpfile->first_page = page;
|
hlpfile->first_page = page;
|
||||||
|
hlpfile->last_page = page;
|
||||||
page->prev = NULL;
|
page->prev = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,9 +888,8 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
|
||||||
unsigned short bits;
|
unsigned short bits;
|
||||||
unsigned nc, ncol = 1;
|
unsigned nc, ncol = 1;
|
||||||
|
|
||||||
if (!hlpfile->first_page) {WINE_WARN("no page\n"); return FALSE;};
|
if (!hlpfile->last_page) {WINE_WARN("no page\n"); return FALSE;};
|
||||||
|
page = hlpfile->last_page;
|
||||||
for (page = hlpfile->first_page; page->next; page = page->next) /* Nothing */;
|
|
||||||
for (paragraphptr = &page->first_paragraph; *paragraphptr;
|
for (paragraphptr = &page->first_paragraph; *paragraphptr;
|
||||||
paragraphptr = &(*paragraphptr)->next) /* Nothing */;
|
paragraphptr = &(*paragraphptr)->next) /* Nothing */;
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,7 @@ typedef struct tagHlpFileFile
|
||||||
LPSTR lpszTitle;
|
LPSTR lpszTitle;
|
||||||
LPSTR lpszCopyright;
|
LPSTR lpszCopyright;
|
||||||
HLPFILE_PAGE* first_page;
|
HLPFILE_PAGE* first_page;
|
||||||
|
HLPFILE_PAGE* last_page;
|
||||||
HLPFILE_MACRO* first_macro;
|
HLPFILE_MACRO* first_macro;
|
||||||
BYTE* Context;
|
BYTE* Context;
|
||||||
BYTE* kwbtree;
|
BYTE* kwbtree;
|
||||||
|
|
Loading…
Reference in New Issue