X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f9975410ff186cd35dc770a5981950f0c861f70..d7e0343413296e8719386abbcb55ecbc4dceba36:/utils/tex2rtf/src/xlputils.cpp diff --git a/utils/tex2rtf/src/xlputils.cpp b/utils/tex2rtf/src/xlputils.cpp index e29328aad1..1a56cd04d9 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" @@ -28,10 +24,8 @@ #include "tex2rtf.h" #include -#if !WXWIN_COMPATIBILITY_2_4 static inline wxChar* copystring(const wxChar* s) { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); } -#endif long currentBlockId = -1; static TexChunk *descriptionItemArg = NULL; @@ -113,7 +107,7 @@ void XLPOnMacro(int macroId, int no_args, bool start) if (macroId != ltSECTIONSTAR) sectionNo ++; - + SetCurrentOutputs(Chapters, Sections); long id1 = NewBlockId(); currentBlockId = NewBlockId(); @@ -659,7 +653,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start) if (start) { wxChar *sec = NULL; - + wxChar *refName = GetArgData(); if (refName) { @@ -698,7 +692,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start) wxChar *label = GetArgData(); hyperLinks.Append(currentBlockId, (wxObject *)copystring(label)); } - + return false; } break; @@ -1142,7 +1136,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 +1207,3 @@ bool XLPGo(void) } return false; } -