naev 0.12.6
naev_version.c
Go to the documentation of this file.
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
11#include "naev.h"
12#include "naev_build_version.h"
13#include <stdio.h>
15
16#include "gettext.h"
17#include "start.h"
18
19static char version_human[STRMAX_SHORT];
20
27const char *naev_version( int long_version )
28{
29 /* Set up the long version. */
30 if (long_version) {
31 if (version_human[0] == '\0')
32 snprintf( version_human, sizeof( version_human ),
33 " " APPNAME " v%s%s - %s", VERSION,
34#ifdef DEBUGGING
35 _( " debug" ),
36#else /* DEBUGGING */
37 "",
38#endif /* DEBUGGING */
39 start_name() );
40 return version_human;
41 }
42
43 return VERSION;
44}
Header file with generic functions and naev-specifics.
#define APPNAME
Definition naev.h:30
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:182