changeset 72529:892ea79efee6

(Fxw_color_values): Simplify; use list3.
author Kim F. Storm <storm@cua.dk>
date Fri, 25 Aug 2006 23:33:04 +0000
parents cea6e823a9c3
children dc615ff0529f
files src/macfns.c src/w32fns.c src/xfns.c
diffstat 3 files changed, 12 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/macfns.c	Fri Aug 25 23:32:17 2006 +0000
+++ b/src/macfns.c	Fri Aug 25 23:33:04 2006 +0000
@@ -2876,14 +2876,9 @@
   CHECK_STRING (color);
 
   if (mac_defined_color (f, SDATA (color), &foo, 0))
-    {
-      Lisp_Object rgb[3];
-
-      rgb[0] = make_number (foo.red);
-      rgb[1] = make_number (foo.green);
-      rgb[2] = make_number (foo.blue);
-      return Flist (3, rgb);
-    }
+    return list3 (make_number (foo.red),
+		  make_number (foo.green),
+		  make_number (foo.blue));
   else
     return Qnil;
 }
--- a/src/w32fns.c	Fri Aug 25 23:32:17 2006 +0000
+++ b/src/w32fns.c	Fri Aug 25 23:33:04 2006 +0000
@@ -6355,17 +6355,12 @@
   CHECK_STRING (color);
 
   if (w32_defined_color (f, SDATA (color), &foo, 0))
-    {
-      Lisp_Object rgb[3];
-
-      rgb[0] = make_number ((GetRValue (foo.pixel) << 8)
-                            | GetRValue (foo.pixel));
-      rgb[1] = make_number ((GetGValue (foo.pixel) << 8)
-                            | GetGValue (foo.pixel));
-      rgb[2] = make_number ((GetBValue (foo.pixel) << 8)
-                            | GetBValue (foo.pixel));
-      return Flist (3, rgb);
-    }
+    return list3 (make_number ((GetRValue (foo.pixel) << 8)
+			       | GetRValue (foo.pixel)),
+		  make_number ((GetGValue (foo.pixel) << 8)
+			       | GetGValue (foo.pixel)),
+		  make_number ((GetBValue (foo.pixel) << 8)
+			       | GetBValue (foo.pixel)));
   else
     return Qnil;
 }
--- a/src/xfns.c	Fri Aug 25 23:32:17 2006 +0000
+++ b/src/xfns.c	Fri Aug 25 23:33:04 2006 +0000
@@ -3475,14 +3475,9 @@
   CHECK_STRING (color);
 
   if (x_defined_color (f, SDATA (color), &foo, 0))
-    {
-      Lisp_Object rgb[3];
-
-      rgb[0] = make_number (foo.red);
-      rgb[1] = make_number (foo.green);
-      rgb[2] = make_number (foo.blue);
-      return Flist (3, rgb);
-    }
+    return list3 (make_number (foo.red),
+		  make_number (foo.green),
+		  make_number (foo.blue));
   else
     return Qnil;
 }