X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fglyphs-msw.c;h=34e4130486d18a6c3cd3ff9642c45d2d0001626d;hp=6ee899ed2dcb63a03552cf2279ad5a3341b3d264;hb=35adcaaeafb1fe93eaf00c39b48619e8f188ff3f;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/src/glyphs-msw.c b/src/glyphs-msw.c index 6ee899e..34e4130 100644 --- a/src/glyphs-msw.c +++ b/src/glyphs-msw.c @@ -87,9 +87,9 @@ static BITMAPINFO* convert_EImage_to_DIBitmap (Lisp_Object device, if (DEVICE_MSWINDOWS_BITSPIXEL (d) > 0) { int bpline = BPLINE(width * 3); - /* FIXME: we can do this because 24bpp implies no colour table, once - * we start paletizing this is no longer true. The X versions of - * this function quantises to 256 colours or bit masks down to a + /* FIXME: we can do this because 24bpp implies no color table, once + * we start palettizing this is no longer true. The X versions of + * this function quantises to 256 colors or bit masks down to a * long. Windows can actually handle rgb triples in the raw so I * don't see much point trying to optimize down to the best * structure - unless it has memory / color allocation implications @@ -521,6 +521,8 @@ mswindows_create_resized_bitmap (struct Lisp_Image_Instance* ii, IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), SRCCOPY)) { + DeleteObject (newbmp); + DeleteDC (hdcDst); return 0; } @@ -553,6 +555,8 @@ mswindows_create_resized_mask (struct Lisp_Image_Instance* ii, IMAGE_INSTANCE_PIXMAP_HEIGHT (ii), SRCCOPY)) { + DeleteObject (newmask); + DeleteDC (hdcDst); return NULL; } @@ -695,7 +699,7 @@ static int xpm_to_eimage (Lisp_Object image, CONST Extbyte *buffer, break; case XpmFileInvalid: { - signal_simple_error ("invalid XPM data", image); + signal_simple_error ("Invalid XPM data", image); } case XpmNoMemory: { @@ -1037,7 +1041,7 @@ static CONST resource_t bitmap_table[] = { "size", OBM_SIZE }, { "btsize", OBM_BTSIZE }, { "check", OBM_CHECK }, - { "cehckboxes", OBM_CHECKBOXES }, + { "checkboxes", OBM_CHECKBOXES }, { "btncorners" , OBM_BTNCORNERS }, {0} }; @@ -1169,7 +1173,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti } else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id, type)))) - signal_simple_error ("invalid resource identifier", resource_id); + signal_simple_error ("Invalid resource identifier", resource_id); /* load the image */ if (!(himage = LoadImage (hinst, resid, type, 0, 0, @@ -1177,7 +1181,7 @@ mswindows_resource_instantiate (Lisp_Object image_instance, Lisp_Object instanti LR_SHARED | (!NILP (file) ? LR_LOADFROMFILE : 0)))) { - signal_simple_error ("cannot load image", instantiator); + signal_simple_error ("Cannot load image", instantiator); } if (hinst) @@ -1291,7 +1295,7 @@ in this Software without prior written authorization from the X Consortium. /* - * Based on an optimized version provided by Jim Becker, Auguest 5, 1988. + * Based on an optimized version provided by Jim Becker, August 5, 1988. */ #ifndef BitmapSuccess #define BitmapSuccess 0 @@ -1728,10 +1732,10 @@ init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii, if (NILP (background)) background = pointer_bg; - XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii), - find_keyword_in_vector (instantiator, Q_hotspot_x)); - XSETINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii), - find_keyword_in_vector (instantiator, Q_hotspot_y)); + IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = + find_keyword_in_vector (instantiator, Q_hotspot_x); + IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = + find_keyword_in_vector (instantiator, Q_hotspot_y); IMAGE_INSTANCE_PIXMAP_FG (ii) = foreground; IMAGE_INSTANCE_PIXMAP_BG (ii) = background; if (COLOR_INSTANCEP (foreground))