X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fglyphs-msw.c;h=25c037ff6babfeb9e796eb8913ede2401baad7cc;hp=609b167112c25387af79fe513df6da9d9345b0c7;hb=3890a2e3064a7f562107c58e59d928284ec04741;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89 diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 609b167..25c037f 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -298,7 +298,7 @@ init_image_instance_from_dibitmap (Lisp_Image_Instance *ii, struct device *d = XDEVICE (device); struct frame *f; void* bmp_buf=0; - int type = 0; + enum image_instance_type type; HBITMAP bitmap; HDC hdc; @@ -458,13 +458,12 @@ mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, HBITMAP mask; HGDIOBJ old = NULL; HDC hcdc = FRAME_MSWINDOWS_CDC (f); - unsigned char* dibits; - BITMAPINFO* bmp_info = - xmalloc_and_zero (sizeof(BITMAPINFO) + sizeof(RGBQUAD)); + unsigned char *dibits, *and_bits; + BITMAPINFO *bmp_info = + (BITMAPINFO*) xmalloc_and_zero (sizeof(BITMAPINFO) + sizeof(RGBQUAD)); int i, j; int height = IMAGE_INSTANCE_PIXMAP_HEIGHT (image); - void* and_bits; int maskbpline = BPLINE ((IMAGE_INSTANCE_PIXMAP_WIDTH (image)+7)/8); int bpline = BPLINE (IMAGE_INSTANCE_PIXMAP_WIDTH (image) * 3); @@ -492,7 +491,7 @@ mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, if (!(mask = CreateDIBSection (hcdc, bmp_info, DIB_RGB_COLORS, - &and_bits, + (void**)&and_bits, 0,0))) { xfree (bmp_info); @@ -513,7 +512,7 @@ mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, bmp_info->bmiHeader.biClrImportant = 0; bmp_info->bmiHeader.biSizeImage = height * bpline; - dibits = xmalloc_and_zero (bpline * height); + dibits = (unsigned char*) xmalloc_and_zero (bpline * height); if (GetDIBits (hcdc, IMAGE_INSTANCE_MSWINDOWS_BITMAP (image), 0, @@ -528,20 +527,20 @@ mswindows_initialize_image_instance_mask (Lisp_Image_Instance* image, /* now set the colored bits in the mask and transparent ones to black in the original */ - for(i=0; i