naev 0.11.5
naev_version.c
Go to the documentation of this file.
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
10#include "naev.h"
11#include "naev_build_version.h"
14#include "gettext.h"
15#include "start.h"
16
17static char version_human[STRMAX_SHORT];
25const char *naev_version( int long_version )
26{
27 /* Set up the long version. */
28 if (long_version) {
29 if (version_human[0] == '\0')
30 snprintf( version_human, sizeof(version_human),
31 " "APPNAME" v%s%s - %s", VERSION,
32#ifdef DEBUGGING
33 _(" debug"),
34#else /* DEBUGGING */
35 "",
36#endif /* DEBUGGING */
37 start_name() );
38 return version_human;
39 }
40
41 return VERSION;
42}
Header file with generic functions and naev-specifics.
#define APPNAME
Definition naev.h:34
const char * naev_version(int long_version)
Returns the version in a human readable string.
static char version_human[STRMAX_SHORT]
const char * start_name(void)
Gets the module name.
Definition start.c:177