diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/im_lib.cpp | 14 | ||||
| -rw-r--r-- | src/lua5/imlua.c | 12 | 
2 files changed, 18 insertions, 8 deletions
| diff --git a/src/im_lib.cpp b/src/im_lib.cpp index 66ded68..1c81536 100644 --- a/src/im_lib.cpp +++ b/src/im_lib.cpp @@ -2,7 +2,7 @@   * \brief Library Management   *   * See Copyright Notice in im_lib.h - * $Id: im_lib.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + * $Id: im_lib.cpp,v 1.2 2008/12/11 19:02:49 scuri Exp $   */  #include <stdlib.h> @@ -10,17 +10,21 @@  #include "im_lib.h" -static char *iVersion = "TECVERID.str:IM:LIB:"IM_VERSION; +/* This appears only here to avoid changing the iup.h header fo bug fixes */ +#define IM_VERSION_FIX "" +#define IM_VERSION_FIX_NUMBER 0 + +static char *iVersion = "TECVERID.str:IM:LIB:" IM_VERSION IM_VERSION_FIX;  const char iIdent[] = -  "$IM: " IM_VERSION " " IM_COPYRIGHT " $\n" +  "$IM: " IM_VERSION IM_VERSION_FIX " " IM_COPYRIGHT " $\n"    "$URL: www.tecgraf.puc-rio.br/im $\n";  const char* imVersion(void)  {                    	 (void)iVersion;  	 (void)iIdent; -   return IM_VERSION; +   return IM_VERSION IM_VERSION_FIX;  }  const char* imVersionDate(void) @@ -30,5 +34,5 @@ const char* imVersionDate(void)  int imVersionNumber(void)  { -  return IM_VERSION_NUMBER; +  return IM_VERSION_NUMBER+IM_VERSION_FIX_NUMBER;  } diff --git a/src/lua5/imlua.c b/src/lua5/imlua.c index 7d39ee7..7e5c328 100644 --- a/src/lua5/imlua.c +++ b/src/lua5/imlua.c @@ -2,7 +2,7 @@   * \brief IM Lua 5 Binding   *   * See Copyright Notice in im_lib.h - * $Id: imlua.c,v 1.1 2008/10/17 06:16:32 scuri Exp $ + * $Id: imlua.c,v 1.2 2008/12/11 19:02:49 scuri Exp $   */  #include <string.h> @@ -185,8 +185,6 @@ static const imlua_constant im_constants[] = {    { "_AUTHOR",  0, IM_AUTHOR },    { "_COPYRIGHT",  0, IM_COPYRIGHT }, -  { "_VERSION",  0, IM_VERSION }, -  { "_VERSION_NUMBER",  IM_VERSION_NUMBER, NULL },    { "_VERSION_DATE",  0, IM_VERSION_DATE },    { "_DESCRIPTION",  0, IM_DESCRIPTION },    { "_NAME",  0, IM_NAME }, @@ -206,6 +204,14 @@ void imlua_regconstants (lua_State *L, const imlua_constant *imconst)        lua_pushnumber(L, l->value);      lua_settable(L, -3);    } + +  lua_pushstring(L, "_VERSION"); +  lua_pushstring(L, imVersion()); +  lua_settable(L, -3); + +  lua_pushstring(L, "_VERSION_NUMBER"); +  lua_pushnumber(L, imVersionNumber()); +  lua_settable(L, -3);  }  static const luaL_reg im_lib[] = { | 
