diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-08 03:57:29 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-09-08 03:57:29 +0000 |
commit | 4a31a90779ed7dd60a458a98ffc61e245d65c3ad (patch) | |
tree | 9d80444483b2e8f91b50a4a151515de199d89c17 | |
parent | bbc670aa4ba7dcdaa4a33815e58b57753ebe9cfe (diff) |
get version at runtime using sys_getversion()
svn path=/trunk/externals/hcs/; revision=13996
-rw-r--r-- | version.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -2,10 +2,10 @@ /* */ /* object for getting the version of Pd-extended */ /* (it gets the version at compile time, so it will show the version of Pd */ -/* that is was compiled against) +/* that is was compiled against) */ /* Written by Hans-Christoph Steiner <hans@at.or.at> */ /* */ -/* Copyright (c) 2006 Hans-Christoph Steiner */ +/* Copyright (c) 2006, 2010 Hans-Christoph Steiner */ /* */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License */ @@ -27,7 +27,7 @@ #include <m_pd.h> -static char *version = "$Revision: 1.2 $"; +static char *version = "1.3"; t_int version_instance_count; @@ -50,11 +50,12 @@ typedef struct _version { static void version_output(t_version* x) { DEBUG(post("version_output");); - + int major, minor, bugfix; t_atom version_data[6]; - SETFLOAT(version_data, (t_float) PD_MAJOR_VERSION); - SETFLOAT(version_data + 1, (t_float) PD_MINOR_VERSION); - SETFLOAT(version_data + 2, (t_float) PD_BUGFIX_VERSION); + sys_getversion(&major, &minor, &bugfix); + SETFLOAT(version_data, (t_float) major); + SETFLOAT(version_data + 1, (t_float) minor); + SETFLOAT(version_data + 2, (t_float) bugfix); SETSYMBOL(version_data + 3, gensym(PD_TEST_VERSION)); SETSYMBOL(version_data + 4, gensym(__DATE__)); SETSYMBOL(version_data + 5, gensym(__TIME__)); |