Changes to catch macros that are missing arguments - not perfect, but it will work with all our current TEX files.

Added cleaner ABORT handling in some situations
If \\end{document} is not found, then program auto-aborts after first pass to avoid hanging in some endless loop until all system resources are exhausted and the program crashes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-06-11 12:54:38 +00:00
parent 36e67c5cfc
commit 04b9c5bb04
3 changed files with 61 additions and 17 deletions

View File

@@ -665,7 +665,16 @@ void MyFrame::OnGo(wxCommandEvent& event)
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();
@@ -907,7 +916,7 @@ bool Go(void)
ChooseOutputFile();
#endif
if (!InputFile || !OutputFile)
if (!InputFile || !OutputFile || stopRunning)
return FALSE;
#ifndef NO_GUI
@@ -981,6 +990,9 @@ bool Go(void)
OnInform("Reading LaTeX file...");
TexLoadFile(InputFile);
if (stopRunning)
return FALSE;
switch (convertMode)
{
case TEX_RTF: