Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.903 diff -u -2 -0 -r1.903 ChangeLog --- xc/ChangeLog 26 Apr 2005 05:33:09 -0000 1.903 +++ xc/ChangeLog 26 Apr 2005 06:08:15 -0000 @@ -1,26 +1,35 @@ 2005-04-26 Roland Mainz + * xc/programs/Xserver/Xprint/Init.c + * xc/programs/Xserver/Xprint/ps/PsInit.c + bugzilla #2879 (https://bugs.freedesktop.org/show_bug.cgi?id=2879) + attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx) + Refix for bug 2879 - downgrade 15bit PseudoColor to 14bit - the current + datatype for the |ColormapEntries| is a |signed short| which is too + small for |32768| colors (=integer overflow). + +2005-04-26 Roland Mainz * xc/programs/xdpyinfo/xdpyinfo.c bugzilla #2705 (https://bugs.freedesktop.org/show_bug.cgi?id=2705) attachment #2555 (https://bugs.freedesktop.org/attachment.cgi?id=2555) - bug xxx part II: Fix build to work with |#define BuildXprint NO| - Patch by Kevin E. Martin + bug 2705 part II: Fix build to work with |#define BuildXprint NO| + Patch by Kevin E. Martin 2005-04-25 Alexander Gottwald * config/xf/X11.tmpl: Bug #3069: Reenable DefaultFontPath and DefaultFSFontPath which got removed in the BuildLowMem commit 2005-04-23 Adam Jackson * programs/Xserver/hw/xfree86/loader/loadmod.c: Bug #2138: When the server is built with MakeDllModules YES, prefer dlloader modules to elfloader modules, and vice versa when MakeDllModules is NO. Based on 028_loader_speed_hack.diff from Ubuntu (Daniel Stone). 2005-04-23 Adam Jackson * programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c: Bug #2141: Rework misleading warning message when APM support is unavailable. (Previous patch on 2005-04-14 changed the wrong message.) Index: xc/programs/Xserver/Xprint/Init.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/Init.c,v retrieving revision 1.12 diff -u -2 -0 -r1.12 Init.c --- xc/programs/Xserver/Xprint/Init.c 20 Apr 2005 12:25:13 -0000 1.12 +++ xc/programs/Xserver/Xprint/Init.c 26 Apr 2005 06:08:24 -0000 @@ -147,41 +147,41 @@ static PixmapFormatRec MonoPclPixmapFormats[] = { { 1, 1, BITMAP_SCANLINE_PAD } }; #define NUMMPCLFORMATS (sizeof MonoPclPixmapFormats)/(sizeof MonoPclPixmapFormats[0]) #endif #if defined(XPPCLDDX) || defined(XPMONOPCLDDX) #include "pcl/Pcl.h" #endif #ifdef XPPSDDX static PixmapFormatRec PSPixmapFormats[] = { { 1, 1, BITMAP_SCANLINE_PAD }, { 8, 8, BITMAP_SCANLINE_PAD }, { 12, 16, BITMAP_SCANLINE_PAD }, - { 15, 16, BITMAP_SCANLINE_PAD }, + { 14, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, { 24, 32, BITMAP_SCANLINE_PAD } }; #define NUMPSFORMATS (sizeof PSPixmapFormats)/(sizeof PSPixmapFormats[0]) #include "ps/Ps.h" #endif /* * The driverInitArray contains an entry for each driver the * server knows about. Each element contains pointers to pixmap formats, the * driver's initialization routine, and pointers to the driver's * attribute validation rec, and/or a driver function which * returns the maximum medium width&height, and maximum resolution * given a printer name. Either the validation rec OR the dimension * function can be NULL. If the function is non-NULL then it * will be called, and will be passed the (possibly NULL) validation rec. * If the function is NULL, then XpGetMaxWidthHeightRes() is called. Index: xc/programs/Xserver/Xprint/ps/PsInit.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/Xprint/ps/PsInit.c,v retrieving revision 1.9 diff -u -2 -0 -r1.9 PsInit.c --- xc/programs/Xserver/Xprint/ps/PsInit.c 1 Apr 2005 21:45:20 -0000 1.9 +++ xc/programs/Xserver/Xprint/ps/PsInit.c 26 Apr 2005 06:08:25 -0000 @@ -104,50 +104,50 @@ #endif /* GLXEXT */ Bool InitializePsDriver(ndx, pScreen, argc, argv) int ndx; ScreenPtr pScreen; int argc; char **argv; { #if 0 int maxXres, maxYres, maxWidth, maxHeight; int maxRes, maxDim, numBytes; PsScreenPrivPtr pPriv; #endif char **printerNames; int numPrinters; int nv, /* total number of visuals */ nv_1bit, /* number of 8bit visuals */ nv_8bit, /* number of 8bit visuals */ nv_12bit, /* number of 12bit visuals */ - nv_15bit, /* number of 15bit visuals */ + nv_14bit, /* number of 14bit visuals */ nv_16bit, /* number of 16bit visuals */ nv_24bit, /* number of 24bit visuals*/ nv_30bit; /* number of 30bit visuals*/ int nd; /* number of depths */ int defaultVisualIndex = -1; VisualID *vids_1bit, *vids_8bit, *vids_12bit, - *vids_15bit, + *vids_14bit, *vids_16bit, *vids_24bit, *vids_30bit; VisualPtr visuals; DepthPtr depths; VisualID defaultVisual; int rootDepth; /* * Register this driver's InitContext function with the print * extension. */ XpRegisterInitFunc(pScreen, "XP-POSTSCRIPT", PsInitContext); /* * Create and fill in the devPrivate for the PS driver. */ AllocatePsPrivates(pScreen); #if 0 @@ -180,46 +180,46 @@ pScreen->CreatePixmap = PsCreatePixmap; pScreen->DestroyPixmap = PsDestroyPixmap; pScreen->RealizeFont = PsRealizeFont; pScreen->UnrealizeFont = PsUnrealizeFont; pScreen->CreateGC = PsCreateGC; pScreen->CreateColormap = PsCreateColormap; pScreen->DestroyColormap = PsDestroyColormap; pScreen->InstallColormap = PsInstallColormap; pScreen->UninstallColormap = PsUninstallColormap; pScreen->ListInstalledColormaps = PsListInstalledColormaps; pScreen->StoreColors = PsStoreColors; pScreen->ResolveColor = PsResolveColor; /* Will BitmapToRegion make any difference at all? */ pScreen->BitmapToRegion = mfbPixmapToRegion; visuals = (VisualPtr) xalloc(16*sizeof(VisualRec)); depths = (DepthPtr) xalloc(16*sizeof(DepthRec)); vids_1bit = (VisualID *)xalloc(16*sizeof(VisualID)); vids_8bit = (VisualID *)xalloc(16*sizeof(VisualID)); vids_12bit = (VisualID *)xalloc(16*sizeof(VisualID)); - vids_15bit = (VisualID *)xalloc(16*sizeof(VisualID)); + vids_14bit = (VisualID *)xalloc(16*sizeof(VisualID)); vids_16bit = (VisualID *)xalloc(16*sizeof(VisualID)); vids_24bit = (VisualID *)xalloc(16*sizeof(VisualID)); vids_30bit = (VisualID *)xalloc(16*sizeof(VisualID)); - nv = nv_1bit = nv_8bit = nv_12bit = nv_15bit = nv_16bit = nv_24bit = nv_30bit = nd = 0; + nv = nv_1bit = nv_8bit = nv_12bit = nv_14bit = nv_16bit = nv_24bit = nv_30bit = nd = 0; #ifdef PSOUT_USE_DEEPCOLOR /* gisburn: 30bit TrueColor has been disabled for now since it causes problems * with GLX - see https://bugs.freedesktop.org/show_bug.cgi?id=2868 ("Mesa * seems to be unable to handle 30bit TrueColor visuals") for details... */ #ifdef DISABLED_FOR_NOW /* TrueColor, 30bit, 10bit per R-,G-,B-gun */ visuals[nv].vid = FakeClientID(0); visuals[nv].class = TrueColor; visuals[nv].bitsPerRGBValue = 10; visuals[nv].ColormapEntries = 1024; visuals[nv].nplanes = 30; visuals[nv].redMask = 0X3FF00000; visuals[nv].greenMask = 0X000FFC00; visuals[nv].blueMask = 0X000003FF; visuals[nv].offsetRed = 20; visuals[nv].offsetGreen = 10; visuals[nv].offsetBlue = 0; vids_30bit[nv_30bit] = visuals[nv].vid; @@ -243,54 +243,56 @@ nv++; nv_24bit++; /* TrueColor, 16bit */ visuals[nv].vid = FakeClientID(0); visuals[nv].class = TrueColor; visuals[nv].bitsPerRGBValue = 6; visuals[nv].ColormapEntries = 64; visuals[nv].nplanes = 16; visuals[nv].redMask = 0x0000f800; visuals[nv].greenMask = 0x000007e0; visuals[nv].blueMask = 0x0000001f; visuals[nv].offsetRed = 11; visuals[nv].offsetGreen = 5; visuals[nv].offsetBlue = 0; vids_16bit[nv_16bit] = visuals[nv].vid; nv++; nv_16bit++; #ifdef PSOUT_USE_DEEPCOLOR /* PostScript Level 2 and above, colors can have 12 bits per component * (36 bit for RGB) */ - /* PseudoColor, 15bit */ + + /* PseudoColor, 14bit (15bit won't work as |ColormapEntries==32768| + * is too large for a |signed short|... xx@@!!!... ;-( ) */ visuals[nv].vid = FakeClientID(0); visuals[nv].class = PseudoColor; visuals[nv].bitsPerRGBValue = 12; - visuals[nv].ColormapEntries = 32768; - visuals[nv].nplanes = 15; + visuals[nv].ColormapEntries = 16384; + visuals[nv].nplanes = 14; visuals[nv].redMask = 0x0; visuals[nv].greenMask = 0x0; visuals[nv].blueMask = 0x0; visuals[nv].offsetRed = 0x0; visuals[nv].offsetGreen = 0x0; visuals[nv].offsetBlue = 0x0; - vids_15bit[nv_15bit] = visuals[nv].vid; - nv++; nv_15bit++; + vids_14bit[nv_14bit] = visuals[nv].vid; + nv++; nv_14bit++; /* PseudoColor, 12bit */ visuals[nv].vid = FakeClientID(0); visuals[nv].class = PseudoColor; visuals[nv].bitsPerRGBValue = 12; visuals[nv].ColormapEntries = 4096; visuals[nv].nplanes = 12; visuals[nv].redMask = 0x0; visuals[nv].greenMask = 0x0; visuals[nv].blueMask = 0x0; visuals[nv].offsetRed = 0x0; visuals[nv].offsetGreen = 0x0; visuals[nv].offsetBlue = 0x0; vids_12bit[nv_12bit] = visuals[nv].vid; defaultVisualIndex = nv; nv++; nv_12bit++; /* GrayScale, 12bit, 12bit per R-,G-,B-gun */ visuals[nv].vid = FakeClientID(0); visuals[nv].class = GrayScale; @@ -392,45 +394,45 @@ depths[nd].vids = vids_30bit; nd++; } if( nv_24bit > 0 ) { depths[nd].depth = 24; depths[nd].numVids = nv_24bit; depths[nd].vids = vids_24bit; nd++; } if( nv_16bit > 0 ) { depths[nd].depth = 16; depths[nd].numVids = nv_16bit; depths[nd].vids = vids_16bit; nd++; } - if( nv_15bit > 0 ) + if( nv_14bit > 0 ) { - depths[nd].depth = 15; - depths[nd].numVids = nv_15bit; - depths[nd].vids = vids_15bit; + depths[nd].depth = 14; + depths[nd].numVids = nv_14bit; + depths[nd].vids = vids_14bit; nd++; } if( nv_12bit > 0 ) { depths[nd].depth = 12; depths[nd].numVids = nv_12bit; depths[nd].vids = vids_12bit; nd++; } if( nv_8bit > 0 ) { depths[nd].depth = 8; depths[nd].numVids = nv_8bit; depths[nd].vids = vids_8bit; nd++; } if( nv_1bit > 0 )