unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Elijah G." <eg642616@gmail.com>
Cc: luangruo@yahoo.com, 71159@debbugs.gnu.org
Subject: bug#71159: [PATCH] Stipple support for MS Windows
Date: Sun, 02 Jun 2024 07:54:34 +0300	[thread overview]
Message-ID: <867cf8ndv9.fsf@gnu.org> (raw)
In-Reply-To: <86r0dg4hpd.fsf@gmail.com> (eg642616@gmail.com)

> From: "Elijah G." <eg642616@gmail.com>
> Cc: Po Lu <luangruo@yahoo.com>,  71159@debbugs.gnu.org,  Eli Zaretskii
>  <eliz@gnu.org>
> Date: Sat, 01 Jun 2024 12:54:22 -0600
> 
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -2827,6 +2827,9 @@ thumbnail images and show them in the thumbnail buffer.  Unlike with
>  using 'convert', this fallback method is synchronous, so Emacs will wait
>  until all the thumbnails are created and displayed, before showing them.
>  
> +---
> +*** Emacs on MS-Windows now supports the :stipple face attribute

This should end with a period, and :stipple should be quoted as
':stipple'.

> +  Emacs_Pixmap stipple, bitmap;
>    bitmap = CreateBitmap (width, height,
> -			 FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
> -			 FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits,
> +			 dpyinfo->n_planes,
> +			 dpyinfo->n_cbits,
>  			 bits);

Please rewrite this as follows:

  Emacs_Pixmap stipple;
  Emacs_Pixmap bitmap = CreateBitmap (width, height, dpyinfo->n_planes,
				      dpyinfo->n_cbits, bits);

> +  {
> +    char *invertedBits;
> +    int nbytes, i;
> +
> +    invertedBits = bits;
> +    nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height;

Also here, please initialize the local variables where appropriate:

  {
    char invertedBits = bits;
    int nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height, i;

Thanks.





  parent reply	other threads:[~2024-06-02  4:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24  1:27 bug#71159: [PATCH] Stipple support for MS Windows Elijah G.
2024-05-29 23:25 ` Elijah G.
2024-05-31  0:12   ` Elijah G.
2024-06-01 14:03     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-01 18:54       ` Elijah G.
2024-06-02  1:34         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-02  1:40           ` Elijah G.
2024-06-02  1:49             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-02  4:54               ` Eli Zaretskii
2024-06-02  7:56                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-02  4:54         ` Eli Zaretskii [this message]
2024-06-02  5:27           ` Elijah G.
2024-06-02  6:37             ` Eli Zaretskii
2024-06-01 14:28     ` Eli Zaretskii
2024-06-01 19:04       ` Elijah G.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=867cf8ndv9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71159@debbugs.gnu.org \
    --cc=eg642616@gmail.com \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).