summaryrefslogtreecommitdiff
path: root/src/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/variable.c')
-rw-r--r--src/variable.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/variable.c b/src/variable.c
index 453c5209..8527405f 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1626,3 +1626,21 @@ s32b max_gods = MAX_GODS_INIT;
* Timers
*/
timer_type *gl_timers = NULL;
+
+/**
+ * Get the version string.
+ */
+const char *get_version_string()
+{
+ static char version_str[80];
+ static bool initialized = 0;
+ if (!initialized) {
+ sprintf(version_str, "%s %ld.%ld.%ld%s",
+ game_module,
+ (long int) VERSION_MAJOR,
+ (long int) VERSION_MINOR,
+ (long int) VERSION_PATCH, IS_CVS);
+ initialized = TRUE;
+ }
+ return version_str;
+}