- // Create a temporary file for the title page header, add some info,
- // and concat the titlepage just generated.
- // This is necessary in order to put the title of the document
- // at the TOP of the file within <HEAD>, even though we only find out
- // what it is later on.
- FILE *tmpTitle = wxFopen(_T("title.tmp"), _T("w"));
- if (tmpTitle)
- {
- if (DocumentTitle)
- {
- SetCurrentOutput(tmpTitle);
- HTMLHead();
- TexOutput(_T("\n<TITLE>"));
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("</TITLE></HEAD>\n"));
- }
- else
- {
- SetCurrentOutput(tmpTitle);
- HTMLHeadTo(tmpTitle);
- if (contentsString)
- wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), contentsString);
- else
- wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), wxFileNameFromPath(FileRoot));
- }
+ if (FrameContents)
+ {
+ wxFprintf(FrameContents, _T("\n</UL>\n"));
+ wxFprintf(FrameContents, _T("</HTML>\n"));
+ fclose(FrameContents);
+ FrameContents = NULL;
+ }