fixes to version string
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -54,12 +54,12 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <wx/regex.h>
|
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
#include <wx/file.h>
|
#include <wx/file.h>
|
||||||
|
#include <wx/regex.h>
|
||||||
|
|
||||||
// C++ parsing classes
|
// C++ parsing classes
|
||||||
#include "cjparser.h"
|
#include "cjparser.h"
|
||||||
@@ -73,12 +73,6 @@
|
|||||||
#undef GetCurrentTime
|
#undef GetCurrentTime
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// constants
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#define VERSION_STRING "$Revision$"
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// global vars
|
// global vars
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -117,6 +111,9 @@ static wxString GetAllComments(const spContext& ctx);
|
|||||||
// timeFormat is used for the call of strftime(3)
|
// timeFormat is used for the call of strftime(3)
|
||||||
static const char *GetCurrentTime(const char *timeFormat);
|
static const char *GetCurrentTime(const char *timeFormat);
|
||||||
|
|
||||||
|
// get the string containing the program version
|
||||||
|
static const wxString GetVersionString();
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// private classes
|
// private classes
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@@ -530,7 +527,7 @@ int HelpGenApp::OnRun()
|
|||||||
// version requested
|
// version requested
|
||||||
wxLogMessage("HelpGen version %s\n"
|
wxLogMessage("HelpGen version %s\n"
|
||||||
"(c) 1999-2001 Vadim Zeitlin\n",
|
"(c) 1999-2001 Vadim Zeitlin\n",
|
||||||
VERSION_STRING);
|
GetVersionString().c_str());
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
@@ -851,7 +848,7 @@ void HelpGenVisitor::VisitClass( spClass& cl )
|
|||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\\section{\\class{%s}}\\label{%s}\n\n",
|
"\\section{\\class{%s}}\\label{%s}\n\n",
|
||||||
VERSION_STRING,
|
GetVersionString().c_str(),
|
||||||
m_fileHeader.c_str(),
|
m_fileHeader.c_str(),
|
||||||
GetCurrentTime("%d/%b/%y %H:%M:%S"),
|
GetCurrentTime("%d/%b/%y %H:%M:%S"),
|
||||||
name.c_str(),
|
name.c_str(),
|
||||||
@@ -1971,8 +1968,18 @@ static const char *GetCurrentTime(const char *timeFormat)
|
|||||||
return s_timeBuffer;
|
return s_timeBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const wxString GetVersionString()
|
||||||
|
{
|
||||||
|
wxString version = "$Revision$";
|
||||||
|
wxRegEx("^\\$Revision$$").ReplaceFirst(&version, "\\1");
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.14 2001/07/19 13:51:29 VZ
|
||||||
|
fixes to version string
|
||||||
|
|
||||||
Revision 1.13 2001/07/19 13:44:57 VZ
|
Revision 1.13 2001/07/19 13:44:57 VZ
|
||||||
1. compilation fixes
|
1. compilation fixes
|
||||||
2. don't quote special characters inside verbatim environment
|
2. don't quote special characters inside verbatim environment
|
||||||
|
Reference in New Issue
Block a user