1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-2002 Artsoft Entertainment *
6 * Detmolder Strasse 189 *
9 * e-mail: info@artsoft.org *
10 *----------------------------------------------------------*
12 ***********************************************************/
14 #include "libgame/libgame.h"
20 char *getProgramVersionString()
22 static char program_version_string[32];
25 sprintf(program_version_string, "%d.%d.%d-%d",
26 PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH,
27 PROGRAM_VERSION_BUILD);
29 sprintf(program_version_string, "%d.%d.%d",
30 PROGRAM_VERSION_MAJOR, PROGRAM_VERSION_MINOR, PROGRAM_VERSION_PATCH);
33 return program_version_string;
36 char *getProgramInitString()
38 static char *program_init_string = NULL;
40 if (program_init_string == NULL)
42 program_init_string = checked_malloc(strlen(PROGRAM_TITLE_STRING) + 1 +
43 strlen(getProgramVersionString()) +1 +
44 strlen(TARGET_STRING) + 1);
46 sprintf(program_init_string, "%s %s %s",
47 PROGRAM_TITLE_STRING, getProgramVersionString(), TARGET_STRING);
50 return program_init_string;
53 char *getWindowTitleString()
56 static char *window_title_string = NULL;
58 if (window_title_string == NULL)
60 window_title_string = checked_malloc(strlen(getProgramInitString()) + 1 +
61 strlen(COMPILE_DATE_STRING) + 1);
63 sprintf(window_title_string, "%s %s",
64 getProgramInitString(), COMPILE_DATE_STRING);
67 return window_title_string;
69 return getProgramInitString();