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());
|
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;
|
int i;
|
||||||
for (i = n; i < argc;)
|
for (i = n; i < argc;)
|
||||||
{
|
{
|
||||||
@@ -299,7 +283,6 @@ bool MyApp::OnInit()
|
|||||||
i ++;
|
i ++;
|
||||||
ShowVersion();
|
ShowVersion();
|
||||||
#ifdef NO_GUI
|
#ifdef NO_GUI
|
||||||
ShowOptions();
|
|
||||||
exit(1);
|
exit(1);
|
||||||
#else
|
#else
|
||||||
return false;
|
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)
|
#if defined(__WXMSW__) && !defined(NO_GUI)
|
||||||
wxDDEInitialize();
|
wxDDEInitialize();
|
||||||
Tex2RTFLastStatus[0] = 0; // DDE connection return value
|
Tex2RTFLastStatus[0] = 0; // DDE connection return value
|
||||||
|
Reference in New Issue
Block a user