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