*** Pixmap.c.orig Thu Jan 18 14:37:45 1996 --- Pixmap.c Thu Jan 18 14:37:12 1996 *************** *** 1,5 **** /* ! * $Id: Pixmap.c,v 1.16 1994/05/16 06:48:47 mallet Exp $ * * Copyright (c) 1991-1994 Lionel MALLET * --- 1,5 ---- /* ! * $Id: Pixmap.c,v 1.18 1996/01/18 13:36:07 lmallet Exp $ * * Copyright (c) 1991-1994 Lionel MALLET * *************** *** 55,61 **** * Author: Davor Matic, MIT X Consortium */ ! static char rcsid[] = "$Id: Pixmap.c,v 1.16 1994/05/16 06:48:47 mallet Exp $"; #include #include --- 55,61 ---- * Author: Davor Matic, MIT X Consortium */ ! static char rcsid[] = "$Id: Pixmap.c,v 1.18 1996/01/18 13:36:07 lmallet Exp $"; #include #include *************** *** 763,768 **** --- 763,769 ---- PixmapWidget PW; XpmAttributes *attribs; { + attribs->valuemask = XpmVisual | XpmColormap | XpmDepth; attribs->visual = DefaultVisual(dpy, screen); attribs->colormap = PW->core.colormap; attribs->depth = depth; *************** *** 778,783 **** --- 779,789 ---- attribs->rgb_fname = NULL; attribs->nextensions = 0; attribs->extensions = (XpmExtension *)0; + attribs->ncolors = 0; + attribs->colorTable = (XpmColor *)0; + attribs->hints_cmt = NULL; + attribs->colors_cmt = NULL; + attribs->pixels_cmt = NULL; attribs->closeness = 0; attribs->exactColors = 1; } *************** *** 892,898 **** InitializeXpmAttributes(PW, &attribs); infos.valuemask = XpmReturnComments | XpmReturnColorTable | XpmReturnExtensions; ! attribs.valuemask = XpmReturnPixels; status = XpmReadFileToXpmImage(filename, &xpm_image, &infos); if (status == XpmSuccess) --- 898,904 ---- InitializeXpmAttributes(PW, &attribs); infos.valuemask = XpmReturnComments | XpmReturnColorTable | XpmReturnExtensions; ! attribs.valuemask |= XpmReturnPixels; status = XpmReadFileToXpmImage(filename, &xpm_image, &infos); if (status == XpmSuccess) *************** *** 960,966 **** color->g4_color, color->g_color, color->c_color); ! shift = 1; } else { --- 966,972 ---- color->g4_color, color->g_color, color->c_color); ! shift++; } else { *************** *** 1244,1249 **** --- 1250,1256 ---- InitializeXpmAttributes(PW, &attribs); infos.valuemask = XpmReturnColorTable; + attribs.valuemask |= XpmReturnPixels; if ((status = XpmReadFileToXpmImage(filename, &xpm_image, &infos)) == XpmSuccess)