1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 04_cast_to_char.dpatch by <Floris Bruynooghe <fb102@soton.ac.uk>>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Adds a cast to (char*).
8
diff -urNad plotutils-2.4.1/libplot/g_write.c /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/g_write.c
9
--- plotutils-2.4.1/libplot/g_write.c 2005-05-06 20:16:38.603358003 +0100
10
+++ /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/g_write.c 2005-05-06 20:22:41.194211664 +0100
14
else if (data->outstream)
15
- data->outstream->write(c, n);
16
+ data->outstream->write((char*)c, n);
20
diff -urNad plotutils-2.4.1/libplot/i_rle.c /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/i_rle.c
21
--- plotutils-2.4.1/libplot/i_rle.c 1999-06-27 17:58:10.000000000 +0100
22
+++ /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/i_rle.c 2005-05-06 20:23:49.530251054 +0100
24
else if (rle->outstream)
26
rle->outstream->put ((unsigned char)(rle->oblen));
27
- rle->outstream->write (&(rle->oblock[0]), rle->oblen);
28
+ rle->outstream->write ((char*)&(rle->oblock[0]), rle->oblen);
32
diff -urNad plotutils-2.4.1/libplot/n_write.c /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/n_write.c
33
--- plotutils-2.4.1/libplot/n_write.c 2005-05-06 20:16:38.605357562 +0100
34
+++ /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/n_write.c 2005-05-06 20:29:00.867515857 +0100
37
if (pos >= MAX_PBM_PIXELS_PER_LINE || i == (width - 1))
39
- stream->write (linebuf, pos);
40
+ stream->write ((char*)linebuf, pos);
45
rowbuf[bytecount++] = outbyte;
47
/* emit row of bytes */
48
- stream->write (rowbuf, bytecount);
49
+ stream->write ((char*)rowbuf, bytecount);
55
if (num_pixels >= MAX_PGM_PIXELS_PER_LINE || i == (width - 1))
57
- stream->write (linebuf, pos);
58
+ stream->write ((char*)linebuf, pos);
64
for (i = 0; i < width; i++)
65
rowbuf[i] = pixmap[j][i].u.rgb[0];
66
- stream->write (rowbuf, width);
67
+ stream->write ((char*)rowbuf, width);
73
if (num_pixels >= MAX_PPM_PIXELS_PER_LINE || i == (width - 1))
75
- stream->write (linebuf, pos);
76
+ stream->write ((char*)linebuf, pos);
81
for (i = 0; i < width; i++)
82
for (component = 0; component < 3; component++)
83
rowbuf[3 * i + component] = pixmap[j][i].u.rgb[component];
84
- stream->write (rowbuf, 3 * width);
85
+ stream->write ((char*)rowbuf, 3 * width);
89
diff -urNad plotutils-2.4.1/libplot/z_write.c /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/z_write.c
90
--- plotutils-2.4.1/libplot/z_write.c 2005-05-06 20:16:38.605357562 +0100
91
+++ /tmp/dpep.eL2Tpn/plotutils-2.4.1/libplot/z_write.c 2005-05-06 20:29:36.338054057 +0100
95
stream = (ostream *)png_get_io_ptr (png_ptr);
96
- stream->write (data, length);
97
+ stream->write ((char*)data, length);