From owner-freebsd-ports Thu Feb 3 13: 6:24 2000 Delivered-To: freebsd-ports@freebsd.org Received: from mail.surf1.de (mail.Surf1.de [194.25.165.21]) by builder.freebsd.org (Postfix) with ESMTP id 32589425A; Thu, 3 Feb 2000 13:06:08 -0800 (PST) Received: from cichlids.com (pC19F54B7.dip0.t-ipconnect.de [193.159.84.183]) by mail.surf1.de (8.9.3/8.9.3) with ESMTP id WAA05689; Thu, 3 Feb 2000 22:02:29 +0100 Received: from cichlids.cichlids.com (cichlids.cichlids.com [192.168.0.10]) by cichlids.com (Postfix) with ESMTP id 292A0AB98; Thu, 3 Feb 2000 22:02:26 +0100 (CET) Received: (from alex@localhost) by cichlids.cichlids.com (8.9.3/8.9.3) id WAA10087; Thu, 3 Feb 2000 22:02:56 +0100 (CET) (envelope-from alex) Date: Thu, 3 Feb 2000 22:02:56 +0100 From: Alexander Langer To: erich@freebsd.org Cc: ports@freebsd.org Subject: fix for graphics/mpegedit (bentofied) Message-ID: <20000203220256.A10059@cichlids.cichlids.com> Mail-Followup-To: erich@freebsd.org, ports@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YiEDa0DAkWCtVeE4" X-Mailer: Mutt 1.0i X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Hello Erich. This is a fix for your graphics/mpegedit port for -current. I CC'ed -ports to make this patch visible to the world, so maybe, if you are on vacation or something, anyone else can review/commit it before 4.0-RELEASE. Alex -- I doubt, therefore I might be. --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mpegedit.diff" diff -rNu mpegedit.old/Makefile mpegedit/Makefile --- mpegedit.old/Makefile Thu Feb 3 22:00:17 2000 +++ mpegedit/Makefile Thu Feb 3 21:20:26 2000 @@ -16,7 +16,7 @@ BUILD_DEPENDS= ${X11BASE}/include/pbmplus.h:${PORTSDIR}/graphics/netpbm .include -.if ${OSVERSION} > 400002 +.if ${OSVERSION} > 400002 && ${OSVERSION} < 400012 BROKEN= won\'t build with egcs compiler .endif diff -rNu mpegedit.old/patches/patch-aa mpegedit/patches/patch-aa --- mpegedit.old/patches/patch-aa Thu Feb 3 22:00:16 2000 +++ mpegedit/patches/patch-aa Thu Feb 3 21:40:38 2000 @@ -306,25 +306,6 @@ -include $(DEPFILE) +#include $(DEPFILE) #endif -diff -ru ./ui/main_win.C /src/build/Mpeg/mpegedit_v2.2/ui/main_win.C ---- ./ui/main_win.C Mon May 8 09:16:44 1995 -+++ /src/build/Mpeg/mpegedit_v2.2/ui/main_win.C Mon Mar 4 15:25:47 1996 -@@ -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); - } - diff -ru ./ui/text_win.C /src/build/Mpeg/mpegedit_v2.2/ui/text_win.C --- ./ui/text_win.C Sun Jun 18 05:56:57 1995 +++ /src/build/Mpeg/mpegedit_v2.2/ui/text_win.C Mon Mar 4 09:07:42 1996 diff -rNu mpegedit.old/patches/patch-ab mpegedit/patches/patch-ab --- mpegedit.old/patches/patch-ab Thu Feb 3 22:00:16 2000 +++ mpegedit/patches/patch-ab Thu Feb 3 21:36:32 2000 @@ -21,75 +21,3 @@ { Fstruct Fs; TempFrame TF; -diff -ru ../../w2/mpegedit_v2.2/MpegCodec/mpeg.H ./MpegCodec/mpeg.H ---- ../../w2/mpegedit_v2.2/MpegCodec/mpeg.H Sat May 20 12:11:43 1995 -+++ ./MpegCodec/mpeg.H Wed Oct 16 14:17:17 1996 -@@ -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 -diff -ru ../../w2/mpegedit_v2.2/editor/2x2_window.C ./editor/2x2_window.C ---- ../../w2/mpegedit_v2.2/editor/2x2_window.C Mon May 8 09:08:35 1995 -+++ ./editor/2x2_window.C Wed Oct 16 14:32:42 1996 -@@ -363,7 +363,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) - { -diff -ru ../../w2/mpegedit_v2.2/editor/bw_window.C ./editor/bw_window.C ---- ../../w2/mpegedit_v2.2/editor/bw_window.C Mon May 8 09:15:00 1995 -+++ ./editor/bw_window.C Wed Oct 16 14:43:40 1996 -@@ -213,7 +213,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; -diff -ru ../../w2/mpegedit_v2.2/editor/colour_window.C ./editor/colour_window.C ---- ../../w2/mpegedit_v2.2/editor/colour_window.C Tue May 9 14:41:30 1995 -+++ ./editor/colour_window.C Wed Oct 16 14:46:03 1996 -@@ -359,7 +359,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) - { -diff -ru ../../w2/mpegedit_v2.2/editor/mono_window.C ./editor/mono_window.C ---- ../../w2/mpegedit_v2.2/editor/mono_window.C Sat May 20 10:47:32 1995 -+++ ./editor/mono_window.C Wed Oct 16 14:38:16 1996 -@@ -254,7 +254,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; -diff -ru ../../w2/mpegedit_v2.2/editor/tiny_window.C ./editor/tiny_window.C ---- ../../w2/mpegedit_v2.2/editor/tiny_window.C Mon May 8 09:09:07 1995 -+++ ./editor/tiny_window.C Wed Oct 16 14:45:10 1996 -@@ -254,7 +254,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; diff -rNu mpegedit.old/patches/patch-ac mpegedit/patches/patch-ac --- mpegedit.old/patches/patch-ac Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ac Thu Feb 3 21:42:22 2000 @@ -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 + #include + ++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) + { diff -rNu mpegedit.old/patches/patch-ad mpegedit/patches/patch-ad --- mpegedit.old/patches/patch-ad Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ad Thu Feb 3 21:42:14 2000 @@ -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 + #include + ++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; diff -rNu mpegedit.old/patches/patch-ae mpegedit/patches/patch-ae --- mpegedit.old/patches/patch-ae Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ae Thu Feb 3 21:42:28 2000 @@ -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 + #include + ++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; diff -rNu mpegedit.old/patches/patch-af mpegedit/patches/patch-af --- mpegedit.old/patches/patch-af Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-af Thu Feb 3 21:32:14 2000 @@ -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 diff -rNu mpegedit.old/patches/patch-ag mpegedit/patches/patch-ag --- mpegedit.old/patches/patch-ag Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ag Thu Feb 3 21:48:11 2000 @@ -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 + #include + ++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; diff -rNu mpegedit.old/patches/patch-ah mpegedit/patches/patch-ah --- mpegedit.old/patches/patch-ah Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ah Thu Feb 3 21:48:18 2000 @@ -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 + #include + ++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) + { diff -rNu mpegedit.old/patches/patch-ai mpegedit/patches/patch-ai --- mpegedit.old/patches/patch-ai Thu Jan 1 01:00:00 1970 +++ mpegedit/patches/patch-ai Thu Feb 3 21:40:02 2000 @@ -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; + } --YiEDa0DAkWCtVeE4-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message