summaryrefslogtreecommitdiff
path: root/graphics/plotutils/patches/patch-ac
blob: 9e133a46d54feb2a8a3b951ed7cab070cb4b5de7 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
$NetBSD: patch-ac,v 1.1 2003/09/09 14:52:56 jmmv Exp $

--- libplot/n_write.c.orig	2000-06-16 14:42:13.000000000 +0900
+++ libplot/n_write.c	2003-09-09 21:22:38.000000000 +0900
@@ -208,7 +208,7 @@
 		  linebuf[pos++] = '0';
 		if (pos >= MAX_PBM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    pos = 0;
@@ -253,7 +253,7 @@
 		  rowbuf[bytecount++] = outbyte;
 		}
 	      /* emit row of bytes */
-	      stream->write (rowbuf, bytecount);
+	      stream->write ((const char *)rowbuf, bytecount);
 	    }
 
 	  free (rowbuf);
@@ -366,7 +366,7 @@
 		num_pixels++;
 		if (num_pixels >= MAX_PGM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    num_pixels = 0;
@@ -392,7 +392,7 @@
 	    {
 	      for (i = 0; i < width; i++)
 		rowbuf[i] = pixmap[j][i].u.rgb[0];
-	      stream->write (rowbuf, width);
+	      stream->write ((const char *)rowbuf, width);
 	    }
 	  free (rowbuf);
 	}
@@ -514,7 +514,7 @@
 		num_pixels++;
 		if (num_pixels >= MAX_PPM_PIXELS_PER_LINE || i == (width - 1))
 		  {
-		    stream->write (linebuf, pos);
+		    stream->write ((const char *)linebuf, pos);
 		    stream->put ('\n');
 
 		    num_pixels = 0;
@@ -542,7 +542,7 @@
 	      for (i = 0; i < width; i++)
 		for (component = 0; component < 3; component++)
 		  rowbuf[3 * i + component] = pixmap[j][i].u.rgb[component];
-	      stream->write (rowbuf, 3 * width);
+	      stream->write ((const char *)rowbuf, 3 * width);
 	    }
 	  free (rowbuf);
 	}