diff options
| author | Kim F. Storm | 2006-08-25 23:33:04 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-08-25 23:33:04 +0000 |
| commit | a508663b2687133cd711ef801be11e0f299b5d9c (patch) | |
| tree | 94e121f1851e0934597587bb17ae6a253549fd33 /src | |
| parent | d489b9c5be7c4c8ccfa5a0f4a411bd891faaa663 (diff) | |
| download | emacs-a508663b2687133cd711ef801be11e0f299b5d9c.tar.gz emacs-a508663b2687133cd711ef801be11e0f299b5d9c.zip | |
(Fxw_color_values): Simplify; use list3.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfns.c | 11 | ||||
| -rw-r--r-- | src/w32fns.c | 17 | ||||
| -rw-r--r-- | src/xfns.c | 11 |
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, | |||
| 2876 | CHECK_STRING (color); | 2876 | CHECK_STRING (color); |
| 2877 | 2877 | ||
| 2878 | if (mac_defined_color (f, SDATA (color), &foo, 0)) | 2878 | if (mac_defined_color (f, SDATA (color), &foo, 0)) |
| 2879 | { | 2879 | return list3 (make_number (foo.red), |
| 2880 | Lisp_Object rgb[3]; | 2880 | make_number (foo.green), |
| 2881 | 2881 | make_number (foo.blue)); | |
| 2882 | rgb[0] = make_number (foo.red); | ||
| 2883 | rgb[1] = make_number (foo.green); | ||
| 2884 | rgb[2] = make_number (foo.blue); | ||
| 2885 | return Flist (3, rgb); | ||
| 2886 | } | ||
| 2887 | else | 2882 | else |
| 2888 | return Qnil; | 2883 | return Qnil; |
| 2889 | } | 2884 | } |
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, | |||
| 6355 | CHECK_STRING (color); | 6355 | CHECK_STRING (color); |
| 6356 | 6356 | ||
| 6357 | if (w32_defined_color (f, SDATA (color), &foo, 0)) | 6357 | if (w32_defined_color (f, SDATA (color), &foo, 0)) |
| 6358 | { | 6358 | return list3 (make_number ((GetRValue (foo.pixel) << 8) |
| 6359 | Lisp_Object rgb[3]; | 6359 | | GetRValue (foo.pixel)), |
| 6360 | 6360 | make_number ((GetGValue (foo.pixel) << 8) | |
| 6361 | rgb[0] = make_number ((GetRValue (foo.pixel) << 8) | 6361 | | GetGValue (foo.pixel)), |
| 6362 | | GetRValue (foo.pixel)); | 6362 | make_number ((GetBValue (foo.pixel) << 8) |
| 6363 | rgb[1] = make_number ((GetGValue (foo.pixel) << 8) | 6363 | | GetBValue (foo.pixel))); |
| 6364 | | GetGValue (foo.pixel)); | ||
| 6365 | rgb[2] = make_number ((GetBValue (foo.pixel) << 8) | ||
| 6366 | | GetBValue (foo.pixel)); | ||
| 6367 | return Flist (3, rgb); | ||
| 6368 | } | ||
| 6369 | else | 6364 | else |
| 6370 | return Qnil; | 6365 | return Qnil; |
| 6371 | } | 6366 | } |
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, | |||
| 3475 | CHECK_STRING (color); | 3475 | CHECK_STRING (color); |
| 3476 | 3476 | ||
| 3477 | if (x_defined_color (f, SDATA (color), &foo, 0)) | 3477 | if (x_defined_color (f, SDATA (color), &foo, 0)) |
| 3478 | { | 3478 | return list3 (make_number (foo.red), |
| 3479 | Lisp_Object rgb[3]; | 3479 | make_number (foo.green), |
| 3480 | 3480 | make_number (foo.blue)); | |
| 3481 | rgb[0] = make_number (foo.red); | ||
| 3482 | rgb[1] = make_number (foo.green); | ||
| 3483 | rgb[2] = make_number (foo.blue); | ||
| 3484 | return Flist (3, rgb); | ||
| 3485 | } | ||
| 3486 | else | 3481 | else |
| 3487 | return Qnil; | 3482 | return Qnil; |
| 3488 | } | 3483 | } |