summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html/en/func/other.html4
-rw-r--r--html/en/history.html2
-rw-r--r--include/cd.h2
-rw-r--r--src/cd.c13
-rw-r--r--src/lua5/cdlua5.c4
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() -&gt; (version: number) [in Lua]</pre>
<span class="mainFunction">CD_NAME</span> &quot;CD - Canvas Draw&quot;
<span class="mainFunction">CD_DESCRIPTION</span> &quot;A 2D Graphics Library&quot;
<span class="mainFunction">CD_COPYRIGHT</span> &quot;Copyright (C) 1994-2007 Tecgraf/PUC-Rio and PETROBRAS S/A&quot;
-<span class="mainFunction">CD_VERSION</span> &quot;5.0.0&quot;
+<span class="mainFunction">CD_VERSION</span> &quot;5.0&quot;
<span class="mainFunction">CD_VERSION_DATE</span> &quot;2007/04/09&quot;
<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
diff --git a/src/cd.c b/src/cd.c
index 536f7ef..c8425ba 100644
--- a/src/cd.c
+++ b/src/cd.c
@@ -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);
}