Return the version info as a string.

This commit is contained in:
Jef Driesen 2010-04-29 09:20:51 +00:00
parent 0976932501
commit fed4e562ee
2 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,7 @@
#include "version.h"
void
const char *
dc_version (dc_version_t *version)
{
if (version) {
@ -30,4 +30,6 @@ dc_version (dc_version_t *version)
version->micro = DC_VERSION_MICRO;
version->extra = DC_VERSION_EXTRA;
}
return DC_VERSION;
}

View File

@ -26,6 +26,7 @@
extern "C" {
#endif /* __cplusplus */
#define DC_VERSION "@DC_VERSION_MAJOR@.@DC_VERSION_MINOR@.@DC_VERSION_MICRO@"
#define DC_VERSION_MAJOR @DC_VERSION_MAJOR@
#define DC_VERSION_MINOR @DC_VERSION_MINOR@
#define DC_VERSION_MICRO @DC_VERSION_MICRO@
@ -38,7 +39,7 @@ typedef struct dc_version_t {
const char *extra;
} dc_version_t;
void
const char *
dc_version (dc_version_t *version);
#ifdef __cplusplus