openbsd-ports/net/rrdtool/patches/patch-src_rrd_graph_c
2004-06-08 20:21:24 +00:00

98 lines
2.7 KiB
Plaintext

$OpenBSD: patch-src_rrd_graph_c,v 1.3 2004/06/08 20:21:24 danh Exp $
--- src/rrd_graph.c.orig 2004-04-06 17:38:14.000000000 -0400
+++ src/rrd_graph.c 2004-06-08 15:13:53.000000000 -0400
@@ -13,14 +13,8 @@
#include "rrd_graph.h"
#include <gd.h>
-
-#ifdef LATIN2_ENABLE
-#include <gdlucidan10l2.h>
-#include <gdlucidab12l2.h>
-#else
-#include <gdlucidan10.h>
-#include <gdlucidab12.h>
-#endif
+#include <gdfonts.h>
+#include <gdfontt.h>
#include <sys/stat.h>
#ifdef WIN32
@@ -36,13 +30,8 @@
#include <locale.h>
#endif
-#ifdef LATIN2_ENABLE
-#define SmallFont gdLucidaNormal10l2
-#define LargeFont gdLucidaBold12l2
-#else
-#define SmallFont gdLucidaNormal10
-#define LargeFont gdLucidaBold12
-#endif
+#define SmallFont gdFontTiny
+#define LargeFont gdFontSmall
xlab_t xlab[] = {
{0, TMT_SECOND,30, TMT_MINUTE,5, TMT_MINUTE,5, 0,"%H:%M"},
@@ -212,7 +201,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)
conv_if(GD,IF_GD)
@@ -2478,9 +2466,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;
@@ -2778,9 +2763,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;
@@ -2915,7 +2897,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 */
im.bkg_image = NULL; /* do not put anything to background per default */
im.ovl_image = NULL; /* do not use anything as overlay per default */
@@ -3207,6 +3189,7 @@ im.unit = 0; /* do not display unit if n
int argstart=0;
int strstart=0;
char varname[30],*rpnex;
+ unsigned tm_tmp=0;
gdes_alloc(&im);
if(sscanf(argv[i],"%10[A-Z0-9]:%n",symname,&argstart)==1){
if((im.gdes[im.gdes_c-1].gf=gf_conv(symname))==-1){
@@ -3286,12 +3269,13 @@ im.unit = 0; /* do not display unit if n
case GF_VRULE:
if(sscanf(
&argv[i][argstart],
- "%lu#%2x%2x%2x:%n",
- &im.gdes[im.gdes_c-1].xrule,
+ "%u#%2x%2x%2x:%n",
+ &tm_tmp,
&col_red,
&col_green,
&col_blue,
&strstart) >= 4){
+ im.gdes[im.gdes_c-1].xrule = tm_tmp,
im.gdes[im.gdes_c-1].col.red = col_red;
im.gdes[im.gdes_c-1].col.green = col_green;
im.gdes[im.gdes_c-1].col.blue = col_blue;