#include "tex2rtf.h"
#include "rtfutils.h"
-#if (defined(__WXGTK__) || defined(__WXMOTIF__)) && !defined(NO_GUI)
+#if (defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)) && !defined(NO_GUI)
#include "tex2rtf.xpm"
#endif
OnInform(buf);
OnInform("Usage: tex2rtf [input] [output] [switches]\n");
OnInform("where valid switches are");
+#ifndef NO_GUI
OnInform(" -interactive");
+#endif
OnInform(" -bufsize <size in K>");
OnInform(" -charset <pc | pca | ansi | mac> (default ansi)");
OnInform(" -twice");
Tex2RTFYield(TRUE);
Go();
- if (runTwice)
+ if (stopRunning)
+ {
+ SetStatusText("Build aborted!");
+ wxString errBuf;
+ errBuf.Printf("\nErrors encountered during this pass: %lu\n", errorCount);
+ OnInform((char *)errBuf.c_str());
+ }
+
+
+ if (runTwice && !stopRunning)
{
Tex2RTFYield(TRUE);
Go();
ChooseOutputFile();
#endif
- if (!InputFile || !OutputFile)
+ if (!InputFile || !OutputFile || stopRunning)
return FALSE;
#ifndef NO_GUI
OnInform("Reading LaTeX file...");
TexLoadFile(InputFile);
+ if (stopRunning)
+ {
+ OkToClose = TRUE;
+ return FALSE;
+ }
+
switch (convertMode)
{
case TEX_RTF:
OnInform("*** Aborted by user.");
success = FALSE;
stopRunning = FALSE;
+ OkToClose = TRUE;
}
if (success)