#define rrd_realloc(a,b) realloc((a), (b))
#define snprintf _snprintf
-/* Code in rrd_graph.c:rrd_graph_init() uses the %windir%
- * environment variable to override this. This should
- * avoid the recompile problem if the system directory is
- * c:/windows vs. d:/winnt.
- * This #define can't be removed because:
- * (1) the constant is used outside of rrd_graph_init() to init a struct
- * (2) windir might not be available in all environments
+
+/* Code in rrd_graph.c:rrd_graph_init() uses the %windir% environment
+ * variable to find the actual location of this relative font path to avoid
+ * the recompile problem if the system directory is c:/windows vs. d:/winnt.
*/
-#define RRD_DEFAULT_FONT "c:/windows/fonts/cour.ttf"
+
+#define RRD_DEFAULT_FONT "cour.ttf"
#define RRDGRAPH_YLEGEND_ANGLE 90.0
if (windir != NULL) {
strncpy(rrd_win_default_font,windir,999);
rrd_win_default_font[999] = '\0';
- strcat(rrd_win_default_font,"\\fonts\\cour.ttf");
+ strcat(rrd_win_default_font,"\\fonts\\");
+ strcat(rrd_win_default_font,RRD_DEFAULT_FONT);
for(i=0;i<DIM(text_prop);i++){
strncpy(text_prop[i].font,rrd_win_default_font,sizeof(text_prop[i].font)-1);
text_prop[i].font[sizeof(text_prop[i].font)-1] = '\0';