summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1846e9b)
raw | patch | inline | side by side (parent: 1846e9b)
author | jake <jake@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 20 Jun 2002 00:21:03 +0000 (00:21 +0000) | ||
committer | jake <jake@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 20 Jun 2002 00:21:03 +0000 (00:21 +0000) |
13 files changed:
diff --git a/NT-BUILD-TIPS.txt b/NT-BUILD-TIPS.txt
index 9c35d449f336d1e3704148320e7a942540efd0c4..0545116f56437dd390225facfee4e8c02c5da314 100644 (file)
--- a/NT-BUILD-TIPS.txt
+++ b/NT-BUILD-TIPS.txt
(which contains a static Win32 version of config.h) should be on
the include path.
(4) Fonts are located in the %windir%\fonts, so the default font
-is c:\winnt\fonts\cour.ttf.
+is c:\winnt\fonts\cour.ttf. (6/19/02) At Kerry Calvert's suggestion
+this setting was moved to confignt\config.h.
(5) libart requires a custom build step to generate art_config.h; this
is done manually via the commands:
cl -I..\..\confignt gen_art_config.c
index a0001f7904af42069ef2d9c39e1958e5de3d4f9e..1340b6f8aeba242653ef78bb2bf72aaa6a59f4c4 100644 (file)
#define PL_sv_undef sv_undef
#endif
+
#define rrdcode(name) \
argv = (char **) malloc((items+1)*sizeof(char *));\
argv[0] = "dummy";\
if (rrd_test_error()) {
if(calcpr)
for(i=0;calcpr[i];i++)
- free(calcpr[i]);
+ rrd_freemem(calcpr[i]);
XSRETURN_UNDEF;
}
retar=newAV();
if(calcpr){
for(i=0;calcpr[i];i++){
av_push(retar,newSVpv(calcpr[i],0));
- free(calcpr[i]);
+ rrd_freemem(calcpr[i]);
}
- free(calcpr);
+ rrd_freemem(calcpr);
}
EXTEND(sp,4);
PUSHs(sv_2mortal(newRV_noinc((SV*)retar)));
names=newAV();
for (ii = 0; ii < ds_cnt; ii++){
av_push(names,newSVpv(ds_namv[ii],0));
- free(ds_namv[ii]);
+ rrd_freemem(ds_namv[ii]);
}
- free(ds_namv);
+ rrd_freemem(ds_namv);
/* convert the data array into perl format */
datai=data;
retar=newAV();
}
av_push(retar,newRV_noinc((SV*)line));
}
- free(data);
+ rrd_freemem(data);
EXTEND(sp,5);
PUSHs(sv_2mortal(newSViv(start+step)));
PUSHs(sv_2mortal(newSViv(step)));
names=newAV();
for (ii = 0; ii < col_cnt; ii++){
av_push(names,newSVpv(legend_v[ii],0));
- free(legend_v[ii]);
+ rrd_freemem(legend_v[ii]);
}
- free(legend_v);
+ rrd_freemem(legend_v);
/* convert the data array into perl format */
ptr=data;
}
av_push(retar,newRV_noinc((SV*)line));
}
- free(data);
+ rrd_freemem(data);
EXTEND(sp,7);
PUSHs(sv_2mortal(newSViv(start+step)));
break;
case RD_I_STR:
hvs(newSVpv(data->value.u_str,0));
- free(data->value.u_str);
+ rrd_freemem(data->value.u_str);
break;
}
#undefine hvs
- free(data->key);
+ rrd_freemem(data->key);
data = data->next;
- free(save);
+ rrd_freemem(save);
}
- free(data);
+ rrd_freemem(data);
RETVAL = newRV_noinc((SV*)hash);
OUTPUT:
RETVAL
index 7a4938cd4631f11e053e6b03e74fff7820d77a2c..abaf9193203b1bb773f0dc7510348bae6a2de51b 100644 (file)
# 'DEFINE' => "-DPERLPATCHLEVEL=$Config{PATCHLEVEL}",
'DEFINE' => "-DPERLPATCHLEVEL=5",
- 'INC' => '-I../../src/ -I../../libraries/freetype-2.0.5/include -I ../../libraries/libart_lgpl-2.3.7 -I ../../libraries/zlib-1.1.4 -I ../../libraries/libpng-1.2.0',
+ 'INC' => '-I../../src/ -I../../libraries/freetype-2.0.5/include -I ../../libraries/libart_lgpl-2.3.7 -I ../../libraries/zlib-1.1.4 -I ../../libraries/libpng-1.2.0',
+ 'OPTIMIZE' => '-O2 -MT',
# change this path to refer to your libc.lib
- 'MYEXTLIB' => 'e:/micros~1.net/vc7/lib/libcmt.lib ../../src/release/rrd.lib ../../libraries/libart_lgpl-2.3.7/release/libart.lib ../../libraries/zlib-1.1.4/release/zlib.lib ../../libraries/libpng-1.2.0\release\png.lib ../../libraries/freetype-2.0.5/release/freetype.lib',
+ 'MYEXTLIB' => 'c:/vc98/lib/libcmt.lib ../../src/release/rrd.lib ../../libraries/libart_lgpl-2.3.7/release/libart.lib ../../libraries/zlib-1.1.4/release/zlib.lib ../../libraries/libpng-1.2.0\release\png.lib ../../libraries/freetype-2.0.5/release/freetype.lib',
'realclean' => {FILES => 't/demo?.rrd t/demo?.png' },
($] ge '5.005') ? (
'AUTHOR' => 'Tobias Oetiker (oetiker@ee.ethz.ch)',
diff --git a/confignt/config.h b/confignt/config.h
index 4e4c37c7d6087b1f6b94fbea364daa7fa0d6e605..f31bba14847b7b8b30ef5d13504c80ffbcc7250c 100644 (file)
--- a/confignt/config.h
+++ b/confignt/config.h
#define rrd_realloc(a,b) realloc((a), (b))
#define snprintf _snprintf
+
+/* change this to %windir%/fonts */
+#define RRD_DEFAULT_FONT "c:/winnt/fonts/cour.ttf"
index 50ad9f77f0e88b9e5b6a035464c072c0370d1049..5262a5ee8d2fba4bf0e577f06e2b5a2250329765 100644 (file)
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /I "include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
-# SUBTRACT CPP /O<none> /YX
+# ADD CPP /nologo /MT /W3 /GX /I "include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "include" /d "NDEBUG"
BSC32=bscmake.exe
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /I "include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
index 14633f1b957da71ff03f07c661e14d494658ee37..9c1665f65a54d6b71d6d03cda79d7de0d9cb7e14 100644 (file)
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /I "..\..\confignt" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "LIBART_COMPILATION" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\..\confignt" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "LIBART_COMPILATION" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /I "..\..\confignt" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "LIBART_COMPILATION" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\confignt" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "LIBART_COMPILATION" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
index 7a8ebd5cbc4a67a3d2b0f2769c4b0f465451e10c..85491e5b3ccc1b2eec673460c72738b2caa527f4 100644 (file)
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /I "..\zlib-1.1.3" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# SUBTRACT CPP /O<none>
+# ADD CPP /nologo /MT /W3 /GX /I "..\zlib-1.1.3" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /I "..\zlib-1.1.3" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\zlib-1.1.3" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
index c4438292d16d922b340a9393117443202b2b3f7a..a3357c6baed7a1c050f5c644a18ef23d5c34ae2d 100644 (file)
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# SUBTRACT CPP /O<none>
+# ADD CPP /nologo /MT /W3 /GX /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
diff --git a/src/rrd.dsp b/src/rrd.dsp
index c0a8ab302c42aa311acd7861f9e518dea18e679b..d40a217e373fb0fe7439c000e791e3bc7bb7dbd5 100644 (file)
--- a/src/rrd.dsp
+++ b/src/rrd.dsp
# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x100c
# ADD RSC /l 0x100c
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x100c
# ADD RSC /l 0x100c
diff --git a/src/rrd_open.c b/src/rrd_open.c
index cf663ed3bf76c0e82ccb56b23148ac79c5206bda..c0e6545a2b2f3208b96147158ec9c65cf559a334 100644 (file)
--- a/src/rrd_open.c
+++ b/src/rrd_open.c
*****************************************************************************
* $Id$
* $Log$
+ * Revision 1.5 2002/06/20 00:21:03 jake
+ * More Win32 build changes; thanks to Kerry Calvert.
+ *
* Revision 1.4 2002/02/01 20:34:49 oetiker
* fixed version number and date/time
*
free(rrd->rrd_value);
}
+/* routine used by external libraries to free memory allocated by
+ * rrd library */
+void rrd_freemem(void *mem)
+{
+
+ free(mem);
+}
+
int readfile(char *file_name, char **buffer, int skipfirst){
long writecnt=0,totalcnt = MEMBLK;
FILE *input=NULL;
diff --git a/src/rrd_tool.h b/src/rrd_tool.h
index 7280e7448c1a9d3d7b47def89efad0810eb2ffed..f21a17a7eb0d27f2c3bc41880d0feb627e0d1040 100644 (file)
--- a/src/rrd_tool.h
+++ b/src/rrd_tool.h
rrd_value_t **data);
void rrd_free(rrd_t *rrd);
+void rrd_freemem(void *mem);
void rrd_init(rrd_t *rrd);
int rrd_open(char *file_name, FILE **in_file, rrd_t *rrd, int rdwr);
diff --git a/src/rrdtool.dsp b/src/rrdtool.dsp
index b64e04f651a645076619c067902fd40719d80864..ecffcc7b2d2d1a25ba25529dbf72add78f2bf8a1 100644 (file)
--- a/src/rrdtool.dsp
+++ b/src/rrdtool.dsp
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x100c /d "NDEBUG"
# ADD RSC /l 0x100c /d "NDEBUG"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /ML /W3 /Gm /GX /ZI /Od /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\libraries\libpng-1.2.0" /I "..\libraries\zlib-1.1.4" /I "..\libraries\libart_lgpl-2.3.7" /I "..\libraries\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CTYPE_DISABLE_MACROS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x100c /d "_DEBUG"
# ADD RSC /l 0x100c /d "_DEBUG"
diff --git a/src/rrdtool.ncb b/src/rrdtool.ncb
deleted file mode 100644 (file)
index eb35de8..0000000
Binary files a/src/rrdtool.ncb and /dev/null differ
index eb35de8..0000000
Binary files a/src/rrdtool.ncb and /dev/null differ