summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2006-08-25 23:33:04 +0000
committerKim F. Storm <storm@cua.dk>2006-08-25 23:33:04 +0000
commita508663b2687133cd711ef801be11e0f299b5d9c (patch)
tree94e121f1851e0934597587bb17ae6a253549fd33 /src
parentd489b9c5be7c4c8ccfa5a0f4a411bd891faaa663 (diff)
downloademacs-a508663b2687133cd711ef801be11e0f299b5d9c.tar.gz
(Fxw_color_values): Simplify; use list3.
Diffstat (limited to 'src')
-rw-r--r--src/macfns.c11
-rw-r--r--src/w32fns.c17
-rw-r--r--src/xfns.c11
3 files changed, 12 insertions, 27 deletions
diff --git a/src/macfns.c b/src/macfns.c
index 494d6ec1da3..a72cd66cdce 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -2876,14 +2876,9 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
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;
}
diff --git a/src/w32fns.c b/src/w32fns.c
index e1cae4f3eb4..8c6a60d47bf 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -6355,17 +6355,12 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
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;
}
diff --git a/src/xfns.c b/src/xfns.c
index 47916fccb71..8071ff1c4e6 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3475,14 +3475,9 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0,
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;
}