397 |
|
windowName.encoding = iconName.encoding = XA_STRING; |
398 |
|
windowName.format = iconName.format = 8; |
399 |
|
windowName.value = (u_char *)name; |
400 |
< |
windowName.nitems = strlen(windowName.value); |
400 |
> |
windowName.nitems = strlen((char *)windowName.value); |
401 |
|
iconName.value = (u_char *)name; |
402 |
< |
iconName.nitems = strlen(windowName.value); |
402 |
> |
iconName.nitems = strlen((char *)windowName.value); |
403 |
|
|
404 |
|
xclshints.res_name = NULL; |
405 |
|
xclshints.res_class = "Ximage"; |
447 |
|
register int *rp; |
448 |
|
|
449 |
|
if (v1->class == v2->class) { |
450 |
< |
if (v1->class == TrueColor || v1->class == DirectColor) { |
451 |
< |
/* prefer 24-bit to 32-bit */ |
452 |
< |
if (v1->depth == 24 && v2->depth == 32) |
450 |
> |
if ((v1->class == TrueColor) | (v1->class == DirectColor)) { |
451 |
> |
/* prefer 24-bit */ |
452 |
> |
if ((v1->depth == 24) & (v2->depth > 24)) |
453 |
|
return(-1); |
454 |
< |
if (v1->depth == 32 && v2->depth == 24) |
454 |
> |
if ((v1->depth > 24) & (v2->depth == 24)) |
455 |
|
return(1); |
456 |
|
/* go for maximum depth otherwise */ |
457 |
|
return(v2->depth - v1->depth); |
458 |
|
} |
459 |
|
/* don't be too greedy */ |
460 |
< |
if (maxcolors <= 1<<v1->depth && maxcolors <= 1<<v2->depth) |
460 |
> |
if ((maxcolors <= 1<<v1->depth) & (maxcolors <= 1<<v2->depth)) |
461 |
|
return(v1->depth - v2->depth); |
462 |
|
return(v2->depth - v1->depth); |
463 |
|
} |
464 |
|
/* prefer Pseudo when < 15-bit */ |
465 |
< |
if ((v1->class == TrueColor || v1->class == DirectColor) && |
465 |
> |
if ((v1->class == TrueColor) | (v1->class == DirectColor) && |
466 |
|
v1->depth < 15) |
467 |
|
bad1 = 1; |
468 |
< |
if ((v2->class == TrueColor || v2->class == DirectColor) && |
468 |
> |
if ((v2->class == TrueColor) | (v2->class == DirectColor) && |
469 |
|
v2->depth < 15) |
470 |
|
bad2 = -1; |
471 |
|
if (bad1 | bad2) |
571 |
|
ourdata = (unsigned char *)malloc(ymax*((xmax+7)/8)); |
572 |
|
if (ourdata == NULL) |
573 |
|
goto fail; |
574 |
< |
ourras = make_raster(thedisplay, &ourvis, 1, ourdata, |
574 |
> |
ourras = make_raster(thedisplay, &ourvis, 1, (char *)ourdata, |
575 |
|
xmax, ymax, 8); |
576 |
|
if (ourras == NULL) |
577 |
|
goto fail; |
582 |
|
if (ourdata == NULL) |
583 |
|
goto fail; |
584 |
|
ourras = make_raster(thedisplay, &ourvis, datsiz*8, |
585 |
< |
ourdata, xmax, ymax, datsiz*8); |
585 |
> |
(char *)ourdata, xmax, ymax, datsiz*8); |
586 |
|
if (ourras == NULL) |
587 |
|
goto fail; |
588 |
|
getfull(); |
590 |
|
ourdata = (unsigned char *)malloc(xmax*ymax); |
591 |
|
if (ourdata == NULL) |
592 |
|
goto fail; |
593 |
< |
ourras = make_raster(thedisplay, &ourvis, 8, ourdata, |
593 |
> |
ourras = make_raster(thedisplay, &ourvis, 8, (char *)ourdata, |
594 |
|
xmax, ymax, 8); |
595 |
|
if (ourras == NULL) |
596 |
|
goto fail; |