mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:11:01 +00:00
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)
|
||||
{
|
||||
HLPFILE_PAGE *p;
|
||||
|
||||
for (p = hlpfile->first_page; p->next; p = p->next);
|
||||
page->prev = p;
|
||||
p->next = page;
|
||||
hlpfile->last_page->next = page;
|
||||
page->prev = hlpfile->last_page;
|
||||
hlpfile->last_page = page;
|
||||
}
|
||||
else
|
||||
{
|
||||
hlpfile->first_page = page;
|
||||
hlpfile->last_page = page;
|
||||
page->prev = NULL;
|
||||
}
|
||||
|
||||
|
@ -889,9 +888,8 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
|
|||
unsigned short bits;
|
||||
unsigned nc, ncol = 1;
|
||||
|
||||
if (!hlpfile->first_page) {WINE_WARN("no page\n"); return FALSE;};
|
||||
|
||||
for (page = hlpfile->first_page; page->next; page = page->next) /* Nothing */;
|
||||
if (!hlpfile->last_page) {WINE_WARN("no page\n"); return FALSE;};
|
||||
page = hlpfile->last_page;
|
||||
for (paragraphptr = &page->first_paragraph; *paragraphptr;
|
||||
paragraphptr = &(*paragraphptr)->next) /* Nothing */;
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ typedef struct tagHlpFileFile
|
|||
LPSTR lpszTitle;
|
||||
LPSTR lpszCopyright;
|
||||
HLPFILE_PAGE* first_page;
|
||||
HLPFILE_PAGE* last_page;
|
||||
HLPFILE_MACRO* first_macro;
|
||||
BYTE* Context;
|
||||
BYTE* kwbtree;
|
||||
|
|
Loading…
Reference in a new issue