Index: head/multimedia/fxtv/Makefile =================================================================== --- head/multimedia/fxtv/Makefile (revision 434931) +++ head/multimedia/fxtv/Makefile (revision 434932) @@ -1,36 +1,38 @@ # Created by: Randall Hopper # $FreeBSD$ PORTNAME= fxtv PORTVERSION= 1.03 -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= multimedia MASTER_SITES= LOCAL/sanpei MAINTAINER= ports@FreeBSD.org COMMENT= X11-based TV display and capture application (for use with bt848 driver) -ONLY_FOR_ARCHS= i386 ia64 amd64 +LICENSE= BSD2CLAUSE LIB_DEPENDS= libtiff.so:graphics/tiff \ libXaw3d.so:x11-toolkits/Xaw3d -USES= gmake tar:tgz +ONLY_FOR_ARCHS= i386 ia64 amd64 + +USES= gmake jpeg tar:tgz MAKE_ENV= X11BASE=${LOCALBASE} USE_XORG= ice sm x11 xaw xext xmu xt xpm xxf86vm xxf86dga MAKE_FLAGS= -e OPTIONS_DEFINE= EXTRA EXTRA_DESC= Extra programs required to record/playback/save # This program does not actually require the programs below unless you # use audio/video recording and/or playback and save to a non-raw format. EXTRA_RUN_DEPENDS= sox:audio/sox \ mpg123:audio/mpg123 \ mpeg_encode:multimedia/mpeg_encode \ mplex:multimedia/mplex pre-install: - ${CP} -p ${WRKSRC}/fxtv.1 ${WRKSRC}/fxtv.man + @${CP} -p ${WRKSRC}/fxtv.1 ${WRKSRC}/fxtv.man .include Index: head/multimedia/fxtv/files/patch-Makefile =================================================================== --- head/multimedia/fxtv/files/patch-Makefile (revision 434931) +++ head/multimedia/fxtv/files/patch-Makefile (revision 434932) @@ -1,38 +1,38 @@ ---- Makefile.orig Tue Feb 13 09:08:59 2001 -+++ Makefile Sat Mar 10 17:36:25 2001 +--- Makefile.orig 2001-02-12 22:08:59 UTC ++++ Makefile @@ -62,7 +62,7 @@ endif ifneq ($(DEBUG),NO) override CFLAGS = -DDEBUG -g else - override CFLAGS = -DNDEBUG -O2 + override CFLAGS += -DNDEBUG #-O2 endif C_WARN_FLAG = -Wall override CFLAGS += $(C_WARN_FLAG) $(INC) $(CF_VERS) @@ -116,15 +116,17 @@ $(VIDEOLIB_LIB) : tv.o : tv.c app_rsrc.h install : fxtv - mkdir -p $(FXTV_LIBDIR)/bitmaps - install -c -m 444 -o root $(PIXMAPS) $(FXTV_LIBDIR)/bitmaps - install -c -m 444 -o root README $(FXTV_LIBDIR) - mkdir -p $(X11BASEINST)/lib/X11/app-defaults - install -c -m 444 -o root Fxtv $(X11BASEINST)/lib/X11/app-defaults - mkdir -p $(X11BASEINST)/bin - install -c -m 444 -o root fxtv.1 $(X11BASEINST)/man/man1/fxtv.1 - install -c -m 555 -o root fxtv $(X11BASEINST)/bin - install -c -m 555 -o root fxtv_cnvt.sh $(FXTV_LIBDIR) + mkdir -p $(DESTDIR)$(FXTV_LIBDIR)/bitmaps + $(BSD_INSTALL_DATA) $(PIXMAPS) $(DESTDIR)$(FXTV_LIBDIR)/bitmaps + $(BSD_INSTALL_DATA) README $(DESTDIR)$(FXTV_LIBDIR) + mkdir -p $(DESTDIR)$(X11BASEINST)/lib/X11/app-defaults + $(BSD_INSTALL_DATA) Fxtv \ + $(DESTDIR)$(X11BASEINST)/lib/X11/app-defaults + mkdir -p $(DESTDIR)$(X11BASEINST)/bin + $(BSD_INSTALL_MAN) fxtv.1 \ + $(DESTDIR)$(X11BASEINST)/man/man1/fxtv.1 + $(BSD_INSTALL_PROGRAM) fxtv $(DESTDIR)$(X11BASEINST)/bin + $(BSD_INSTALL_SCRIPT) fxtv_cnvt.sh $(DESTDIR)$(FXTV_LIBDIR) clean: rm -f *.o fxtv *.core *~ Index: head/multimedia/fxtv/files/patch-app_rsrc.h =================================================================== --- head/multimedia/fxtv/files/patch-app_rsrc.h (revision 434931) +++ head/multimedia/fxtv/files/patch-app_rsrc.h (revision 434932) @@ -1,188 +1,188 @@ ---- app_rsrc.h.orig 2001-02-12 22:17:53.000000000 +0100 +--- app_rsrc.h.orig 2001-02-12 21:17:53 UTC +++ app_rsrc.h @@ -525,96 +525,95 @@ static XtResource Resources[] = { }; -#define OPTION_HELP_STR "\ - BSD X TV (fxtv), Version " VERS_STR ". - Written by Randall Hopper - -Please mail Fxtv and Bt848 driver-related comments and help requests to the -multimedia@freebsd.org list. Feel free to subscribe and contribute -(listserv: majordomo@freebsd.org). - -Available options: - --driverDefaults - Use appearance parms from driver on startup --colorbars - Turn on colorbar display (for testing) --hue [-90...90] - Initial Hue ; def=0 --brightness [-50..50] - Initial Brightness (%); def=0 --contrast [0..200] - Initial Contrast (%); def=100 --satU [0..200] - U Saturation (%); def=100 --satV [0..284] - V Saturation (%); def=100 --aspectlock - Enable 4:3 aspect lock on video window - --deviceNumber <#> - bktr/tuner device numbers; def=0 --inputFormat - Tuner signal input format (ntsc,ntscm,ntscj, - palbdghi,pal,palm,paln,secam,palncomb,rsvd) - --tunerMode [cable|antenna] - Tuner Mode --defaultInput - Startup tuner signal input - [tuner|video|svideo|csvideo|dev3] --defaultAudioInput - Startup TV card audio input - [tuner|external|internal|auto] --defaultChannel <#> - Startup Channel Number --cableStationList <...> - List of cable station presets (see rsrc file) --antennaStationList <...> - List of antenna station presets --cableFreqSet - Freq set for cable (def = cableirc) - [nabcst|cableirc|cablehrc|weurope|jpnbcst| - jpncable|xussr|australia|france] --antennaFreqSet - Freq set for antenna (def = nabcst) - --noAudio - Suppress playing audio through soundcard --dspDevice - Override default DSP device (def=/dev/dsp) --mixerDevice - Override default mixer device (def=/dev/mixer) --mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video) - --stationInWinTitle - Display station text in window title --stationInWinIcon - Display station text in window icon - --stationAnnotFont - Font pattern for station annot (see rsrc file) --stationAnnotColor - Color for station annot --stationAnnotDelay - How long to display (0 = never; -1 = always) --stationAnnotIDOnly - Display station ID alone (when available) - --tunerModeAnnot{Font,Color,Delay} --inputDevAnnot{Font,Color,Delay} --volumeDevAnnot{Font,Color,Delay} --muteDevAnnot{Font,Color,Delay} - - Other annotation options (see stationAnnot) - --remoteType - Type of attached remote control - [None|X10|Hauppauge|PixelView] - --recCmdMpeg2 - MPEG-2 Audio record command --recCmdMpeg3 - MPEG-3 Audio record command --playCmdMpeg2 - MPEG-2 Audio play command --playCmdMpeg3 - MPEG-3 Audio play command - --videoCnvtScript - Video conversion workhorse script for vid encod. - --bswap2Bpp - Byte/word swap options for direct video --nobswap2Bpp (used to match driver's pixel format with --bswap3Bpp the video card's) --nobswap3Bpp --bswap4Bpp 2Bpp - 15/16-bpp modes --nobswap4Bpp 3Bpp - packed 24bpp modes --bwwap4Bpp 4Bpp - unpacked 24bpp modes --nowswap4Bpp - --Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode --Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode - --videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to - use for video capture; spreads load across disks - --noafc - Disable AFC --disableDirectV - Disable DMA transfers straight to video card --debug - Debug Msgs - {startup,driver,subproc,events,video,frame} --help - Display program options - -NOTE: All command line options are accessible as X resources as well. - The X resources have the same names as the command-line options. - See the sample Fxtv class resource file for details. -" +#define OPTION_HELP_STR \ +" BSD X TV (fxtv), Version " VERS_STR ".\n" \ +" Written by Randall Hopper\n" \ +"\n" \ +"Please mail Fxtv and Bt848 driver-related comments and help requests to the\n" \ +"multimedia@freebsd.org list. Feel free to subscribe and contribute\n" \ +"(listserv: majordomo@freebsd.org).\n" \ +"\n" \ +"Available options:\n" \ +"\n" \ +"-driverDefaults - Use appearance parms from driver on startup\n" \ +"-colorbars - Turn on colorbar display (for testing)\n" \ +"-hue [-90...90] - Initial Hue ; def=0\n" \ +"-brightness [-50..50] - Initial Brightness (%); def=0\n" \ +"-contrast [0..200] - Initial Contrast (%); def=100\n" \ +"-satU [0..200] - U Saturation (%); def=100\n" \ +"-satV [0..284] - V Saturation (%); def=100\n" \ +"-aspectlock - Enable 4:3 aspect lock on video window\n" \ +"\n" \ +"-deviceNumber <#> - bktr/tuner device numbers; def=0\n" \ +"-inputFormat - Tuner signal input format (ntsc,ntscm,ntscj,\n" \ +" palbdghi,pal,palm,paln,secam,palncomb,rsvd)\n" \ +"\n" \ +"-tunerMode [cable|antenna] - Tuner Mode\n" \ +"-defaultInput - Startup tuner signal input\n" \ +" [tuner|video|svideo|csvideo|dev3]\n" \ +"-defaultAudioInput - Startup TV card audio input\n" \ +" [tuner|external|internal|auto]\n" \ +"-defaultChannel <#> - Startup Channel Number\n" \ +"-cableStationList <...> - List of cable station presets (see rsrc file)\n" \ +"-antennaStationList <...> - List of antenna station presets\n" \ +"-cableFreqSet - Freq set for cable (def = cableirc)\n" \ +" [nabcst|cableirc|cablehrc|weurope|jpnbcst|\n" \ +" jpncable|xussr|australia|france]\n" \ +"-antennaFreqSet - Freq set for antenna (def = nabcst)\n" \ +"\n" \ +"-noAudio - Suppress playing audio through soundcard\n" \ +"-dspDevice - Override default DSP device (def=/dev/dsp)\n" \ +"-mixerDevice - Override default mixer device (def=/dev/mixer)\n" \ +"-mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video)\n" \ +"\n" \ +"-stationInWinTitle - Display station text in window title\n" \ +"-stationInWinIcon - Display station text in window icon\n" \ +"\n" \ +"-stationAnnotFont - Font pattern for station annot (see rsrc file)\n" \ +"-stationAnnotColor - Color for station annot\n" \ +"-stationAnnotDelay - How long to display (0 = never; -1 = always)\n" \ +"-stationAnnotIDOnly - Display station ID alone (when available)\n" \ +"\n" \ +"-tunerModeAnnot{Font,Color,Delay}\n" \ +"-inputDevAnnot{Font,Color,Delay}\n" \ +"-volumeDevAnnot{Font,Color,Delay}\n" \ +"-muteDevAnnot{Font,Color,Delay}\n" \ +" - Other annotation options (see stationAnnot)\n" \ +"\n" \ +"-remoteType - Type of attached remote control\n" \ +" [None|X10|Hauppauge|PixelView]\n" \ +"\n" \ +"-recCmdMpeg2 - MPEG-2 Audio record command\n" \ +"-recCmdMpeg3 - MPEG-3 Audio record command\n" \ +"-playCmdMpeg2 - MPEG-2 Audio play command\n" \ +"-playCmdMpeg3 - MPEG-3 Audio play command\n" \ +"\n" \ +"-videoCnvtScript - Video conversion workhorse script for vid encod.\n" \ +"\n" \ +"-bswap2Bpp - Byte/word swap options for direct video\n" \ +"-nobswap2Bpp (used to match driver's pixel format with\n" \ +"-bswap3Bpp the video card's)\n" \ +"-nobswap3Bpp\n" \ +"-bswap4Bpp 2Bpp - 15/16-bpp modes\n" \ +"-nobswap4Bpp 3Bpp - packed 24bpp modes\n" \ +"-bwwap4Bpp 4Bpp - unpacked 24bpp modes\n" \ +"-nowswap4Bpp\n" \ +"\n" \ +"-Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode\n" \ +"-Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode\n" \ +"\n" \ +"-videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to\n" \ +" use for video capture; spreads load across disks\n" \ +"\n" \ +"-noafc - Disable AFC\n" \ +"-disableDirectV - Disable DMA transfers straight to video card\n" \ +"-debug - Debug Msgs\n" \ +" {startup,driver,subproc,events,video,frame}\n" \ +"-help - Display program options\n" \ +"\n" \ +"NOTE: All command line options are accessible as X resources as well.\n" \ +" The X resources have the same names as the command-line options.\n" \ +" See the sample Fxtv class resource file for details.\n" static String fallback_resources[] = { /*"Fxtv.geometry: +10+10",*/ Index: head/multimedia/fxtv/files/patch-haup__remote.c =================================================================== --- head/multimedia/fxtv/files/patch-haup__remote.c (revision 434931) +++ head/multimedia/fxtv/files/patch-haup__remote.c (revision 434932) @@ -1,21 +1,21 @@ ---- haup_remote.c.orig +--- haup_remote.c.orig 2000-05-21 15:10:04 UTC +++ haup_remote.c @@ -38,9 +38,16 @@ #include #ifdef __NetBSD__ # include +#endif +#ifdef __FreeBSD__ +#include +#if __FreeBSD_version > 500000 +#include +#include #else -# include -# include +#include +#include +#endif #endif #include "haup_remote.h" Index: head/multimedia/fxtv/files/patch-pixelview__remote.c =================================================================== --- head/multimedia/fxtv/files/patch-pixelview__remote.c (revision 434931) +++ head/multimedia/fxtv/files/patch-pixelview__remote.c (revision 434932) @@ -1,21 +1,21 @@ ---- pixelview_remote.c.orig +--- pixelview_remote.c.orig 2000-05-21 15:10:09 UTC +++ pixelview_remote.c @@ -39,9 +39,16 @@ #include #ifdef __NetBSD__ # include +#endif +#ifdef __FreeBSD__ +#include +#if __FreeBSD_version > 500000 +#include +#include #else -# include -# include +#include +#include +#endif #endif #include "pixelview_remote.h" Index: head/multimedia/fxtv/files/patch-remote.c =================================================================== --- head/multimedia/fxtv/files/patch-remote.c (revision 434931) +++ head/multimedia/fxtv/files/patch-remote.c (revision 434932) @@ -1,11 +1,11 @@ ---- remote.c.orig Sat Sep 7 16:54:12 2002 -+++ remote.c Sat Sep 7 16:54:24 2002 +--- remote.c.orig 2001-02-12 21:05:08 UTC ++++ remote.c @@ -65,7 +65,7 @@ /* ******************** Local defines ************** */ /* FIXME: Remove this old code someday */ -#ifdef 0 +#if 0 # define OLD_DEV_SYSMOUSE_STUFF #endif Index: head/multimedia/fxtv/files/patch-tvcapture.c =================================================================== --- head/multimedia/fxtv/files/patch-tvcapture.c (revision 434931) +++ head/multimedia/fxtv/files/patch-tvcapture.c (revision 434932) @@ -1,22 +1,22 @@ ---- tvcapture.c.orig +--- tvcapture.c.orig 2001-02-12 18:59:22 UTC +++ tvcapture.c @@ -34,11 +34,18 @@ #include #include #include +#include #include #ifdef __NetBSD__ # include +#endif +#ifdef __FreeBSD__ +#include +#if __FreeBSD_version > 500000 +#include #else -# include +#include +#endif #endif #include #include Index: head/multimedia/fxtv/files/patch-tvcapture.h =================================================================== --- head/multimedia/fxtv/files/patch-tvcapture.h (revision 434931) +++ head/multimedia/fxtv/files/patch-tvcapture.h (revision 434932) @@ -1,18 +1,18 @@ ---- tvcapture.h.orig +--- tvcapture.h.orig 2001-02-12 18:57:43 UTC +++ tvcapture.h @@ -34,8 +34,14 @@ #include #ifdef __NetBSD__ # include +#endif +#ifdef __FreeBSD__ +#include +#if __FreeBSD_version > 500000 +#include #else -# include +#include +#endif #endif #include "tvtypes.h" Index: head/multimedia/fxtv/files/patch-tvmenu.c =================================================================== --- head/multimedia/fxtv/files/patch-tvmenu.c (revision 434931) +++ head/multimedia/fxtv/files/patch-tvmenu.c (revision 434932) @@ -1,20 +1,20 @@ ---- tvmenu.c.orig Mon Feb 12 22:19:33 2001 -+++ tvmenu.c Sun Nov 27 01:55:24 2005 -@@ -552,7 +552,7 @@ +--- tvmenu.c.orig 2001-02-12 21:19:33 UTC ++++ tvmenu.c +@@ -552,7 +552,7 @@ static void TVTOOLSUpdateStationPopup() Widget popup_win, new_popup_item = NULL; Cardinal num_children, i; WidgetList children; - String actual_station, temp_station; + String actual_station = NULL, temp_station = NULL; #ifdef FIXME Pixmap pix; #endif -@@ -589,7 +589,7 @@ +@@ -589,7 +589,7 @@ static void TVTOOLSUpdateStationPopup() XtVaSetValues(children[i], XtNleftBitmap, pix, NULL); #else - if ( strcmp( actual_station, temp_station ) == 0 ) + if ( strcmp( actual_station==NULL ? "" : actual_station, temp_station==NULL ? "" : temp_station ) == 0 ) new_popup_item = children[i]; #endif } Index: head/multimedia/fxtv/files/patch-tvscreen.c =================================================================== --- head/multimedia/fxtv/files/patch-tvscreen.c (revision 434931) +++ head/multimedia/fxtv/files/patch-tvscreen.c (revision 434932) @@ -1,13 +1,12 @@ ---- tvscreen.c.ORI Sun May 21 15:49:47 2000 -+++ tvscreen.c Wed Jun 7 10:19:30 2006 -@@ -480,6 +480,9 @@ +--- tvscreen.c.orig 2000-05-21 13:49:47 UTC ++++ tvscreen.c +@@ -480,6 +480,9 @@ void TVSCREENInit( TV_XSCREEN *s, dga_avail = FALSE; #ifdef HAVE_XFREE86 + if ( App_res.disable_direct_v ) + SUPRINTF(( "Will not init DGA since -disableDirectV was given.\n" )); + else if ( !XUTILXServerIsLocal( TVDISPLAY ) ) SUPRINTF(( "XF86DGA not available...X Server isn't local.\n" )); else { - Index: head/multimedia/fxtv/files/patch-videolib_Makefile =================================================================== --- head/multimedia/fxtv/files/patch-videolib_Makefile (revision 434931) +++ head/multimedia/fxtv/files/patch-videolib_Makefile (revision 434932) @@ -1,11 +1,11 @@ ---- videolib/Makefile.orig Tue Feb 13 06:04:45 2001 -+++ videolib/Makefile Sat Mar 10 17:39:59 2001 -@@ -15,7 +15,7 @@ +--- videolib/Makefile.orig 2001-02-12 19:04:45 UTC ++++ videolib/Makefile +@@ -15,7 +15,7 @@ override INC = ifneq ($(DEBUG),NO) override CFLAGS = -DDEBUG -g else - override CFLAGS = -DNDEBUG -O2 + override CFLAGS += -DNDEBUG #-O2 endif C_WARN_FLAG = -Wall override CFLAGS += $(C_WARN_FLAG) $(INC) Index: head/multimedia/fxtv/files/patch-videolib_videolib.c =================================================================== --- head/multimedia/fxtv/files/patch-videolib_videolib.c (revision 434931) +++ head/multimedia/fxtv/files/patch-videolib_videolib.c (revision 434932) @@ -1,38 +1,38 @@ ---- videolib/videolib.c.orig 1999-11-03 03:22:04.000000000 +0100 -+++ videolib/videolib.c 2007-09-05 18:31:05.000000000 +0200 -@@ -479,9 +479,8 @@ +--- videolib/videolib.c.orig 1999-11-03 02:22:04 UTC ++++ videolib/videolib.c +@@ -479,9 +479,8 @@ static void VIDEOLIBConvertRGBToRGB( VL_ *(p++) = (*src16 >> 8) | (*src16 << 8); src16++; } - for ( i = dst_line_pad; i > 0; i-- ) - *(((VL_UINT8 *)p)++) = 0x00; - (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; + memset(p, 0, dst_line_pad); + dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16); } src16 = dst_line = (VL_UINT16 *) dst->buf; -@@ -513,9 +512,9 @@ +@@ -513,9 +512,9 @@ static void VIDEOLIBConvertRGBToRGB( VL_ if ( src_padded ) src16 = (VL_UINT16 *)( (VL_UINT8 *)src16 + dst_line_pad ); else - for ( i = dst_line_pad; i > 0; i-- ) - *(((VL_UINT8 *)dst)++) = 0x00; - (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; + memset(dst, 0, dst_line_pad); + dst += dst_line_pad / sizeof(VL_IMAGE); + dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16); } if ( !dst_swap_b ) { /* More ugliness */ -@@ -527,8 +526,8 @@ +@@ -527,8 +526,8 @@ static void VIDEOLIBConvertRGBToRGB( VL_ *(p++) = (*src16 >> 8) | (*src16 << 8); src16++; } - (VL_UINT8 *)dst_line += dst->geom.bytes_per_line; - (VL_UINT8 *)src16 += dst->geom.bytes_per_line; + dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16); + src16 += dst->geom.bytes_per_line / sizeof(VL_UINT16); } } } Index: head/multimedia/fxtv/files/patch-voxware.h =================================================================== --- head/multimedia/fxtv/files/patch-voxware.h (revision 434931) +++ head/multimedia/fxtv/files/patch-voxware.h (revision 434932) @@ -1,13 +1,13 @@ ---- voxware.h.orig Sat Sep 7 16:51:45 2002 -+++ voxware.h Sat Sep 7 16:51:58 2002 +--- voxware.h.orig 2000-10-23 02:44:03 UTC ++++ voxware.h @@ -30,9 +30,7 @@ #ifndef __VOXWARE_H #define __VOXWARE_H -#if defined(__FreeBSD__) -# include -#elif defined(linux) || defined(__bsdi__) +#if defined(linux) || defined(__bsdi__) || defined(__FreeBSD__) # include #elif defined(__NetBSD__) || defined(__OpenBSD__) # include Index: head/multimedia/fxtv/files/patch-xutil.c =================================================================== --- head/multimedia/fxtv/files/patch-xutil.c (revision 434931) +++ head/multimedia/fxtv/files/patch-xutil.c (revision 434932) @@ -1,15 +1,15 @@ ---- ./xutil.c.orig Fri Nov 5 09:38:54 1999 -+++ ./xutil.c Tue Oct 9 03:41:54 2007 -@@ -1500,8 +1500,10 @@ +--- xutil.c.orig 1999-11-05 00:38:54 UTC ++++ xutil.c +@@ -1500,8 +1500,10 @@ void XUTILDetermineFrameBufferVisual( Di /**********************************************************************/ vinfo_pref.screen = screen; - visual = XGetVisualInfo( display, VisualScreenMask, &vinfo_pref, - &num_visuals ); + vinfo_pref.depth = DefaultDepth( display, screen ); + visual = XGetVisualInfo( display, + VisualScreenMask | VisualDepthMask, + &vinfo_pref, &num_visuals ); if ( num_visuals == 0 ) { fprintf( stderr, "XGetVisualInfo() says no visuals available!\n" ); exit(1);