From: Julian Smart Date: Sun, 6 Jun 2004 11:27:52 +0000 (+0000) Subject: Partial fix for out of order sections, by adding fflush X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/af318c88de8bf297636285b747672517ee03ebe0 Partial fix for out of order sections, by adding fflush git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index c3233630b7..5b357eda1a 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -874,6 +874,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) if ( combineSubSections && !subsectionStarted ) { + fflush(Sections); + // Read old .con file in at this point wxChar buf[256]; wxStrcpy(buf, CurrentSectionFile); @@ -1649,6 +1651,11 @@ void HTMLOnMacro(int macroId, int no_args, bool start) { if (start) { + // NB: if this is uncommented, the table of contents + // completely disappears. If left commented, it's in the wrong + // place. + //fflush(Titlepage); + FILE *fd = wxFopen(ContentsName, _T("r")); if (fd) { @@ -1659,6 +1666,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start) ch = getc(fd); } fclose(fd); + fflush(Titlepage); } else { @@ -3024,7 +3032,7 @@ bool HTMLGo(void) { SetCurrentOutput(tmpTitle); HTMLHead(); - TexOutput(_T("\n")); + TexOutput(_T("\n<TITLE>")); TraverseChildrenFromChunk(DocumentTitle); TexOutput(_T("\n")); } @@ -3058,6 +3066,7 @@ bool HTMLGo(void) // Output to temporary title page OutputBodyStart(); + fflush(tmpTitle); // Concat titlepage FILE *fd = wxFopen(TitlepageName, _T("r"));