X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b63b07a809f9a3d22596d4971ef5c8971153823a..3903f408241aedc3b2f5e24349d0ac939ba9164c:/utils/tex2rtf/src/xlputils.cpp diff --git a/utils/tex2rtf/src/xlputils.cpp b/utils/tex2rtf/src/xlputils.cpp index 375e0a86c6..39408d8966 100644 --- a/utils/tex2rtf/src/xlputils.cpp +++ b/utils/tex2rtf/src/xlputils.cpp @@ -10,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -113,7 +109,7 @@ void XLPOnMacro(int macroId, int no_args, bool start) if (macroId != ltSECTIONSTAR) sectionNo ++; - + SetCurrentOutputs(Chapters, Sections); long id1 = NewBlockId(); currentBlockId = NewBlockId(); @@ -399,7 +395,7 @@ void XLPOnMacro(int macroId, int no_args, bool start) } break; } - } + } } } break; @@ -434,7 +430,7 @@ void XLPOnMacro(int macroId, int no_args, bool start) int ch = getc(fd); while (ch != EOF) { - putc(ch, Chapters); + wxPutc(ch, Chapters); ch = getc(fd); } fclose(fd); @@ -659,7 +655,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start) if (start) { wxChar *sec = NULL; - + wxChar *refName = GetArgData(); if (refName) { @@ -698,7 +694,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start) wxChar *label = GetArgData(); hyperLinks.Append(currentBlockId, (wxObject *)copystring(label)); } - + return false; } break; @@ -1142,7 +1138,7 @@ bool XLPGo(void) { xlpBlockId = 0; - if (InputFile && OutputFile) + if (!InputFile.empty() && !OutputFile.empty()) { Contents = wxFopen(TmpContentsName, _T("w")); Chapters = wxFopen(_T("chapters.xlp"), _T("w")); @@ -1213,4 +1209,3 @@ bool XLPGo(void) } return false; } -