1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
10 #include <sys/utsname.h>
12 #include <anna/config/Release.hpp>
13 #include <anna/config/defines.hpp>
18 string config::Release::getVersion() {
19 static const int version = ANNA_VERSION;
21 int mainVersion = (version & 0xff0000) >> 16;
22 int year = (version & 0xff00) >> 8;
23 int month = (version & 0xff);
25 sprintf(aux, "%d.%02d.%02d", mainVersion, year, month);
27 return result += getArchitecture();
30 // (1) It only will use the main OS version
31 string config::Release::getArchitecture() {
48 char* release = anna_strchr(un.release, '.'); // (1)
51 if((release = anna_strchr(release + 1, '.')) != NULL)