]> git.saurik.com Git - wxWidgets.git/commitdiff
Partial fix for out of order sections, by adding fflush
authorJulian Smart <julian@anthemion.co.uk>
Sun, 6 Jun 2004 11:27:52 +0000 (11:27 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 6 Jun 2004 11:27:52 +0000 (11:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/tex2rtf/src/htmlutil.cpp

index c3233630b791dbeefbee1d08d9db5b6442659d5e..5b357eda1a7e5893c3993506ad621d3b75a47fa6 100644 (file)
@@ -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<HEAD><TITLE>"));
+        TexOutput(_T("\n<TITLE>"));
         TraverseChildrenFromChunk(DocumentTitle);
         TexOutput(_T("</TITLE></HEAD>\n"));
       }
@@ -3058,6 +3066,7 @@ bool HTMLGo(void)
 
       // Output <BODY...> to temporary title page
       OutputBodyStart();
+      fflush(tmpTitle);
 
       // Concat titlepage
       FILE *fd = wxFopen(TitlepageName, _T("r"));