From ccf6c43b3dbfcf891920db72b832b63ca88c3941 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 5 Jan 2007 17:30:42 +0000 Subject: [PATCH] '-version' parameter for tex2rtf. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/tex2rtf/src/tex2rtf.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/utils/tex2rtf/src/tex2rtf.cpp b/utils/tex2rtf/src/tex2rtf.cpp index 0e237025dc..cba00d3753 100644 --- a/utils/tex2rtf/src/tex2rtf.cpp +++ b/utils/tex2rtf/src/tex2rtf.cpp @@ -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 -- 2.45.2