server/src/kernel/version.c
2016-09-16 17:12:40 +02:00

19 lines
423 B
C

#include <platform.h>
#include "version.h"
#include <stdio.h>
#ifndef ERESSEA_VERSION
// the version number, if it was not passed to make with -D
#define ERESSEA_VERSION "3.10.0-devel"
#endif
const char *eressea_version(void) {
return ERESSEA_VERSION;
}
int version_no(const char *str) {
int maj = 0, min = 0, bld = 0;
sscanf(str, "%d.%d.%d", &maj, &min, &bld);
return (maj << 16) | (min << 8) | bld;
}