freebsd-ports/graphics/mpegedit/files/patch-ah
R. Imura f4001e4a49 Fix new compiler error in -current.
Submitted by:		Alexander Langer <alex@big.endian.de>
All no response from:	maintainer
2000-02-12 19:17:21 +00:00

47 lines
1.6 KiB
Text

--- editor/colour_window.C.orig Tue May 9 21:41:30 1995
+++ editor/colour_window.C Thu Feb 3 21:35:30 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
ColourWindow::ColourWindow(UI_Globals *parent,world_c x,world_c y,
unsigned int height,unsigned int width,
void (*cb)(void) )
@@ -137,7 +139,7 @@
ximage=XCreateImage(DispPointer(),None,8,ZPixmap,0,&dummy,
width,height,8,0);
- ximage->data = new byte[ximage->bytes_per_line*height];
+ ximage->data = (char *) new byte[ximage->bytes_per_line*height];
assert(ximage->data!=NULL);
#ifdef SH_MEM
}
@@ -158,7 +160,7 @@
for(j = 0; j < ncolors; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (unsigned long int *) &tmp_pixel, 1, 0);
}
XFreeGC(DispPointer(),gc);
@@ -253,7 +255,7 @@
for(int j = 0; j < i; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (unsigned long int *) &tmp_pixel, 1, 0);
}
cerr << "Unable to allocate the colours required to make the\n"
<< "colour window. Please re-run with the option -private cols\n";
@@ -359,7 +361,7 @@
{
assert(Frame.width()==ximage->width);
assert(Frame.height()==ximage->height);
- DitherImage(Frame.lum_ptr(),Frame.Cr_ptr(),Frame.Cb_ptr(),ximage->data,
+ DitherImage(Frame.lum_ptr(),Frame.Cr_ptr(),Frame.Cb_ptr(),(unsigned char *)ximage->data,
Frame.width(),Frame.height());
if(nicely)
{