From 97e124186670ae2dfc879082f44a8d9d72a1388c Mon Sep 17 00:00:00 2001
From: scuri
Date: Thu, 11 Dec 2008 19:02:42 +0000
Subject: *** empty log message ***
---
html/en/func/other.html | 4 ++--
html/en/history.html | 2 +-
include/cd.h | 2 +-
src/cd.c | 13 ++++++++-----
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]
CD_NAME "CD - Canvas Draw"
CD_DESCRIPTION "A 2D Graphics Library"
CD_COPYRIGHT "Copyright (C) 1994-2007 Tecgraf/PUC-Rio and PETROBRAS S/A"
-CD_VERSION "5.0.0"
+CD_VERSION "5.0"
CD_VERSION_DATE "2007/04/09"
CD_VERSION_NUMBER 500000
@@ -49,7 +49,7 @@ cd._VERSION_DATE
cd._VERSION_NUMBER
Usefull definitions. They have the same value returned by cdVersion*
- functions.
+ functions, except that they do not include the build number.
Metafile Interpretation
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 @@
History of Changes
-CVS (04/Nov/2008)
+Version 5.1.1 (15/Dec/2008)
- Fixed: 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);
}
--
cgit v1.2.3