405
XpmIcon *GetXpmPixmap (name)
408
char fullPath [1024];
412
if (Scr->XPMIconDirectory) {
413
sprintf (fullPath, "%s/%s", Scr->XPMIconDirectory, name);
414
ret = (XpmIcon*) malloc (sizeof (XpmIcon));
419
ret->attributes.valuemask = 0;
420
ret->attributes.valuemask |= XpmSize;
421
ret->attributes.valuemask |= XpmReturnPixels;
422
status = XpmReadFileToPixmap(dpy, Scr->Root, fullPath,
423
&(ret->pixmap), &(ret->mask), &(ret->attributes));
428
fprintf (stderr, "Could not parse or alloc requested color : %s\n", fullPath);
433
fprintf (stderr, "Cannot open XPM file : %s\n", fullPath);
438
fprintf (stderr, "invalid XPM file : %s\n", fullPath);
443
fprintf (stderr, "Not enough memory for XPM file : %s\n", fullPath);
448
fprintf (stderr, "Color not found in : %s\n", fullPath);
453
fprintf (stderr, "Unknown error in : %s\n", fullPath);
404
468
InsertRGBColormap (a, maps, nmaps, replace)
406
470
XStandardColormap *maps;