check parameters after options check sothat usign -version doesn't result in an error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,22 +185,6 @@ bool MyApp::OnInit()
|
||||
|
||||
TexPathList.Add(::wxGetCwd());
|
||||
|
||||
#ifdef NO_GUI
|
||||
if (InputFile.empty() || OutputFile.empty())
|
||||
{
|
||||
wxSTD cout << "Tex2RTF: input or output file is missing.\n";
|
||||
ShowOptions();
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!InputFile.empty())
|
||||
{
|
||||
TexPathList.EnsureFileAccessible(InputFile);
|
||||
}
|
||||
if (InputFile.empty() || OutputFile.empty())
|
||||
isInteractive = true;
|
||||
|
||||
int i;
|
||||
for (i = n; i < argc;)
|
||||
{
|
||||
@@ -299,7 +283,6 @@ bool MyApp::OnInit()
|
||||
i ++;
|
||||
ShowVersion();
|
||||
#ifdef NO_GUI
|
||||
ShowOptions();
|
||||
exit(1);
|
||||
#else
|
||||
return false;
|
||||
@@ -319,6 +302,22 @@ bool MyApp::OnInit()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NO_GUI
|
||||
if (InputFile.empty() || OutputFile.empty())
|
||||
{
|
||||
wxSTD cout << "Tex2RTF: input or output file is missing.\n";
|
||||
ShowOptions();
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!InputFile.empty())
|
||||
{
|
||||
TexPathList.EnsureFileAccessible(InputFile);
|
||||
}
|
||||
if (InputFile.empty() || OutputFile.empty())
|
||||
isInteractive = true;
|
||||
|
||||
#if defined(__WXMSW__) && !defined(NO_GUI)
|
||||
wxDDEInitialize();
|
||||
Tex2RTFLastStatus[0] = 0; // DDE connection return value
|
||||
|
Reference in New Issue
Block a user