]> git.saurik.com Git - wxWidgets.git/commitdiff
'-version' parameter for tex2rtf.
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 5 Jan 2007 17:30:42 +0000 (17:30 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 5 Jan 2007 17:30:42 +0000 (17:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/tex2rtf/src/tex2rtf.cpp

index 0e237025dcc2797602e295f56804987bc87a303c..cba00d3753924c62274d802ffc58a3f8f3475e09 100644 (file)
@@ -133,6 +133,7 @@ int BufSize = 500;
 
 bool Go(void);
 void ShowOptions(void);
+void ShowVersion(void);
 
 wxChar wxTex2RTFBuffer[1500];
 
@@ -293,6 +294,11 @@ bool MyApp::OnInit()
       i ++;
       checkSyntax = true;
     }
+    else if (wxStrcmp(argv[i], _T("-version")) == 0)
+    {
+      i ++;
+      ShowVersion();
+    }
     else
     {
       wxString buf;
@@ -595,11 +601,17 @@ int MyApp::OnExit()
   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