unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
To: "Adrian Robert" <Adrian.B.Robert@gmail.com>
Cc: Emacs Development <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
Date: Fri, 1 Aug 2008 16:54:51 +0200	[thread overview]
Message-ID: <f7ccd24b0808010754r77ccaef1od3b763d09c907182@mail.gmail.com> (raw)
In-Reply-To: <E1KOt7X-0003aD-Kf@cvs.savannah.gnu.org>

On Fri, Aug 1, 2008 at 13:48, Adrian Robert <Adrian.B.Robert@gmail.com> wrote:

> +           cmap = Fcons (Fcons (build_string (name),
> +                                make_number ((red << 16) | (green << 8) | blue)),
> +                         cmap);

This is a change over the original function, and in fact it doesn't
work on Windows because of byte order issues.
Either the attached patch, or adding a new RGB_TO_EMACS_INT macro, is needed.

   Juanma


Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.409
diff -u -2 -r1.409 xfaces.c
--- src/xfaces.c	1 Aug 2008 14:01:08 -0000	1.409
+++ src/xfaces.c	1 Aug 2008 14:43:37 -0000
@@ -6601,5 +6601,9 @@
 	      name[num] = 0;
 	    cmap = Fcons (Fcons (build_string (name),
-                                make_number ((red << 16) | (green <<
8) | blue)),
+#ifdef WINDOWSNT
+				 make_number (RGB (red, green, blue))),
+#else
+			         make_number ((red << 16) | (green << 8) | blue)),
+#endif
 			  cmap);
 	  }




       reply	other threads:[~2008-08-01 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1KOt7X-0003aD-Kf@cvs.savannah.gnu.org>
2008-08-01 14:54 ` Juanma Barranquero [this message]
2008-08-01 15:34   ` [Emacs-diffs] Changes to emacs/src/xfaces.c,v Adrian Robert
2008-08-01 16:49     ` Lennart Borgman (gmail)
2008-08-01 18:56       ` Adrian Robert
2008-08-01 19:26         ` Lennart Borgman (gmail)

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=f7ccd24b0808010754r77ccaef1od3b763d09c907182@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=Adrian.B.Robert@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).