b0407f0e4e
- added dependencies on devel/libtool, graphics/gd
68 lines
1.8 KiB
Plaintext
68 lines
1.8 KiB
Plaintext
$OpenBSD: patch-src_rrd_graph_c,v 1.1 2000/09/06 19:17:23 danh Exp $
|
|
$NetBSD: patch-ai,v 1.2 2000/05/07 12:50:52 wulf Exp $
|
|
--- src/rrd_graph.c.orig Tue Aug 22 19:37:46 2000
|
|
+++ src/rrd_graph.c Tue Aug 22 19:40:34 2000
|
|
@@ -6,12 +6,12 @@
|
|
|
|
#include "rrd_tool.h"
|
|
#include <gd.h>
|
|
-#include <gdlucidan10.h>
|
|
-#include <gdlucidab12.h>
|
|
+#include <gdfontt.h>
|
|
+#include <gdfonts.h>
|
|
#include <sys/stat.h>
|
|
|
|
-#define SmallFont gdLucidaNormal10
|
|
-#define LargeFont gdLucidaBold12
|
|
+#define SmallFont gdFontTiny
|
|
+#define LargeFont gdFontSmall
|
|
|
|
/* #define DEBUG */
|
|
|
|
@@ -38,7 +38,7 @@ enum op_en {OP_NUMBER=0,OP_VARIABLE,OP_I
|
|
OP_MIN,OP_MAX,OP_LIMIT, OP_FLOOR, OP_CEIL,
|
|
OP_UN,OP_END};
|
|
|
|
-enum if_en {IF_GIF=0,IF_PNG=1};
|
|
+enum if_en {IF_PNG=0};
|
|
|
|
typedef struct rpnp_t {
|
|
enum op_en op;
|
|
@@ -340,7 +340,6 @@ enum gf_en gf_conv(char *string){
|
|
|
|
enum if_en if_conv(char *string){
|
|
|
|
- conv_if(GIF,IF_GIF)
|
|
conv_if(PNG,IF_PNG)
|
|
|
|
return (-1);
|
|
@@ -2309,9 +2308,6 @@ int lazy_check(image_desc_t *im){
|
|
if ((fd = fopen(im->graphfile,"rb")) == NULL)
|
|
return 0; /* the file does not exist */
|
|
switch (im->imgformat) {
|
|
- case IF_GIF:
|
|
- size = GifSize(fd,&(im->xgif),&(im->ygif));
|
|
- break;
|
|
case IF_PNG:
|
|
size = PngSize(fd,&(im->xgif),&(im->ygif));
|
|
break;
|
|
@@ -2570,9 +2566,6 @@ graph_paint(image_desc_t *im, char ***ca
|
|
}
|
|
}
|
|
switch (im->imgformat) {
|
|
- case IF_GIF:
|
|
- gdImageGif(gif, fo);
|
|
- break;
|
|
case IF_PNG:
|
|
gdImagePng(gif, fo);
|
|
break;
|
|
@@ -2687,7 +2680,7 @@ rrd_graph(int argc, char **argv, char **
|
|
im.prt_c = 0;
|
|
im.gdes_c = 0;
|
|
im.gdes = NULL;
|
|
- im.imgformat = IF_GIF; /* we default to GIF output */
|
|
+ im.imgformat = IF_PNG; /* we default to PNG output */
|
|
|
|
for(i=0;i<DIM(graph_col);i++)
|
|
im.graph_col[i].red=-1;
|