src/version.cc

changeset 861
83426c5fa732
parent 858
b6b1afacb7c1
child 926
e1ae2dbcae8e
child 948
3a91828475fd
equal deleted inserted replaced
860:a496e72af069 861:83426c5fa732
30 char g_fullVersionString[256] = {'\0'}; 30 char g_fullVersionString[256] = {'\0'};
31 char g_buildTime[256] = {'\0'}; 31 char g_buildTime[256] = {'\0'};
32 32
33 // ============================================================================= 33 // =============================================================================
34 // 34 //
35 const char* versionString() 35 const char* VersionString()
36 { 36 {
37 if (g_versionString[0] == '\0') 37 if (g_versionString[0] == '\0')
38 { 38 {
39 #if VERSION_PATCH == 0 39 #if VERSION_PATCH == 0
40 sprintf (g_versionString, "%d.%d", VERSION_MAJOR, VERSION_MINOR); 40 sprintf (g_versionString, "%d.%d", VERSION_MAJOR, VERSION_MINOR);
46 return g_versionString; 46 return g_versionString;
47 } 47 }
48 48
49 // ============================================================================= 49 // =============================================================================
50 // 50 //
51 const char* fullVersionString() 51 const char* FullVersionString()
52 { 52 {
53 if (g_fullVersionString[0] == '\0') 53 if (g_fullVersionString[0] == '\0')
54 { 54 {
55 #if BUILD_ID != BUILD_RELEASE and defined (SVN_REVISION_STRING) 55 #if BUILD_ID != BUILD_RELEASE and defined (SVN_REVISION_STRING)
56 sprintf (g_fullVersionString, "%s-" SVN_REVISION_STRING, versionString()); 56 sprintf (g_fullVersionString, "%s-" SVN_REVISION_STRING, VersionString());
57 #else 57 #else
58 sprintf (g_fullVersionString, "%s", versionString()); 58 sprintf (g_fullVersionString, "%s", versionString());
59 #endif 59 #endif
60 } 60 }
61 61
62 return g_fullVersionString; 62 return g_fullVersionString;
63 } 63 }
64 64
65 // ============================================================================= 65 // =============================================================================
66 // 66 //
67 const char* commitTimeString() 67 const char* CommitTimeString()
68 { 68 {
69 #ifdef SVN_REVISION_NUMBER 69 #ifdef SVN_REVISION_NUMBER
70 if (g_buildTime[0] == '\0') 70 if (g_buildTime[0] == '\0')
71 { 71 {
72 time_t timestamp = SVN_REVISION_NUMBER; 72 time_t timestamp = SVN_REVISION_NUMBER;

mercurial