This is a small patch which allows xcmap to work properly on a 2 color X display (monochrome). It is not needed for the PNG patch to work, but is included for those people who use xcmap from the XV distribu- tion. Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ --- xv-3.10a.orig/xcmap.c 1995-01-03 13:14:52.000000000 -0800 +++ xv-3.10a/xcmap.c 2005-05-30 01:22:20.000000000 -0700 @@ -140,8 +140,13 @@ nxcells = nycells = 8; else if (dispcells>4) nxcells = nycells = 4; - else + else if (dispcells>2) nxcells = nycells = 2; + else + { + nxcells = 2; + nycells = 1; + } /**************** Create/Open X Resources ***************/ if ((mfinfo = XLoadQueryFont(theDisp,FONT))==NULL) { @@ -267,18 +272,25 @@ x=y=w=h=1; i=XParseGeometry(geom,&x,&y,&w,&h); - if (i&WidthValue) WIDE = (int) w; - if (i&HeightValue) HIGH = (int) h; - - if (i&XValue || i&YValue) hints.flags = USPosition; - else hints.flags = PPosition; - - hints.flags |= USSize; + if (i&WidthValue) + { + WIDE = (int) w; + hints.flags |= USSize; + } + if (i&HeightValue) + { + HIGH = (int) h; + hints.flags |= USSize; + } - if (i&XValue && i&XNegative) - x = XDisplayWidth(theDisp,theScreen)-WIDE-abs(x); - if (i&YValue && i&YNegative) - y = XDisplayHeight(theDisp,theScreen)-HIGH-abs(y); + if (i&XValue || i&YValue) + { + if (i&XNegative) + x = XDisplayWidth(theDisp,theScreen)-WIDE-abs(x); + if (i&YNegative) + y = XDisplayHeight(theDisp,theScreen)-HIGH-abs(y); + hints.flags |= USPosition; + } hints.x=x; hints.y=y; hints.width = WIDE; hints.height = HIGH;