bool Go(void);
void ShowOptions(void);
+void ShowVersion(void);
wxChar wxTex2RTFBuffer[1500];
i ++;
checkSyntax = true;
}
+ else if (wxStrcmp(argv[i], _T("-version")) == 0)
+ {
+ i ++;
+ ShowVersion();
+ }
else
{
wxString buf;
if (!path.empty())
ReadCustomMacros(path);
- Go();
- if (runTwice)
+ bool rc = Go();
+ if ( rc && runTwice )
{
- Go();
+ rc = Go();
}
#ifdef NO_GUI
- return true;
+ return rc;
#else
OnExit(); // Do cleanup since OnExit won't be called now
return false;
return 0;
}
#endif
-void ShowOptions(void)
+
+void ShowVersion(void)
{
wxChar buf[100];
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF version %.2f"), versionNo);
OnInform(buf);
+}
+
+void ShowOptions(void)
+{
+ ShowVersion();
OnInform(_T("Usage: tex2rtf [input] [output] [switches]\n"));
OnInform(_T("where valid switches are"));
#ifndef NO_GUI