diff options
-rw-r--r-- | html/en/func/other.html | 4 | ||||
-rw-r--r-- | html/en/history.html | 2 | ||||
-rw-r--r-- | include/cd.h | 2 | ||||
-rw-r--r-- | src/cd.c | 13 | ||||
-rw-r--r-- | src/lua5/cdlua5.c | 4 |
5 files changed, 14 insertions, 11 deletions
diff --git a/html/en/func/other.html b/html/en/func/other.html index f0d7284..af611ef 100644 --- a/html/en/func/other.html +++ b/html/en/func/other.html @@ -36,7 +36,7 @@ cd.VersionNumber() -> (version: number) [in Lua]</pre> <span class="mainFunction">CD_NAME</span> "CD - Canvas Draw" <span class="mainFunction">CD_DESCRIPTION</span> "A 2D Graphics Library" <span class="mainFunction">CD_COPYRIGHT</span> "Copyright (C) 1994-2007 Tecgraf/PUC-Rio and PETROBRAS S/A" -<span class="mainFunction">CD_VERSION</span> "5.0.0" +<span class="mainFunction">CD_VERSION</span> "5.0" <span class="mainFunction">CD_VERSION_DATE</span> "2007/04/09" <span class="mainFunction">CD_VERSION_NUMBER</span> 500000 @@ -49,7 +49,7 @@ cd._VERSION_DATE cd._VERSION_NUMBER</pre> <p>Usefull definitions. They have the same value returned by <b>cdVersion</b>* - functions.</p> + functions, except that they do not include the build number.</p> <hr> <h2 align="center">Metafile Interpretation</h2> diff --git a/html/en/history.html b/html/en/history.html index 16fab15..d55ff8c 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -10,7 +10,7 @@ <body> <h1>History of Changes</h1> -<h3>CVS (04/Nov/2008)</h3> +<h3>Version 5.1.1 (15/Dec/2008)</h3> <ul> <li><span style="color: #FF0000">Fixed:</span> CDLua binding functions canvas:foreground, canvas:setforeground, canvas:background and diff --git a/include/cd.h b/include/cd.h index 7a72d74..b491d84 100644 --- a/include/cd.h +++ b/include/cd.h @@ -19,7 +19,7 @@ extern "C" { #define CD_NAME "CD - Canvas Draw" #define CD_DESCRIPTION "A 2D Graphics Library" #define CD_COPYRIGHT "Copyright (C) 1994-2008 Tecgraf, PUC-Rio." -#define CD_VERSION "5.1.0" +#define CD_VERSION "5.1" #define CD_VERSION_DATE "2008/10/14" #define CD_VERSION_NUMBER 501000 @@ -17,18 +17,21 @@ #include "cd_private.h" #include "cdirgb.h" +/* This appears only here to avoid changing the cd.h header fo bug fixes */ +#define CD_VERSION_FIX ".1" +#define CD_VERSION_FIX_NUMBER 1 const char cd_ident[] = - "$CD: " CD_VERSION " " CD_COPYRIGHT " $\n" + "$CD: " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT " $\n" "$URL: www.tecgraf.puc-rio.br/cd $\n"; -static char *tecver = "TECVERID.str:CD:LIB:"CD_VERSION; +static char *tecver = "TECVERID.str:CD:LIB:" CD_VERSION CD_VERSION_FIX; char* cdVersion(void) { (void)cd_ident; (void)tecver; - return CD_VERSION; + return CD_VERSION CD_VERSION_FIX; } char* cdVersionDate(void) @@ -38,7 +41,7 @@ char* cdVersionDate(void) int cdVersionNumber(void) { - return CD_VERSION_NUMBER; + return CD_VERSION_NUMBER+CD_VERSION_FIX_NUMBER; } static void cd_setdefaultfunc(cdCanvas* canvas) @@ -128,7 +131,7 @@ cdCanvas *cdCreateCanvas(cdContext* context, void *data_str) char* env = getenv("CD_QUIET"); if (first && env && strcmp(env, "NO")==0) { - printf("CD "CD_VERSION" "CD_COPYRIGHT"\n"); + printf("CD " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT "\n"); first = 0; } } diff --git a/src/lua5/cdlua5.c b/src/lua5/cdlua5.c index db22422..7b7b617 100644 --- a/src/lua5/cdlua5.c +++ b/src/lua5/cdlua5.c @@ -1763,7 +1763,7 @@ static void setinfo (lua_State *L) lua_settable (L, -3); lua_pushliteral (L, "_VERSION"); - lua_pushliteral (L, CD_VERSION); + lua_pushstring (L, cdVersion()); lua_settable (L, -3); lua_pushliteral (L, "_VERSION_DATE"); @@ -1771,7 +1771,7 @@ static void setinfo (lua_State *L) lua_settable (L, -3); lua_pushliteral (L, "_VERSION_NUMBER"); - lua_pushinteger(L, CD_VERSION_NUMBER); + lua_pushinteger(L, cdVersionNumber()); lua_settable (L, -3); } |