9e133a46d54feb2a8a3b951ed7cab070cb4b5de7
[pkgsrc.git] / graphics / plotutils / patches / patch-ac
1 $NetBSD: patch-ac,v 1.1 2003/09/09 14:52:56 jmmv Exp $
2
3 --- libplot/n_write.c.orig      2000-06-16 14:42:13.000000000 +0900
4 +++ libplot/n_write.c   2003-09-09 21:22:38.000000000 +0900
5 @@ -208,7 +208,7 @@
6                   linebuf[pos++] = '0';
7                 if (pos >= MAX_PBM_PIXELS_PER_LINE || i == (width - 1))
8                   {
9 -                   stream->write (linebuf, pos);
10 +                   stream->write ((const char *)linebuf, pos);
11                     stream->put ('\n');
12  
13                     pos = 0;
14 @@ -253,7 +253,7 @@
15                   rowbuf[bytecount++] = outbyte;
16                 }
17               /* emit row of bytes */
18 -             stream->write (rowbuf, bytecount);
19 +             stream->write ((const char *)rowbuf, bytecount);
20             }
21  
22           free (rowbuf);
23 @@ -366,7 +366,7 @@
24                 num_pixels++;
25                 if (num_pixels >= MAX_PGM_PIXELS_PER_LINE || i == (width - 1))
26                   {
27 -                   stream->write (linebuf, pos);
28 +                   stream->write ((const char *)linebuf, pos);
29                     stream->put ('\n');
30  
31                     num_pixels = 0;
32 @@ -392,7 +392,7 @@
33             {
34               for (i = 0; i < width; i++)
35                 rowbuf[i] = pixmap[j][i].u.rgb[0];
36 -             stream->write (rowbuf, width);
37 +             stream->write ((const char *)rowbuf, width);
38             }
39           free (rowbuf);
40         }
41 @@ -514,7 +514,7 @@
42                 num_pixels++;
43                 if (num_pixels >= MAX_PPM_PIXELS_PER_LINE || i == (width - 1))
44                   {
45 -                   stream->write (linebuf, pos);
46 +                   stream->write ((const char *)linebuf, pos);
47                     stream->put ('\n');
48  
49                     num_pixels = 0;
50 @@ -542,7 +542,7 @@
51               for (i = 0; i < width; i++)
52                 for (component = 0; component < 3; component++)
53                   rowbuf[3 * i + component] = pixmap[j][i].u.rgb[component];
54 -             stream->write (rowbuf, 3 * width);
55 +             stream->write ((const char *)rowbuf, 3 * width);
56             }
57           free (rowbuf);
58         }