(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
#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
# '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)',
#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"
# 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"
# 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
# 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
# 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
# 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
*****************************************************************************
* $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;
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);
# 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"