summaryrefslogtreecommitdiff
path: root/sysutils/xuvmstat/patches/patch-ad
blob: 9f21e660e48df724df70b26486737e7cc4f3df27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$NetBSD: patch-ad,v 1.3 2013/09/10 14:45:05 joerg Exp $

--- libcdcx.c.orig	2005-09-09 13:38:48.000000000 +0000
+++ libcdcx.c
@@ -31,6 +31,7 @@
  */
 
 
+#include <err.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -164,7 +165,7 @@ u_long *vals, *colors, backcolor;
   colwidth = barwidth / cols;
   
   for (lcv = 0 ; lcv < n ; lcv++) {
-    snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
+    snprintf(buf, sizeof(buf), "%s = %lu", names[lcv], vals[lcv]);
     XSetForeground(xdpy->dpy, gc, colors[lcv]);
     XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
               buf, strlen(buf));
@@ -252,7 +253,7 @@ u_long *vals, *colors, backcolor;
   colwidth = barwidth / cols;
   
   for (lcv = 0 ; lcv < n ; lcv++) {
-    snprintf(buf, sizeof(buf), "%s = %d", names[lcv], vals[lcv]);
+    snprintf(buf, sizeof(buf), "%s = %lu", names[lcv], vals[lcv]);
     XSetForeground(xdpy->dpy, gc, colors[lcv]);
     XDrawImageString(xdpy->dpy, win, gc, x, get_fontheight(font) + y,
               buf, strlen(buf));
@@ -285,7 +286,7 @@ struct graph *create_graph(nlines, title
 int nlines;
 char *title;
 char **names;
-int **before, **after;
+int64_t **before, **after;
 u_long *colors;
 u_long backcolor;