#include "wx/wxprec.h"
#ifndef WX_PRECOMP
- #include <wx/string.h>
- #include <wx/log.h>
- #include <wx/regex.h>
- #include <wx/dynarray.h>
- #include <wx/wx.h>
+ #include "wx/string.h"
+ #include "wx/log.h"
+ #include "wx/dynarray.h"
+ #include "wx/wx.h"
#endif // WX_PRECOMP
-#include <wx/file.h>
+#include "wx/file.h"
+#include "wx/regex.h"
// C++ parsing classes
#include "cjparser.h"
#undef GetCurrentTime
#endif
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-#define VERSION_STRING "$Revision$"
-
// -----------------------------------------------------------------------------
// global vars
// -----------------------------------------------------------------------------
// timeFormat is used for the call of strftime(3)
static const char *GetCurrentTime(const char *timeFormat);
+// get the string containing the program version
+static const wxString GetVersionString();
+
// -----------------------------------------------------------------------------
// private classes
// -----------------------------------------------------------------------------
// version requested
wxLogMessage("HelpGen version %s\n"
"(c) 1999-2001 Vadim Zeitlin\n",
- VERSION_STRING);
+ GetVersionString().c_str());
return 0;
case 'i':
"\n"
"\n"
"\\section{\\class{%s}}\\label{%s}\n\n",
- VERSION_STRING,
+ GetVersionString().c_str(),
m_fileHeader.c_str(),
GetCurrentTime("%d/%b/%y %H:%M:%S"),
name.c_str(),
return s_timeBuffer;
}
+static const wxString GetVersionString()
+{
+ wxString version = "$Revision$";
+ wxRegEx("^\\$Revision$$").ReplaceFirst(&version, "\\1");
+ return version;
+}
+
/*
$Log$
+ Revision 1.15 2001/11/22 21:59:58 GD
+ use "..." instead of <...> for wx headers
+
+ Revision 1.14 2001/07/19 13:51:29 VZ
+ fixes to version string
+
Revision 1.13 2001/07/19 13:44:57 VZ
1. compilation fixes
2. don't quote special characters inside verbatim environment