1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Fix new compiler error in -current.

Submitted by:		Alexander Langer <alex@big.endian.de>
All no response from:	maintainer
This commit is contained in:
R. Imura 2000-02-12 19:17:21 +00:00
parent be6e15d519
commit f4001e4a49
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25698
19 changed files with 741 additions and 2 deletions

72
devel/re2c/files/patch-ac Normal file
View File

@ -0,0 +1,72 @@
--- dfa.cc.old Fri Feb 4 15:18:55 2000
+++ dfa.cc Fri Feb 4 15:22:57 2000
@@ -109,6 +109,7 @@
uint nc = ub - lb;
GoTo *goTo = new GoTo[nc];
Span *span = new Span[nc];
+ uint j;
memset((char*) goTo, 0, nc*sizeof(GoTo));
tail = &head;
head = NULL;
@@ -123,7 +124,7 @@
uint nGoTos = 0;
s->rule = NULL;
- for(iP = s->kernel; i = *iP; ++iP){
+ for(iP = s->kernel; (i = *iP) != NULL; ++iP){
if(i->i.tag == CHAR){
for(Ins *j = i + 1; j < (Ins*) i->i.link; ++j){
if(!(j->c.link = goTo[j->c.value - lb].to))
@@ -136,7 +137,7 @@
}
}
- for(uint j = 0; j < nGoTos; ++j){
+ for(j = 0; j < nGoTos; ++j){
GoTo *go = &goTo[goTo[j].ch - lb];
i = (Ins*) go->to;
for(cP = work; i; i = (Ins*) i->c.link)
@@ -169,7 +170,7 @@
DFA::~DFA(){
State *s;
- while(s = head){
+ while((s = head) != NULL){
head = s->next;
delete s;
}
@@ -185,11 +186,12 @@
State *DFA::findState(Ins **kernel, uint kCount){
Ins **cP, **iP, *i;
+ State *s;
kernel[kCount] = NULL;
cP = kernel;
- for(iP = kernel; i = *iP; ++iP){
+ for(iP = kernel; (i = *iP) != NULL; ++iP){
if(i->i.tag == CHAR || i->i.tag == TERM){
*cP++ = i;
} else {
@@ -199,9 +201,9 @@
kCount = cP - kernel;
kernel[kCount] = NULL;
- for(State *s = head; s; s = s->next){
+ for(s = head; s; s = s->next){
if(s->kCount == kCount){
- for(iP = s->kernel; i = *iP; ++iP)
+ for(iP = s->kernel; (i = *iP) != NULL; ++iP)
if(!isMarked(i))
goto nextState;
goto unmarkAll;
@@ -218,7 +220,7 @@
toDo = s;
unmarkAll:
- for(iP = kernel; i = *iP; ++iP)
+ for(iP = kernel; (i = *iP) != NULL; ++iP)
unmark(i);
return s;

13
devel/re2c/files/patch-ad Normal file
View File

@ -0,0 +1,13 @@
--- actions.cc.old Fri Feb 4 15:23:32 2000
+++ actions.cc Fri Feb 4 15:24:14 2000
@@ -460,8 +460,9 @@
void genCode(ostream& o, RegExp *re){
CharSet cs;
+ uint j;
memset(&cs, 0, sizeof(cs));
- for(uint j = 0; j < nChars; ++j){
+ for(j = 0; j < nChars; ++j){
cs.rep[j] = &cs.ptn[0];
cs.ptn[j].nxt = &cs.ptn[j+1];
}

View File

@ -16,7 +16,7 @@ MAINTAINER= erich@FreeBSD.org
BUILD_DEPENDS= ${X11BASE}/include/pbmplus.h:${PORTSDIR}/graphics/netpbm
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 400002
.if ${OSVERSION} > 400002 && ${OSVERSION} < 400012
BROKEN= won\'t build with egcs compiler
.endif

View File

@ -0,0 +1,47 @@
--- editor/2x2_window.C.orig Mon May 8 16:08:35 1995
+++ editor/2x2_window.C Thu Feb 3 21:24:19 2000
@@ -25,6 +25,8 @@
#include <iostream.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
DblWindow::DblWindow(UI_Globals *parent, world_c x, world_c y,
unsigned int height, unsigned int width, void (*cb)(void) )
: YUV_Window(parent,x,y,height*2,width*2,this, ButtonPressMask |
@@ -139,7 +141,7 @@
ximage = XCreateImage(DispPointer(),None,8,ZPixmap,0,&dummy,width*2,
height*2,8,0);
- ximage->data = new byte[ximage->bytes_per_line*height*2];
+ ximage->data = (char *) new byte[ximage->bytes_per_line*height*2];
assert(ximage->data!=NULL);
#ifdef SH_MEM
@@ -160,7 +162,7 @@
for(int j = 0; j < ncolors; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (long unsigned int *) &tmp_pixel, 1, 0);
}
#ifdef SH_MEM
@@ -259,7 +261,7 @@
for(int j = 0; j < i; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (long unsigned 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";
@@ -363,7 +365,7 @@
{
assert(Frame.width()==ximage->width/2);
assert(Frame.height()==ximage->height/2);
- 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)
{

View File

@ -0,0 +1,47 @@
--- editor/mono_window.C.orig Sat May 20 17:47:32 1995
+++ editor/mono_window.C Thu Feb 3 21:27:07 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
MonoWindow::MonoWindow(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
}
@@ -154,7 +156,7 @@
for(int j = 0; j < GRAY_RANGE; 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);
@@ -222,7 +224,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"
<< "monochrome window. Please re-run with the option "
@@ -254,7 +256,7 @@
{
assert(Frame.width()==ximage->width);
assert(Frame.height()==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->width*ximage->height);
+ DitherImage(Frame.lum_ptr(),(unsigned char *)ximage->data,ximage->width*ximage->height);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,29 @@
--- editor/bw_window.C.orig Mon May 8 16:15:00 1995
+++ editor/bw_window.C Thu Feb 3 21:29:23 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
BwWindow::BwWindow(UI_Globals *parent,world_c x,world_c y,unsigned int height,
unsigned int width, void (*cb)(void) )
: YUV_Window(parent,x,y,height,width,this, ButtonPressMask |
@@ -143,7 +145,7 @@
height,8,0);
ximage->byte_order = MSBFirst;
ximage->bitmap_bit_order = MSBFirst;
- 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
}
@@ -213,7 +215,7 @@
{
assert(Frame.width()==ximage->width);
assert(Frame.height()==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->height,ximage->width);
+ DitherImage(Frame.lum_ptr(),(unsigned char*)ximage->data,ximage->height,ximage->width);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,31 @@
--- MpegCodec/mpeg.H.orig Sat May 20 19:11:43 1995
+++ MpegCodec/mpeg.H Thu Feb 3 21:31:00 2000
@@ -59,7 +59,7 @@
status Write(const frame &); // Overwrites the current frame
status Undo(void); // Undoes the last write to current frame
status Delete(void); // Deletes current frame
- status Insert(int no_of_frames,const frame **);
+ status Insert(int no_of_frames, frame **);
// Inserts a number of frames
unsigned int Height(void) const; // Returns the height of the frames
unsigned int Width(void) const; // Returns the width of the frames
@@ -128,14 +128,14 @@
long file_length; // The length of the (virtual) file, in frames
long cache_size; // Number of frames that cache will fit
static const int fps_table[16]; //The table of valid frames per second values
- const int min_frame_type=1; // Min number for a valid frame type
- const int max_frame_type=4; // Max number for a valid frame type
+ static const int min_frame_type=1; // Min number for a valid frame type
+ static const int max_frame_type=4; // Max number for a valid frame type
static const frame_type FrameTypes[max_frame_type+1];
// The list of valid frame types
- const long gopSize=10; // The number of frames between GOP headers
- const int pattern_size=8; // The size of the IBBPBBI pattern
+ static const long gopSize=10; // The number of frames between GOP headers
+ static const int pattern_size=8; // The size of the IBBPBBI pattern
static const char pattern[pattern_size]; // The IBBPBBI pattern
- const int mpegcache_size=12; // The size of the mpeg frame cache
+ static const int mpegcache_size=12; // The size of the mpeg frame cache
mpg_cache MpegCache[mpegcache_size]; // The mpeg frame cache
int cache_curpos; // Current position in the cache
void (*callback)(byte *,abs_addr); // Stores the callback function

View File

@ -0,0 +1,47 @@
--- editor/tiny_window.C.orig Mon May 8 16:09:07 1995
+++ editor/tiny_window.C Thu Feb 3 21:33:57 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
TinyWindow::TinyWindow(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/2,height/2,8,0);
- ximage->data = new byte[ximage->bytes_per_line*height/2];
+ ximage->data = (char *) new byte[ximage->bytes_per_line*height/2];
assert(ximage->data!=NULL);
#ifdef SH_MEM
}
@@ -154,7 +156,7 @@
for(int j = 0; j < GRAY_RANGE; 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);
@@ -222,7 +224,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"
<< "monochrome window. Please re-run with the option "
@@ -254,7 +256,7 @@
{
assert(Frame.width()/2==ximage->width);
assert(Frame.height()/2==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->height,ximage->width);
+ DitherImage(Frame.lum_ptr(),(unsigned char *)ximage->data,ximage->height,ximage->width);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,47 @@
--- 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)
{

View File

@ -0,0 +1,65 @@
--- ui/main_win.C.orig Mon May 8 16:16:44 1995
+++ ui/main_win.C Thu Feb 3 21:39:37 2000
@@ -137,8 +137,8 @@
// Call XWMGeometry. It will decide the actual geometry of the window
int bitmask = XWMGeometry(DispPointer(),DefaultScreen(DispPointer()), geom,
- def_geom,BorderWidth,&xsh,&main_x,&main_y,
- &main_width,&main_height,&main_gravity);
+ def_geom,BorderWidth,&xsh,(int *) &main_x,(int *) &main_y,
+ (int *) &main_width, (int *) &main_height,&main_gravity);
// bitmask will hold the values that need to be changed to reflect the
// suggestions made by XWMGeometry. This will be done by the window
@@ -167,7 +167,7 @@
// Have a little chat with the window manager....
- win_name.value = name;
+ win_name.value = (unsigned char *) name;
win_name.encoding = XA_STRING;
win_name.format = 8;
win_name.nitems = strlen(name);
@@ -276,6 +276,7 @@
MainWindow::status MainWindow::event_handler(XEvent *Event)
{
+#if 0
switch(Event->type)
{
case Expose:
@@ -309,6 +310,7 @@
default:
break;
}
+#endif
return(okay);
}
@@ -348,7 +350,7 @@
Window root;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),WinId(),&root,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),WinId(),&root,(int *) &x,(int *) &y,&width,&height,
&bd_width,&depth);
return depth;
}
@@ -359,7 +361,7 @@
Window root2;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),root,&root2,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),root,&root2,(int *) &x,(int *) &y,&width,&height,
&bd_width,&depth);
return height;
}
@@ -370,7 +372,7 @@
Window root2;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),root,&root2,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),root,&root2,(int *) &x, (int *) &y,&width,&height,
&bd_width,&depth);
return width;
}

View File

@ -16,7 +16,7 @@ MAINTAINER= erich@FreeBSD.org
BUILD_DEPENDS= ${X11BASE}/include/pbmplus.h:${PORTSDIR}/graphics/netpbm
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 400002
.if ${OSVERSION} > 400002 && ${OSVERSION} < 400012
BROKEN= won\'t build with egcs compiler
.endif

View File

@ -0,0 +1,47 @@
--- editor/2x2_window.C.orig Mon May 8 16:08:35 1995
+++ editor/2x2_window.C Thu Feb 3 21:24:19 2000
@@ -25,6 +25,8 @@
#include <iostream.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
DblWindow::DblWindow(UI_Globals *parent, world_c x, world_c y,
unsigned int height, unsigned int width, void (*cb)(void) )
: YUV_Window(parent,x,y,height*2,width*2,this, ButtonPressMask |
@@ -139,7 +141,7 @@
ximage = XCreateImage(DispPointer(),None,8,ZPixmap,0,&dummy,width*2,
height*2,8,0);
- ximage->data = new byte[ximage->bytes_per_line*height*2];
+ ximage->data = (char *) new byte[ximage->bytes_per_line*height*2];
assert(ximage->data!=NULL);
#ifdef SH_MEM
@@ -160,7 +162,7 @@
for(int j = 0; j < ncolors; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (long unsigned int *) &tmp_pixel, 1, 0);
}
#ifdef SH_MEM
@@ -259,7 +261,7 @@
for(int j = 0; j < i; j ++)
{
tmp_pixel = col_array[j];
- XFreeColors(DispPointer(), Colourmap, &tmp_pixel, 1, 0);
+ XFreeColors(DispPointer(), Colourmap, (long unsigned 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";
@@ -363,7 +365,7 @@
{
assert(Frame.width()==ximage->width/2);
assert(Frame.height()==ximage->height/2);
- 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)
{

View File

@ -0,0 +1,47 @@
--- editor/mono_window.C.orig Sat May 20 17:47:32 1995
+++ editor/mono_window.C Thu Feb 3 21:27:07 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
MonoWindow::MonoWindow(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
}
@@ -154,7 +156,7 @@
for(int j = 0; j < GRAY_RANGE; 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);
@@ -222,7 +224,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"
<< "monochrome window. Please re-run with the option "
@@ -254,7 +256,7 @@
{
assert(Frame.width()==ximage->width);
assert(Frame.height()==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->width*ximage->height);
+ DitherImage(Frame.lum_ptr(),(unsigned char *)ximage->data,ximage->width*ximage->height);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,29 @@
--- editor/bw_window.C.orig Mon May 8 16:15:00 1995
+++ editor/bw_window.C Thu Feb 3 21:29:23 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
BwWindow::BwWindow(UI_Globals *parent,world_c x,world_c y,unsigned int height,
unsigned int width, void (*cb)(void) )
: YUV_Window(parent,x,y,height,width,this, ButtonPressMask |
@@ -143,7 +145,7 @@
height,8,0);
ximage->byte_order = MSBFirst;
ximage->bitmap_bit_order = MSBFirst;
- 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
}
@@ -213,7 +215,7 @@
{
assert(Frame.width()==ximage->width);
assert(Frame.height()==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->height,ximage->width);
+ DitherImage(Frame.lum_ptr(),(unsigned char*)ximage->data,ximage->height,ximage->width);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,31 @@
--- MpegCodec/mpeg.H.orig Sat May 20 19:11:43 1995
+++ MpegCodec/mpeg.H Thu Feb 3 21:31:00 2000
@@ -59,7 +59,7 @@
status Write(const frame &); // Overwrites the current frame
status Undo(void); // Undoes the last write to current frame
status Delete(void); // Deletes current frame
- status Insert(int no_of_frames,const frame **);
+ status Insert(int no_of_frames, frame **);
// Inserts a number of frames
unsigned int Height(void) const; // Returns the height of the frames
unsigned int Width(void) const; // Returns the width of the frames
@@ -128,14 +128,14 @@
long file_length; // The length of the (virtual) file, in frames
long cache_size; // Number of frames that cache will fit
static const int fps_table[16]; //The table of valid frames per second values
- const int min_frame_type=1; // Min number for a valid frame type
- const int max_frame_type=4; // Max number for a valid frame type
+ static const int min_frame_type=1; // Min number for a valid frame type
+ static const int max_frame_type=4; // Max number for a valid frame type
static const frame_type FrameTypes[max_frame_type+1];
// The list of valid frame types
- const long gopSize=10; // The number of frames between GOP headers
- const int pattern_size=8; // The size of the IBBPBBI pattern
+ static const long gopSize=10; // The number of frames between GOP headers
+ static const int pattern_size=8; // The size of the IBBPBBI pattern
static const char pattern[pattern_size]; // The IBBPBBI pattern
- const int mpegcache_size=12; // The size of the mpeg frame cache
+ static const int mpegcache_size=12; // The size of the mpeg frame cache
mpg_cache MpegCache[mpegcache_size]; // The mpeg frame cache
int cache_curpos; // Current position in the cache
void (*callback)(byte *,abs_addr); // Stores the callback function

View File

@ -0,0 +1,47 @@
--- editor/tiny_window.C.orig Mon May 8 16:09:07 1995
+++ editor/tiny_window.C Thu Feb 3 21:33:57 2000
@@ -24,6 +24,8 @@
#include <assert.h>
#include <stdlib.h>
+extern "C" int XShmGetEventBase(Display *);
+
TinyWindow::TinyWindow(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/2,height/2,8,0);
- ximage->data = new byte[ximage->bytes_per_line*height/2];
+ ximage->data = (char *) new byte[ximage->bytes_per_line*height/2];
assert(ximage->data!=NULL);
#ifdef SH_MEM
}
@@ -154,7 +156,7 @@
for(int j = 0; j < GRAY_RANGE; 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);
@@ -222,7 +224,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"
<< "monochrome window. Please re-run with the option "
@@ -254,7 +256,7 @@
{
assert(Frame.width()/2==ximage->width);
assert(Frame.height()/2==ximage->height);
- DitherImage(Frame.lum_ptr(),ximage->data,ximage->height,ximage->width);
+ DitherImage(Frame.lum_ptr(),(unsigned char *)ximage->data,ximage->height,ximage->width);
if(nicely)
{
XEvent Event;

View File

@ -0,0 +1,47 @@
--- 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)
{

View File

@ -0,0 +1,65 @@
--- ui/main_win.C.orig Mon May 8 16:16:44 1995
+++ ui/main_win.C Thu Feb 3 21:39:37 2000
@@ -137,8 +137,8 @@
// Call XWMGeometry. It will decide the actual geometry of the window
int bitmask = XWMGeometry(DispPointer(),DefaultScreen(DispPointer()), geom,
- def_geom,BorderWidth,&xsh,&main_x,&main_y,
- &main_width,&main_height,&main_gravity);
+ def_geom,BorderWidth,&xsh,(int *) &main_x,(int *) &main_y,
+ (int *) &main_width, (int *) &main_height,&main_gravity);
// bitmask will hold the values that need to be changed to reflect the
// suggestions made by XWMGeometry. This will be done by the window
@@ -167,7 +167,7 @@
// Have a little chat with the window manager....
- win_name.value = name;
+ win_name.value = (unsigned char *) name;
win_name.encoding = XA_STRING;
win_name.format = 8;
win_name.nitems = strlen(name);
@@ -276,6 +276,7 @@
MainWindow::status MainWindow::event_handler(XEvent *Event)
{
+#if 0
switch(Event->type)
{
case Expose:
@@ -309,6 +310,7 @@
default:
break;
}
+#endif
return(okay);
}
@@ -348,7 +350,7 @@
Window root;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),WinId(),&root,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),WinId(),&root,(int *) &x,(int *) &y,&width,&height,
&bd_width,&depth);
return depth;
}
@@ -359,7 +361,7 @@
Window root2;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),root,&root2,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),root,&root2,(int *) &x,(int *) &y,&width,&height,
&bd_width,&depth);
return height;
}
@@ -370,7 +372,7 @@
Window root2;
unsigned int x,y,width,height;
unsigned int bd_width, depth;
- XGetGeometry(DispPointer(),root,&root2,&x,&y,&width,&height,
+ XGetGeometry(DispPointer(),root,&root2,(int *) &x, (int *) &y,&width,&height,
&bd_width,&depth);
return width;
}

View File

@ -0,0 +1,28 @@
--- main.c.old Thu Feb 3 15:39:27 2000
+++ main.c Thu Feb 3 16:52:18 2000
@@ -160,8 +160,8 @@
exit (EX_USAGE);
}
-void main(int argc, char *argv[]) {
+int main(int argc, char *argv[]) {
struct sigaction sv;
u_long net=0, mask=0, ns=0;
char *zone = "*";
@@ -209,7 +208,7 @@
openlog ("macipgw", LOG_PID | gDebug ? LOG_PERROR : 0, LOG_DAEMON);
sv.sa_handler = die;
- sv.sa_mask = 0;
+ sigemptyset(&(sv.sa_mask));
sv.sa_flags = 0;
if (sigaction( SIGTERM, &sv, 0 ) < 0 ) {
syslog( LOG_ERR, "sigaction: %m" );
@@ -243,5 +242,6 @@
server();
die (0);
+ return(0);
}