548 |
|
n = 8; |
549 |
|
else |
550 |
|
return NULL; |
551 |
+ |
/* XXX VC warns about 32 bit shift coerced to 64 bit */ |
552 |
|
hdr = (BMPHeader *)malloc(sizeof(BMPHeader) + |
553 |
|
sizeof(RGBquad)*(1<<n) - |
554 |
|
sizeof(hdr->palette) + |
564 |
|
hdr->nColors = ncolors; |
565 |
|
hdr->impColors = 0; /* says all colors important */ |
566 |
|
hdr->infoSiz = infolen; |
567 |
+ |
/* XXX VC warns about 32 bit shift coerced to 64 bit */ |
568 |
|
memset((void *)hdr->palette, 0, sizeof(RGBquad)*(1<<n) + infolen); |
569 |
|
for (n = ncolors; n--; ) |
570 |
|
hdr->palette[n].r = hdr->palette[n].g = |