summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6358877)
raw | patch | inline | side by side (parent: 6358877)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 30 Apr 2005 09:38:50 +0000 (09:38 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 30 Apr 2005 09:38:50 +0000 (09:38 +0000) |
program/confignt/config.h | patch | blob | history | |
program/src/rrd_graph.c | patch | blob | history |
index 62ebc5466b02b5b4f04e5e08dc3135d582e7b2dc..3a7336b047bc9ee0d045f00a4726f8756a982c17 100644 (file)
#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
index 910f9dbf0f549a83445f19217879fdfa140eb259..dc21548dba90325bd58a9b62f7c9f52c23b66928 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
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';