X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/610c6dedc1a57171268c936147ae902c76f4505f..1af5934b54a758ad09bd17c13f0d3d2a38d16a77:/utils/tex2rtf/src/tex2rtf.cpp diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index 425b828075..50b4466234 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -25,8 +25,8 @@ #endif #ifndef NO_GUI -#include -#include +#include "wx/help.h" +#include "wx/timer.h" #endif #if defined(NO_GUI) || defined(__UNIX__) @@ -119,7 +119,7 @@ char *ContentsName = NULL; // Contents page from last time around char *TmpContentsName = NULL; // Current contents page char *TmpFrameContentsName = NULL; // Current frame contents page char *WinHelpContentsFileName = NULL; // WinHelp .cnt file -char *RefName = NULL; // Reference file name +char *RefFileName = NULL; // Reference file name char *RTFCharset = copystring("ansi"); @@ -161,7 +161,7 @@ bool MyApp::OnInit() TmpContentsName = new char[300]; TmpFrameContentsName = new char[300]; WinHelpContentsFileName = new char[300]; - RefName = new char[300]; + RefFileName = new char[300]; ColourTable.DeleteContents(TRUE); @@ -192,7 +192,7 @@ bool MyApp::OnInit() if (!InputFile || !OutputFile) { - cout << "Tex2RTF: input or output file is missing.\n"; + wxSTD cout << "Tex2RTF: input or output file is missing.\n"; ShowOptions(); exit(1); } @@ -530,10 +530,10 @@ int MyApp::OnExit() delete WinHelpContentsFileName; WinHelpContentsFileName = NULL; } - if (RefName) + if (RefFileName) { - delete RefName; - RefName = NULL; + delete RefFileName; + RefFileName = NULL; } if (TopLevel) { @@ -954,7 +954,7 @@ bool Go(void) sprintf(TmpContentsName, "%s.cn1", FileRoot); sprintf(TmpFrameContentsName, "%s.frc", FileRoot); sprintf(WinHelpContentsFileName, "%s.cnt", FileRoot); - sprintf(RefName, "%s.ref", FileRoot); + sprintf(RefFileName, "%s.ref", FileRoot); TexPathList.EnsureFileAccessible(InputFile); if (!bulletFile) @@ -967,8 +967,8 @@ bool Go(void) } } - if (wxFileExists(RefName)) - ReadTexReferences(RefName); + if (wxFileExists(RefFileName)) + ReadTexReferences(RefFileName); bool success = FALSE; @@ -1027,7 +1027,7 @@ bool Go(void) if (success) { - WriteTexReferences(RefName); + WriteTexReferences(RefFileName); TexCleanUp(); startedSections = FALSE; @@ -1075,21 +1075,21 @@ bool Go(void) return FALSE; } -void OnError(char *msg) +void OnError(const char *msg) { errorCount++; #ifdef NO_GUI - cerr << "Error: " << msg << "\n"; - cerr.flush(); + wxSTD cerr << "Error: " << msg << "\n"; + wxSTD cerr.flush(); #else if (isInteractive && frame) (*frame->textWindow) << "Error: " << msg << "\n"; else #ifdef __UNIX__ { - cerr << "Error: " << msg << "\n"; - cerr.flush(); + wxSTD cerr << "Error: " << msg << "\n"; + wxSTD cerr.flush(); } #endif @@ -1100,11 +1100,11 @@ void OnError(char *msg) #endif // NO_GUI } -void OnInform(char *msg) +void OnInform(const char *msg) { #ifdef NO_GUI - cout << msg << "\n"; - cout.flush(); + wxSTD cout << msg << "\n"; + wxSTD cout.flush(); #else if (isInteractive && frame) (*frame->textWindow) << msg << "\n"; @@ -1116,8 +1116,8 @@ void OnInform(char *msg) else #ifdef __WXMSW__ { - cout << msg << "\n"; - cout.flush(); + wxSTD cout << msg << "\n"; + wxSTD cout.flush(); } #endif #ifdef __WXMSW__