From 704a3a2d1c4e8e6f4a9d8812975ad33e5889c466 Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Sun, 20 Jul 2008 13:38:08 +0000 Subject: [PATCH] under NS, recognize HSB,AHSB as synonyms for HSV,AHSV in color specifications --- src/ChangeLog | 7 ++++++- src/nsterm.m | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c2be0659253..e673d5a1ec2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,9 @@ -2008-07-19 Adrian Robert +2008-07-20 Adrian Robert + + * nsterm.m (ns_get_color): Recognize HSB,AHSB be synonyms for + HSV,AHSV. + +2008-07-20 Adrian Robert * Makefile.in (ns_appdir): Fix typo in find command. diff --git a/src/nsterm.m b/src/nsterm.m index a1aeb74bd84..a4485173f27 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1328,7 +1328,8 @@ ns_get_color (const char *name, NSColor **col) of colors found in the file Emacs.clr. Color formats include: - #rrggbb or RGBrrggbb where rr, gg, bb specify red, green and blue in hex - ARGBaarrggbb is similar, with aa being the alpha channel (FF = opaque) - - HSVhhssvv and AHSVaahhssvv are similar for hue, saturation, value + - HSVhhssvv and AHSVaahhssvv (or HSB/AHSB) are similar for hue, saturation, + value; - CMYKccmmyykk is similar for cyan, magenta, yellow, black. */ { NSColor * new = nil; @@ -1376,12 +1377,14 @@ ns_get_color (const char *name, NSColor **col) hex = name + 4; color_space = argb; } - else if (!memcmp (name, "HSV", 3) || !memcmp (name, "hsv", 3)) + else if (!memcmp (name, "HSV", 3) || !memcmp (name, "hsv", 3) || + !memcmp (name, "HSB", 3) || !memcmp (name, "hsb", 3)) { hex = name + 3; color_space = hsv; } - else if (!memcmp (name, "AHSV", 4) || !memcmp (name, "ahsv", 4)) + else if (!memcmp (name, "AHSV", 4) || !memcmp (name, "ahsv", 4) || + !memcmp (name, "AHSB", 4) || !memcmp (name, "ahsb", 4)) { hex = name + 4; color_space = ahsv; -- 2.39.2