Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6c8e1d62
Commit
6c8e1d62
authored
Feb 14, 2007
by
Juanma Barranquero
Browse files
(Fcolor_distance): Don't continue checking a color for errors after it has been
correctly parsed as an RGB list.
parent
22bbca61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/xfaces.c
src/xfaces.c
+4
-6
No files found.
src/xfaces.c
View file @
6c8e1d62
...
...
@@ -5348,13 +5348,11 @@ If FRAME is unspecified or nil, the current frame is used. */)
CHECK_LIVE_FRAME (frame);
f = XFRAME (frame);
if ((CONSP (color1) && !parse_rgb_list (color1, &cdef1))
|| !STRINGP (color1)
|| !defined_color (f, SDATA (color1), &cdef1, 0))
if (!(CONSP (color1) && parse_rgb_list (color1, &cdef1))
&& !(STRINGP (color1) && defined_color (f, SDATA (color1), &cdef1, 0)))
signal_error ("Invalid color", color1);
if ((CONSP (color2) && !parse_rgb_list (color2, &cdef2))
|| !STRINGP (color2)
|| !defined_color (f, SDATA (color2), &cdef2, 0))
if (!(CONSP (color2) && parse_rgb_list (color2, &cdef2))
&& !(STRINGP (color2) && defined_color (f, SDATA (color2), &cdef2, 0)))
signal_error ("Invalid color", color2);
return make_number (color_distance (&cdef1, &cdef2));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment