GNU bug report logs - #71159
[PATCH] Stipple support for MS Windows

Previous Next

Package: emacs;

Reported by: "Elijah G." <eg642616 <at> gmail.com>

Date: Fri, 24 May 2024 01:28:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 71159 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: "Elijah G." <eg642616 <at> gmail.com>
Cc: 71159 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows
Date: Sat, 01 Jun 2024 22:03:40 +0800
"Elijah G." <eg642616 <at> gmail.com> writes:

> I've updated the patch for delete all the conflicts generated by
> ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit.

Thank you.  Please find several comments below:

> * src/w32term.c:
> (w32_fill_stipple_pattern): New function.
> (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect)
> (w32_draw_stretch_glyph_string): Use new stipple function.

Please delete the redundant colon after the file name.

> * src/image.c:
> (image_create_bitmap_from_data): Create stipple bitmap.
> (image_create_bitmap_from_file): Add suuport for pixmap and create
> stipple bitmap.

Likewise.  This commit message is also excessively wide, and must be
filled to remain within 64 columns.

> +#ifdef HAVE_NTGUI
> +static HBITMAP w32_create_pixmap_from_bitmap_data (int width,
> +						   int height,
> +						   char *data);
> +
> +#endif

It should be aesthetically better if the parameter names were deleted
from this declaration's type list, and all of the types placed on one
line.

> +    int nbytes, i;
> +    ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA.  */

??? Please insert this boilerplate by means of the `USE_SAFE_ALLOCA'
macro.

> +    invertedBits = bits;
> +    nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height;
> +    sa_avail = MAX_ALLOCA
> +
> +    SAFE_NALLOCA (bits, 1, nbytes);

Shouldn't you subsequently call SAFE_FREE?

> +    for (i = 0; i < nbytes; i++)
> +      bits[i] = XBM_BIT_SHUFFLE(invertedBits[i]);

Absent space between macro name and parameters.

> +      data[i] = XBM_BIT_SHUFFLE(data[i]);

Here also.

> +  Emacs_Pixmap stipple;

Should not the object in this field be released in `free_bitmap_record'?




This bug report was last modified 1 year and 41 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.