* Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
[not found] <E1KOt7X-0003aD-Kf@cvs.savannah.gnu.org>
@ 2008-08-01 14:54 ` Juanma Barranquero
2008-08-01 15:34 ` Adrian Robert
0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2008-08-01 14:54 UTC (permalink / raw)
To: Adrian Robert; +Cc: Emacs Development
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);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
2008-08-01 14:54 ` [Emacs-diffs] Changes to emacs/src/xfaces.c,v Juanma Barranquero
@ 2008-08-01 15:34 ` Adrian Robert
2008-08-01 16:49 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Robert @ 2008-08-01 15:34 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Emacs Development
On Aug 1, 2008, at 10:54 AM, Juanma Barranquero wrote:
> 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.
Thanks, in interest of heading off problems, implemented quickest fix
for now, which is committing patch as-is. (Sorry about any
disruption, I could not find any #def for RGB but assumed it was like
what I put there.) If folks would prefer a macro we should find all
the places it might be used and figure out the right file to put it in..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
2008-08-01 15:34 ` Adrian Robert
@ 2008-08-01 16:49 ` Lennart Borgman (gmail)
2008-08-01 18:56 ` Adrian Robert
0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-01 16:49 UTC (permalink / raw)
To: Adrian Robert; +Cc: Juanma Barranquero, Emacs Development
Adrian Robert wrote:
>
> On Aug 1, 2008, at 10:54 AM, Juanma Barranquero wrote:
>
>> 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.
>
> Thanks, in interest of heading off problems, implemented quickest fix
> for now, which is committing patch as-is. (Sorry about any disruption,
> I could not find any #def for RGB but assumed it was like what I put
> there.) If folks would prefer a macro we should find all the places it
> might be used and figure out the right file to put it in..
Adrian, could you please explain what will happen when this code is run
on w32?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
2008-08-01 16:49 ` Lennart Borgman (gmail)
@ 2008-08-01 18:56 ` Adrian Robert
2008-08-01 19:26 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Robert @ 2008-08-01 18:56 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: Juanma Barranquero, Emacs Development
On Aug 1, 2008, at 12:49 PM, Lennart Borgman (gmail) wrote:
> Adrian Robert wrote:
>> On Aug 1, 2008, at 10:54 AM, Juanma Barranquero wrote:
>>> 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.
>> Thanks, in interest of heading off problems, implemented quickest
>> fix for now, which is committing patch as-is. (Sorry about any
>> disruption, I could not find any #def for RGB but assumed it was
>> like what I put there.) If folks would prefer a macro we should
>> find all the places it might be used and figure out the right file
>> to put it in..
>
>
> Adrian, could you please explain what will happen when this code is
> run on w32?
I wasn't trying to change any code, just accidentally introduced a non-
workalike for a platform-defined macro. Juanma's patch restores the
previous version of the line I changed under Windows. Again,
apologies for the temporary bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emacs-diffs] Changes to emacs/src/xfaces.c,v
2008-08-01 18:56 ` Adrian Robert
@ 2008-08-01 19:26 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-01 19:26 UTC (permalink / raw)
To: Adrian Robert; +Cc: Juanma Barranquero, Emacs Development
Adrian Robert wrote:
>
> On Aug 1, 2008, at 12:49 PM, Lennart Borgman (gmail) wrote:
>
>> Adrian Robert wrote:
>>> On Aug 1, 2008, at 10:54 AM, Juanma Barranquero wrote:
>>>> 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.
>>> Thanks, in interest of heading off problems, implemented quickest fix
>>> for now, which is committing patch as-is. (Sorry about any
>>> disruption, I could not find any #def for RGB but assumed it was like
>>> what I put there.) If folks would prefer a macro we should find all
>>> the places it might be used and figure out the right file to put it in..
>>
>>
>> Adrian, could you please explain what will happen when this code is
>> run on w32?
>
> I wasn't trying to change any code, just accidentally introduced a
> non-workalike for a platform-defined macro. Juanma's patch restores the
> previous version of the line I changed under Windows. Again, apologies
> for the temporary bug.
Thanks for the explanation.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-01 19:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1KOt7X-0003aD-Kf@cvs.savannah.gnu.org>
2008-08-01 14:54 ` [Emacs-diffs] Changes to emacs/src/xfaces.c,v Juanma Barranquero
2008-08-01 15:34 ` 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)
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).