if ( combineSubSections && !subsectionStarted )
{
+ fflush(Sections);
+
// Read old .con file in at this point
wxChar buf[256];
wxStrcpy(buf, CurrentSectionFile);
int ch = getc(fd);
while (ch != EOF)
{
- putc(ch, Sections);
+ wxPutc(ch, Sections);
ch = getc(fd);
}
fclose(fd);
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
- HTMLHead();
+ HTMLHead();
TexOutput(_T("<title>"));
OutputCurrentSection();
TexOutput(_T("</title></head>\n"));
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
- HTMLHead();
+ HTMLHead();
TexOutput(_T("<title>"));
OutputCurrentSection();
TexOutput(_T("</title></head>\n"));
else
wxSnprintf(buf, sizeof(buf), _T("\n<TD ALIGN=LEFT>"));
TexOutput(buf);
- OutputFont();
+ OutputFont();
}
else
TexOutput(_T("&"));
else
wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=LEFT>"));
TexOutput(buf);
- OutputFont();
+ OutputFont();
}
else
{
{
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)
{
int ch = getc(fd);
while (ch != EOF)
{
- putc(ch, Titlepage);
+ wxPutc(ch, Titlepage);
ch = getc(fd);
}
fclose(fd);
+ fflush(Titlepage);
}
else
{
// If a filename is supplied, use it, otherwise try to
// use the filename associated with the reference (from this document).
if (helpRefFilename)
- {
+ {
TraverseChildrenFromChunk(helpRefFilename);
TexOutput(_T("#"));
- }
+ }
else if (refFilename)
- {
+ {
TexOutput(ConvertCase(refFilename));
TexOutput(_T("#"));
- }
+ }
TexOutput(refName);
TexOutput(_T("\">"));
if (helpRefText)
// If we have found the existing filename, make the inline
// image point to the original file (could be PS, for example)
if (originalFilename && (wxStrcmp(inlineFilename, originalFilename) != 0))
- {
+ {
TexOutput(_T("<A HREF=\""));
TexOutput(ConvertCase(originalFilename));
TexOutput(_T("\">"));
TexOutput(_T("\""));
TexOutput(alignment);
TexOutput(_T("></A>"));
- }
+ }
else
#endif
- {
+ {
TexOutput(_T("<img src=\""));
TexOutput(ConvertCase(wxFileNameFromPath(inlineFilename)));
TexOutput(_T("\""));
TexOutput(alignment);
TexOutput(_T(">"));
delete[] inlineFilename;
- }
+ }
}
else
{
{
if ( start ) {
// DHS
- if (TwoColWidthA > -1) {
+ if (TwoColWidthA > -1)
+ {
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("\n<TR><TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthA);
TexOutput(buf);
- } else
+ }
+ else
+ {
TexOutput(_T("\n<TR><TD VALIGN=TOP>\n"));
- OutputFont();
+ }
+ OutputFont();
} else
TexOutput(_T("\n</FONT></TD>\n"));
}
if (arg_no == 2)
{
// DHS
- if ( start ) {
- if (TwoColWidthB > -1) {
+ if ( start )
+ {
+ if (TwoColWidthB > -1)
+ {
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("\n<TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthB);
TexOutput(buf);
- } else
- TexOutput(_T("\n<TD VALIGN=TOP>\n"));
- OutputFont();
+ }
+ else
+ {
+ TexOutput(_T("\n<TD VALIGN=TOP>\n"));
+ }
+ OutputFont();
} else
TexOutput(_T("\n</FONT></TD></TR>\n"));
}
if (compatibilityMode)
{
TexOutput(_T("<TR>\n<TD>"));
- OutputFont();
+ OutputFont();
/*
for (int i = 0; i < noColumns; i++)
{
{
wxStrcpy(buf2, _T("#000000"));
wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
+ wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
OnError(buf);
}
TexOutput(_T("<FONT COLOR=\""));
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
- HTMLHead();
- TexOutput(_T("\n<HEAD><TITLE>"));
+ HTMLHead();
+ TexOutput(_T("\n<TITLE>"));
TraverseChildrenFromChunk(DocumentTitle);
TexOutput(_T("</TITLE></HEAD>\n"));
}
else
{
SetCurrentOutput(tmpTitle);
- HTMLHeadTo(tmpTitle);
+ HTMLHeadTo(tmpTitle);
if (contentsString)
wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), contentsString);
else
// Output <BODY...> to temporary title page
OutputBodyStart();
+ fflush(tmpTitle);
// Concat titlepage
FILE *fd = wxFopen(TitlepageName, _T("r"));
int ch = getc(fd);
while (ch != EOF)
{
- putc(ch, tmpTitle);
+ wxPutc(ch, tmpTitle);
ch = getc(fd);
}
fclose(fd);
_T(" <param name=\"Local\" value=\"%s#%s\">\n")
_T(" <param name=\"Name\" value=\"%s\">\n")
_T(" </OBJECT>\n"),
- texTopic->filename, topicName, s);
+ texTopic->filename, topicName, s);
node1 = node1->GetNext();
}
}
_T(" <LI> <OBJECT type=\"text/sitemap\">\n")
_T(" <param name=\"Local\" value=\"%s#%s\">\n")
_T(" <param name=\"Name\" value=\""),
- file, s);
+ file, s);
OutputCurrentSection();
wxFprintf(HTMLWorkshopContents,
- _T("\">\n")
+ _T("\">\n")
_T(" </OBJECT>\n"));
HTMLWorkshopLastLevel = level;
}