From 7ded3383490c55c98d56b86eae1a3ce78b82aa6a Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Fri, 1 Aug 2008 11:48:29 +0000 Subject: [PATCH] NS port now uses etc/rgb.txt instead of etc/Emacs.clr (now removed); function Fw32_load_color_file moved to xfaces x_load_color_file --- etc/ChangeLog | 4 + etc/Emacs.clr | 758 -------------------------------------------------- src/ChangeLog | 10 + src/nsterm.m | 66 ++--- src/w32fns.c | 50 +--- src/xfaces.c | 53 ++++ 6 files changed, 102 insertions(+), 839 deletions(-) delete mode 100644 etc/Emacs.clr diff --git a/etc/ChangeLog b/etc/ChangeLog index 0b575d7c85..c18a590d87 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2008-08-01 Adrian Robert + + * Emacs.clr: Remove. + 2008-07-31 Dan Nicolaescu * termcap.src: Remove file. diff --git a/etc/Emacs.clr b/etc/Emacs.clr deleted file mode 100644 index a1461d7295..0000000000 --- a/etc/Emacs.clr +++ /dev/null @@ -1,758 +0,0 @@ -757 -0 1.000 0.980 0.980 1.0 snow -0 0.973 0.973 1.000 1.0 ghost white -0 0.973 0.973 1.000 1.0 GhostWhite -0 0.961 0.961 0.961 1.0 white smoke -0 0.961 0.961 0.961 1.0 WhiteSmoke -0 0.863 0.863 0.863 1.0 gainsboro -0 1.000 0.980 0.941 1.0 floral white -0 1.000 0.980 0.941 1.0 FloralWhite -0 0.992 0.961 0.902 1.0 old lace -0 0.992 0.961 0.902 1.0 OldLace -0 0.980 0.941 0.902 1.0 linen -0 0.980 0.922 0.843 1.0 antique white -0 0.980 0.922 0.843 1.0 AntiqueWhite -0 1.000 0.937 0.835 1.0 papaya whip -0 1.000 0.937 0.835 1.0 PapayaWhip -0 1.000 0.922 0.804 1.0 blanched almond -0 1.000 0.922 0.804 1.0 BlanchedAlmond -0 1.000 0.894 0.769 1.0 bisque -0 1.000 0.855 0.725 1.0 peach puff -0 1.000 0.855 0.725 1.0 PeachPuff -0 1.000 0.871 0.678 1.0 navajo white -0 1.000 0.871 0.678 1.0 NavajoWhite -0 1.000 0.894 0.710 1.0 moccasin -0 1.000 0.973 0.863 1.0 cornsilk -0 1.000 1.000 0.941 1.0 ivory -0 1.000 0.980 0.804 1.0 lemon chiffon -0 1.000 0.980 0.804 1.0 LemonChiffon -0 1.000 0.961 0.933 1.0 seashell -0 0.941 1.000 0.941 1.0 honeydew -0 0.961 1.000 0.980 1.0 mint cream -0 0.961 1.000 0.980 1.0 MintCream -0 0.941 1.000 1.000 1.0 azure -0 0.941 0.973 1.000 1.0 alice blue -0 0.941 0.973 1.000 1.0 AliceBlue -0 0.902 0.902 0.980 1.0 lavender -0 1.000 0.941 0.961 1.0 lavender blush -0 1.000 0.941 0.961 1.0 LavenderBlush -0 1.000 0.894 0.882 1.0 misty rose -0 1.000 0.894 0.882 1.0 MistyRose -0 1.000 1.000 1.000 1.0 white -0 0.000 0.000 0.000 1.0 black -0 0.184 0.310 0.310 1.0 dark slate gray -0 0.184 0.310 0.310 1.0 DarkSlateGray -0 0.184 0.310 0.310 1.0 dark slate grey -0 0.184 0.310 0.310 1.0 DarkSlateGrey -0 0.412 0.412 0.412 1.0 dim gray -0 0.412 0.412 0.412 1.0 DimGray -0 0.412 0.412 0.412 1.0 dim grey -0 0.412 0.412 0.412 1.0 DimGrey -0 0.439 0.502 0.565 1.0 slate gray -0 0.439 0.502 0.565 1.0 SlateGray -0 0.439 0.502 0.565 1.0 slate grey -0 0.439 0.502 0.565 1.0 SlateGrey -0 0.467 0.533 0.600 1.0 light slate gray -0 0.467 0.533 0.600 1.0 LightSlateGray -0 0.467 0.533 0.600 1.0 light slate grey -0 0.467 0.533 0.600 1.0 LightSlateGrey -0 0.745 0.745 0.745 1.0 gray -0 0.745 0.745 0.745 1.0 grey -0 0.827 0.827 0.827 1.0 light grey -0 0.827 0.827 0.827 1.0 LightGrey -0 0.827 0.827 0.827 1.0 light gray -0 0.827 0.827 0.827 1.0 LightGray -0 0.098 0.098 0.439 1.0 midnight blue -0 0.098 0.098 0.439 1.0 MidnightBlue -0 0.000 0.000 0.502 1.0 navy -0 0.000 0.000 0.502 1.0 navy blue -0 0.000 0.000 0.502 1.0 NavyBlue -0 0.392 0.584 0.929 1.0 cornflower blue -0 0.392 0.584 0.929 1.0 CornflowerBlue -0 0.282 0.239 0.545 1.0 dark slate blue -0 0.282 0.239 0.545 1.0 DarkSlateBlue -0 0.416 0.353 0.804 1.0 slate blue -0 0.416 0.353 0.804 1.0 SlateBlue -0 0.482 0.408 0.933 1.0 medium slate blue -0 0.482 0.408 0.933 1.0 MediumSlateBlue -0 0.518 0.439 1.000 1.0 light slate blue -0 0.518 0.439 1.000 1.0 LightSlateBlue -0 0.000 0.000 0.804 1.0 medium blue -0 0.000 0.000 0.804 1.0 MediumBlue -0 0.255 0.412 0.882 1.0 royal blue -0 0.255 0.412 0.882 1.0 RoyalBlue -0 0.000 0.000 1.000 1.0 blue -0 0.118 0.565 1.000 1.0 dodger blue -0 0.118 0.565 1.000 1.0 DodgerBlue -0 0.000 0.749 1.000 1.0 deep sky blue -0 0.000 0.749 1.000 1.0 DeepSkyBlue -0 0.529 0.808 0.922 1.0 sky blue -0 0.529 0.808 0.922 1.0 SkyBlue -0 0.529 0.808 0.980 1.0 light sky blue -0 0.529 0.808 0.980 1.0 LightSkyBlue -0 0.275 0.510 0.706 1.0 steel blue -0 0.275 0.510 0.706 1.0 SteelBlue -0 0.690 0.769 0.871 1.0 light steel blue -0 0.690 0.769 0.871 1.0 LightSteelBlue -0 0.678 0.847 0.902 1.0 light blue -0 0.678 0.847 0.902 1.0 LightBlue -0 0.690 0.878 0.902 1.0 powder blue -0 0.690 0.878 0.902 1.0 PowderBlue -0 0.686 0.933 0.933 1.0 pale turquoise -0 0.686 0.933 0.933 1.0 PaleTurquoise -0 0.000 0.808 0.820 1.0 dark turquoise -0 0.000 0.808 0.820 1.0 DarkTurquoise -0 0.282 0.820 0.800 1.0 medium turquoise -0 0.282 0.820 0.800 1.0 MediumTurquoise -0 0.251 0.878 0.816 1.0 turquoise -0 0.000 1.000 1.000 1.0 cyan -0 0.878 1.000 1.000 1.0 light cyan -0 0.878 1.000 1.000 1.0 LightCyan -0 0.373 0.620 0.627 1.0 cadet blue -0 0.373 0.620 0.627 1.0 CadetBlue -0 0.400 0.804 0.667 1.0 medium aquamarine -0 0.400 0.804 0.667 1.0 MediumAquamarine -0 0.498 1.000 0.831 1.0 aquamarine -0 0.000 0.392 0.000 1.0 dark green -0 0.000 0.392 0.000 1.0 DarkGreen -0 0.333 0.420 0.184 1.0 dark olive green -0 0.333 0.420 0.184 1.0 DarkOliveGreen -0 0.561 0.737 0.561 1.0 dark sea green -0 0.561 0.737 0.561 1.0 DarkSeaGreen -0 0.180 0.545 0.341 1.0 sea green -0 0.180 0.545 0.341 1.0 SeaGreen -0 0.235 0.702 0.443 1.0 medium sea green -0 0.235 0.702 0.443 1.0 MediumSeaGreen -0 0.125 0.698 0.667 1.0 light sea green -0 0.125 0.698 0.667 1.0 LightSeaGreen -0 0.596 0.984 0.596 1.0 pale green -0 0.596 0.984 0.596 1.0 PaleGreen -0 0.000 1.000 0.498 1.0 spring green -0 0.000 1.000 0.498 1.0 SpringGreen -0 0.486 0.988 0.000 1.0 lawn green -0 0.486 0.988 0.000 1.0 LawnGreen -0 0.000 1.000 0.000 1.0 green -0 0.498 1.000 0.000 1.0 chartreuse -0 0.000 0.980 0.604 1.0 medium spring green -0 0.000 0.980 0.604 1.0 MediumSpringGreen -0 0.678 1.000 0.184 1.0 green yellow -0 0.678 1.000 0.184 1.0 GreenYellow -0 0.196 0.804 0.196 1.0 lime green -0 0.196 0.804 0.196 1.0 LimeGreen -0 0.604 0.804 0.196 1.0 yellow green -0 0.604 0.804 0.196 1.0 YellowGreen -0 0.133 0.545 0.133 1.0 forest green -0 0.133 0.545 0.133 1.0 ForestGreen -0 0.420 0.557 0.137 1.0 olive drab -0 0.420 0.557 0.137 1.0 OliveDrab -0 0.741 0.718 0.420 1.0 dark khaki -0 0.741 0.718 0.420 1.0 DarkKhaki -0 0.941 0.902 0.549 1.0 khaki -0 0.933 0.910 0.667 1.0 pale goldenrod -0 0.933 0.910 0.667 1.0 PaleGoldenrod -0 0.980 0.980 0.824 1.0 light goldenrod yellow -0 0.980 0.980 0.824 1.0 LightGoldenrodYellow -0 1.000 1.000 0.878 1.0 light yellow -0 1.000 1.000 0.878 1.0 LightYellow -0 1.000 1.000 0.000 1.0 yellow -0 1.000 0.843 0.000 1.0 gold -0 0.933 0.867 0.510 1.0 light goldenrod -0 0.933 0.867 0.510 1.0 LightGoldenrod -0 0.855 0.647 0.125 1.0 goldenrod -0 0.722 0.525 0.043 1.0 dark goldenrod -0 0.722 0.525 0.043 1.0 DarkGoldenrod -0 0.737 0.561 0.561 1.0 rosy brown -0 0.737 0.561 0.561 1.0 RosyBrown -0 0.804 0.361 0.361 1.0 indian red -0 0.804 0.361 0.361 1.0 IndianRed -0 0.545 0.271 0.075 1.0 saddle brown -0 0.545 0.271 0.075 1.0 SaddleBrown -0 0.627 0.322 0.176 1.0 sienna -0 0.804 0.522 0.247 1.0 peru -0 0.871 0.722 0.529 1.0 burlywood -0 0.961 0.961 0.863 1.0 beige -0 0.961 0.871 0.702 1.0 wheat -0 0.957 0.643 0.376 1.0 sandy brown -0 0.957 0.643 0.376 1.0 SandyBrown -0 0.824 0.706 0.549 1.0 tan -0 0.824 0.412 0.118 1.0 chocolate -0 0.698 0.133 0.133 1.0 firebrick -0 0.647 0.165 0.165 1.0 brown -0 0.914 0.588 0.478 1.0 dark salmon -0 0.914 0.588 0.478 1.0 DarkSalmon -0 0.980 0.502 0.447 1.0 salmon -0 1.000 0.627 0.478 1.0 light salmon -0 1.000 0.627 0.478 1.0 LightSalmon -0 1.000 0.647 0.000 1.0 orange -0 1.000 0.549 0.000 1.0 dark orange -0 1.000 0.549 0.000 1.0 DarkOrange -0 1.000 0.498 0.314 1.0 coral -0 0.941 0.502 0.502 1.0 light coral -0 0.941 0.502 0.502 1.0 LightCoral -0 1.000 0.388 0.278 1.0 tomato -0 1.000 0.271 0.000 1.0 orange red -0 1.000 0.271 0.000 1.0 OrangeRed -0 1.000 0.000 0.000 1.0 red -0 1.000 0.412 0.706 1.0 hot pink -0 1.000 0.412 0.706 1.0 HotPink -0 1.000 0.078 0.576 1.0 deep pink -0 1.000 0.078 0.576 1.0 DeepPink -0 1.000 0.753 0.796 1.0 pink -0 1.000 0.714 0.757 1.0 light pink -0 1.000 0.714 0.757 1.0 LightPink -0 0.859 0.439 0.576 1.0 pale violet red -0 0.859 0.439 0.576 1.0 PaleVioletRed -0 0.690 0.188 0.376 1.0 maroon -0 0.780 0.082 0.522 1.0 medium violet red -0 0.780 0.082 0.522 1.0 MediumVioletRed -0 0.816 0.125 0.565 1.0 violet red -0 0.816 0.125 0.565 1.0 VioletRed -0 1.000 0.000 1.000 1.0 magenta -0 0.933 0.510 0.933 1.0 violet -0 0.867 0.627 0.867 1.0 plum -0 0.855 0.439 0.839 1.0 orchid -0 0.729 0.333 0.827 1.0 medium orchid -0 0.729 0.333 0.827 1.0 MediumOrchid -0 0.600 0.196 0.800 1.0 dark orchid -0 0.600 0.196 0.800 1.0 DarkOrchid -0 0.580 0.000 0.827 1.0 dark violet -0 0.580 0.000 0.827 1.0 DarkViolet -0 0.541 0.169 0.886 1.0 blue violet -0 0.541 0.169 0.886 1.0 BlueViolet -0 0.627 0.125 0.941 1.0 purple -0 0.576 0.439 0.859 1.0 medium purple -0 0.576 0.439 0.859 1.0 MediumPurple -0 0.847 0.749 0.847 1.0 thistle -0 1.000 0.980 0.980 1.0 snow1 -0 0.933 0.914 0.914 1.0 snow2 -0 0.804 0.788 0.788 1.0 snow3 -0 0.545 0.537 0.537 1.0 snow4 -0 1.000 0.961 0.933 1.0 seashell1 -0 0.933 0.898 0.871 1.0 seashell2 -0 0.804 0.773 0.749 1.0 seashell3 -0 0.545 0.525 0.510 1.0 seashell4 -0 1.000 0.937 0.859 1.0 AntiqueWhite1 -0 0.933 0.875 0.800 1.0 AntiqueWhite2 -0 0.804 0.753 0.690 1.0 AntiqueWhite3 -0 0.545 0.514 0.471 1.0 AntiqueWhite4 -0 1.000 0.894 0.769 1.0 bisque1 -0 0.933 0.835 0.718 1.0 bisque2 -0 0.804 0.718 0.620 1.0 bisque3 -0 0.545 0.490 0.420 1.0 bisque4 -0 1.000 0.855 0.725 1.0 PeachPuff1 -0 0.933 0.796 0.678 1.0 PeachPuff2 -0 0.804 0.686 0.584 1.0 PeachPuff3 -0 0.545 0.467 0.396 1.0 PeachPuff4 -0 1.000 0.871 0.678 1.0 NavajoWhite1 -0 0.933 0.812 0.631 1.0 NavajoWhite2 -0 0.804 0.702 0.545 1.0 NavajoWhite3 -0 0.545 0.475 0.369 1.0 NavajoWhite4 -0 1.000 0.980 0.804 1.0 LemonChiffon1 -0 0.933 0.914 0.749 1.0 LemonChiffon2 -0 0.804 0.788 0.647 1.0 LemonChiffon3 -0 0.545 0.537 0.439 1.0 LemonChiffon4 -0 1.000 0.973 0.863 1.0 cornsilk1 -0 0.933 0.910 0.804 1.0 cornsilk2 -0 0.804 0.784 0.694 1.0 cornsilk3 -0 0.545 0.533 0.471 1.0 cornsilk4 -0 1.000 1.000 0.941 1.0 ivory1 -0 0.933 0.933 0.878 1.0 ivory2 -0 0.804 0.804 0.757 1.0 ivory3 -0 0.545 0.545 0.514 1.0 ivory4 -0 0.941 1.000 0.941 1.0 honeydew1 -0 0.878 0.933 0.878 1.0 honeydew2 -0 0.757 0.804 0.757 1.0 honeydew3 -0 0.514 0.545 0.514 1.0 honeydew4 -0 1.000 0.941 0.961 1.0 LavenderBlush1 -0 0.933 0.878 0.898 1.0 LavenderBlush2 -0 0.804 0.757 0.773 1.0 LavenderBlush3 -0 0.545 0.514 0.525 1.0 LavenderBlush4 -0 1.000 0.894 0.882 1.0 MistyRose1 -0 0.933 0.835 0.824 1.0 MistyRose2 -0 0.804 0.718 0.710 1.0 MistyRose3 -0 0.545 0.490 0.482 1.0 MistyRose4 -0 0.941 1.000 1.000 1.0 azure1 -0 0.878 0.933 0.933 1.0 azure2 -0 0.757 0.804 0.804 1.0 azure3 -0 0.514 0.545 0.545 1.0 azure4 -0 0.514 0.435 1.000 1.0 SlateBlue1 -0 0.478 0.404 0.933 1.0 SlateBlue2 -0 0.412 0.349 0.804 1.0 SlateBlue3 -0 0.278 0.235 0.545 1.0 SlateBlue4 -0 0.282 0.463 1.000 1.0 RoyalBlue1 -0 0.263 0.431 0.933 1.0 RoyalBlue2 -0 0.227 0.373 0.804 1.0 RoyalBlue3 -0 0.153 0.251 0.545 1.0 RoyalBlue4 -0 0.000 0.000 1.000 1.0 blue1 -0 0.000 0.000 0.933 1.0 blue2 -0 0.000 0.000 0.804 1.0 blue3 -0 0.000 0.000 0.545 1.0 blue4 -0 0.118 0.565 1.000 1.0 DodgerBlue1 -0 0.110 0.525 0.933 1.0 DodgerBlue2 -0 0.094 0.455 0.804 1.0 DodgerBlue3 -0 0.063 0.306 0.545 1.0 DodgerBlue4 -0 0.388 0.722 1.000 1.0 SteelBlue1 -0 0.361 0.675 0.933 1.0 SteelBlue2 -0 0.310 0.580 0.804 1.0 SteelBlue3 -0 0.212 0.392 0.545 1.0 SteelBlue4 -0 0.000 0.749 1.000 1.0 DeepSkyBlue1 -0 0.000 0.698 0.933 1.0 DeepSkyBlue2 -0 0.000 0.604 0.804 1.0 DeepSkyBlue3 -0 0.000 0.408 0.545 1.0 DeepSkyBlue4 -0 0.529 0.808 1.000 1.0 SkyBlue1 -0 0.494 0.753 0.933 1.0 SkyBlue2 -0 0.424 0.651 0.804 1.0 SkyBlue3 -0 0.290 0.439 0.545 1.0 SkyBlue4 -0 0.690 0.886 1.000 1.0 LightSkyBlue1 -0 0.643 0.827 0.933 1.0 LightSkyBlue2 -0 0.553 0.714 0.804 1.0 LightSkyBlue3 -0 0.376 0.482 0.545 1.0 LightSkyBlue4 -0 0.776 0.886 1.000 1.0 SlateGray1 -0 0.725 0.827 0.933 1.0 SlateGray2 -0 0.624 0.714 0.804 1.0 SlateGray3 -0 0.424 0.482 0.545 1.0 SlateGray4 -0 0.792 0.882 1.000 1.0 LightSteelBlue1 -0 0.737 0.824 0.933 1.0 LightSteelBlue2 -0 0.635 0.710 0.804 1.0 LightSteelBlue3 -0 0.431 0.482 0.545 1.0 LightSteelBlue4 -0 0.749 0.937 1.000 1.0 LightBlue1 -0 0.698 0.875 0.933 1.0 LightBlue2 -0 0.604 0.753 0.804 1.0 LightBlue3 -0 0.408 0.514 0.545 1.0 LightBlue4 -0 0.878 1.000 1.000 1.0 LightCyan1 -0 0.820 0.933 0.933 1.0 LightCyan2 -0 0.706 0.804 0.804 1.0 LightCyan3 -0 0.478 0.545 0.545 1.0 LightCyan4 -0 0.733 1.000 1.000 1.0 PaleTurquoise1 -0 0.682 0.933 0.933 1.0 PaleTurquoise2 -0 0.588 0.804 0.804 1.0 PaleTurquoise3 -0 0.400 0.545 0.545 1.0 PaleTurquoise4 -0 0.596 0.961 1.000 1.0 CadetBlue1 -0 0.557 0.898 0.933 1.0 CadetBlue2 -0 0.478 0.773 0.804 1.0 CadetBlue3 -0 0.325 0.525 0.545 1.0 CadetBlue4 -0 0.000 0.961 1.000 1.0 turquoise1 -0 0.000 0.898 0.933 1.0 turquoise2 -0 0.000 0.773 0.804 1.0 turquoise3 -0 0.000 0.525 0.545 1.0 turquoise4 -0 0.000 1.000 1.000 1.0 cyan1 -0 0.000 0.933 0.933 1.0 cyan2 -0 0.000 0.804 0.804 1.0 cyan3 -0 0.000 0.545 0.545 1.0 cyan4 -0 0.592 1.000 1.000 1.0 DarkSlateGray1 -0 0.553 0.933 0.933 1.0 DarkSlateGray2 -0 0.475 0.804 0.804 1.0 DarkSlateGray3 -0 0.322 0.545 0.545 1.0 DarkSlateGray4 -0 0.498 1.000 0.831 1.0 aquamarine1 -0 0.463 0.933 0.776 1.0 aquamarine2 -0 0.400 0.804 0.667 1.0 aquamarine3 -0 0.271 0.545 0.455 1.0 aquamarine4 -0 0.757 1.000 0.757 1.0 DarkSeaGreen1 -0 0.706 0.933 0.706 1.0 DarkSeaGreen2 -0 0.608 0.804 0.608 1.0 DarkSeaGreen3 -0 0.412 0.545 0.412 1.0 DarkSeaGreen4 -0 0.329 1.000 0.624 1.0 SeaGreen1 -0 0.306 0.933 0.580 1.0 SeaGreen2 -0 0.263 0.804 0.502 1.0 SeaGreen3 -0 0.180 0.545 0.341 1.0 SeaGreen4 -0 0.604 1.000 0.604 1.0 PaleGreen1 -0 0.565 0.933 0.565 1.0 PaleGreen2 -0 0.486 0.804 0.486 1.0 PaleGreen3 -0 0.329 0.545 0.329 1.0 PaleGreen4 -0 0.000 1.000 0.498 1.0 SpringGreen1 -0 0.000 0.933 0.463 1.0 SpringGreen2 -0 0.000 0.804 0.400 1.0 SpringGreen3 -0 0.000 0.545 0.271 1.0 SpringGreen4 -0 0.000 1.000 0.000 1.0 green1 -0 0.000 0.933 0.000 1.0 green2 -0 0.000 0.804 0.000 1.0 green3 -0 0.000 0.545 0.000 1.0 green4 -0 0.498 1.000 0.000 1.0 chartreuse1 -0 0.463 0.933 0.000 1.0 chartreuse2 -0 0.400 0.804 0.000 1.0 chartreuse3 -0 0.271 0.545 0.000 1.0 chartreuse4 -0 0.753 1.000 0.243 1.0 OliveDrab1 -0 0.702 0.933 0.227 1.0 OliveDrab2 -0 0.604 0.804 0.196 1.0 OliveDrab3 -0 0.412 0.545 0.133 1.0 OliveDrab4 -0 0.792 1.000 0.439 1.0 DarkOliveGreen1 -0 0.737 0.933 0.408 1.0 DarkOliveGreen2 -0 0.635 0.804 0.353 1.0 DarkOliveGreen3 -0 0.431 0.545 0.239 1.0 DarkOliveGreen4 -0 1.000 0.965 0.561 1.0 khaki1 -0 0.933 0.902 0.522 1.0 khaki2 -0 0.804 0.776 0.451 1.0 khaki3 -0 0.545 0.525 0.306 1.0 khaki4 -0 1.000 0.925 0.545 1.0 LightGoldenrod1 -0 0.933 0.863 0.510 1.0 LightGoldenrod2 -0 0.804 0.745 0.439 1.0 LightGoldenrod3 -0 0.545 0.506 0.298 1.0 LightGoldenrod4 -0 1.000 1.000 0.878 1.0 LightYellow1 -0 0.933 0.933 0.820 1.0 LightYellow2 -0 0.804 0.804 0.706 1.0 LightYellow3 -0 0.545 0.545 0.478 1.0 LightYellow4 -0 1.000 1.000 0.000 1.0 yellow1 -0 0.933 0.933 0.000 1.0 yellow2 -0 0.804 0.804 0.000 1.0 yellow3 -0 0.545 0.545 0.000 1.0 yellow4 -0 1.000 0.843 0.000 1.0 gold1 -0 0.933 0.788 0.000 1.0 gold2 -0 0.804 0.678 0.000 1.0 gold3 -0 0.545 0.459 0.000 1.0 gold4 -0 1.000 0.757 0.145 1.0 goldenrod1 -0 0.933 0.706 0.133 1.0 goldenrod2 -0 0.804 0.608 0.114 1.0 goldenrod3 -0 0.545 0.412 0.078 1.0 goldenrod4 -0 1.000 0.725 0.059 1.0 DarkGoldenrod1 -0 0.933 0.678 0.055 1.0 DarkGoldenrod2 -0 0.804 0.584 0.047 1.0 DarkGoldenrod3 -0 0.545 0.396 0.031 1.0 DarkGoldenrod4 -0 1.000 0.757 0.757 1.0 RosyBrown1 -0 0.933 0.706 0.706 1.0 RosyBrown2 -0 0.804 0.608 0.608 1.0 RosyBrown3 -0 0.545 0.412 0.412 1.0 RosyBrown4 -0 1.000 0.416 0.416 1.0 IndianRed1 -0 0.933 0.388 0.388 1.0 IndianRed2 -0 0.804 0.333 0.333 1.0 IndianRed3 -0 0.545 0.227 0.227 1.0 IndianRed4 -0 1.000 0.510 0.278 1.0 sienna1 -0 0.933 0.475 0.259 1.0 sienna2 -0 0.804 0.408 0.224 1.0 sienna3 -0 0.545 0.278 0.149 1.0 sienna4 -0 1.000 0.827 0.608 1.0 burlywood1 -0 0.933 0.773 0.569 1.0 burlywood2 -0 0.804 0.667 0.490 1.0 burlywood3 -0 0.545 0.451 0.333 1.0 burlywood4 -0 1.000 0.906 0.729 1.0 wheat1 -0 0.933 0.847 0.682 1.0 wheat2 -0 0.804 0.729 0.588 1.0 wheat3 -0 0.545 0.494 0.400 1.0 wheat4 -0 1.000 0.647 0.310 1.0 tan1 -0 0.933 0.604 0.286 1.0 tan2 -0 0.804 0.522 0.247 1.0 tan3 -0 0.545 0.353 0.169 1.0 tan4 -0 1.000 0.498 0.141 1.0 chocolate1 -0 0.933 0.463 0.129 1.0 chocolate2 -0 0.804 0.400 0.114 1.0 chocolate3 -0 0.545 0.271 0.075 1.0 chocolate4 -0 1.000 0.188 0.188 1.0 firebrick1 -0 0.933 0.173 0.173 1.0 firebrick2 -0 0.804 0.149 0.149 1.0 firebrick3 -0 0.545 0.102 0.102 1.0 firebrick4 -0 1.000 0.251 0.251 1.0 brown1 -0 0.933 0.231 0.231 1.0 brown2 -0 0.804 0.200 0.200 1.0 brown3 -0 0.545 0.137 0.137 1.0 brown4 -0 1.000 0.549 0.412 1.0 salmon1 -0 0.933 0.510 0.384 1.0 salmon2 -0 0.804 0.439 0.329 1.0 salmon3 -0 0.545 0.298 0.224 1.0 salmon4 -0 1.000 0.627 0.478 1.0 LightSalmon1 -0 0.933 0.584 0.447 1.0 LightSalmon2 -0 0.804 0.506 0.384 1.0 LightSalmon3 -0 0.545 0.341 0.259 1.0 LightSalmon4 -0 1.000 0.647 0.000 1.0 orange1 -0 0.933 0.604 0.000 1.0 orange2 -0 0.804 0.522 0.000 1.0 orange3 -0 0.545 0.353 0.000 1.0 orange4 -0 1.000 0.498 0.000 1.0 DarkOrange1 -0 0.933 0.463 0.000 1.0 DarkOrange2 -0 0.804 0.400 0.000 1.0 DarkOrange3 -0 0.545 0.271 0.000 1.0 DarkOrange4 -0 1.000 0.447 0.337 1.0 coral1 -0 0.933 0.416 0.314 1.0 coral2 -0 0.804 0.357 0.271 1.0 coral3 -0 0.545 0.243 0.184 1.0 coral4 -0 1.000 0.388 0.278 1.0 tomato1 -0 0.933 0.361 0.259 1.0 tomato2 -0 0.804 0.310 0.224 1.0 tomato3 -0 0.545 0.212 0.149 1.0 tomato4 -0 1.000 0.271 0.000 1.0 OrangeRed1 -0 0.933 0.251 0.000 1.0 OrangeRed2 -0 0.804 0.216 0.000 1.0 OrangeRed3 -0 0.545 0.145 0.000 1.0 OrangeRed4 -0 1.000 0.000 0.000 1.0 red1 -0 0.933 0.000 0.000 1.0 red2 -0 0.804 0.000 0.000 1.0 red3 -0 0.545 0.000 0.000 1.0 red4 -0 1.000 0.078 0.576 1.0 DeepPink1 -0 0.933 0.071 0.537 1.0 DeepPink2 -0 0.804 0.063 0.463 1.0 DeepPink3 -0 0.545 0.039 0.314 1.0 DeepPink4 -0 1.000 0.431 0.706 1.0 HotPink1 -0 0.933 0.416 0.655 1.0 HotPink2 -0 0.804 0.376 0.565 1.0 HotPink3 -0 0.545 0.227 0.384 1.0 HotPink4 -0 1.000 0.710 0.773 1.0 pink1 -0 0.933 0.663 0.722 1.0 pink2 -0 0.804 0.569 0.620 1.0 pink3 -0 0.545 0.388 0.424 1.0 pink4 -0 1.000 0.682 0.725 1.0 LightPink1 -0 0.933 0.635 0.678 1.0 LightPink2 -0 0.804 0.549 0.584 1.0 LightPink3 -0 0.545 0.373 0.396 1.0 LightPink4 -0 1.000 0.510 0.671 1.0 PaleVioletRed1 -0 0.933 0.475 0.624 1.0 PaleVioletRed2 -0 0.804 0.408 0.537 1.0 PaleVioletRed3 -0 0.545 0.278 0.365 1.0 PaleVioletRed4 -0 1.000 0.204 0.702 1.0 maroon1 -0 0.933 0.188 0.655 1.0 maroon2 -0 0.804 0.161 0.565 1.0 maroon3 -0 0.545 0.110 0.384 1.0 maroon4 -0 1.000 0.243 0.588 1.0 VioletRed1 -0 0.933 0.227 0.549 1.0 VioletRed2 -0 0.804 0.196 0.471 1.0 VioletRed3 -0 0.545 0.133 0.322 1.0 VioletRed4 -0 1.000 0.000 1.000 1.0 magenta1 -0 0.933 0.000 0.933 1.0 magenta2 -0 0.804 0.000 0.804 1.0 magenta3 -0 0.545 0.000 0.545 1.0 magenta4 -0 1.000 0.514 0.980 1.0 orchid1 -0 0.933 0.478 0.914 1.0 orchid2 -0 0.804 0.412 0.788 1.0 orchid3 -0 0.545 0.278 0.537 1.0 orchid4 -0 1.000 0.733 1.000 1.0 plum1 -0 0.933 0.682 0.933 1.0 plum2 -0 0.804 0.588 0.804 1.0 plum3 -0 0.545 0.400 0.545 1.0 plum4 -0 0.878 0.400 1.000 1.0 MediumOrchid1 -0 0.820 0.373 0.933 1.0 MediumOrchid2 -0 0.706 0.322 0.804 1.0 MediumOrchid3 -0 0.478 0.216 0.545 1.0 MediumOrchid4 -0 0.749 0.243 1.000 1.0 DarkOrchid1 -0 0.698 0.227 0.933 1.0 DarkOrchid2 -0 0.604 0.196 0.804 1.0 DarkOrchid3 -0 0.408 0.133 0.545 1.0 DarkOrchid4 -0 0.608 0.188 1.000 1.0 purple1 -0 0.569 0.173 0.933 1.0 purple2 -0 0.490 0.149 0.804 1.0 purple3 -0 0.333 0.102 0.545 1.0 purple4 -0 0.671 0.510 1.000 1.0 MediumPurple1 -0 0.624 0.475 0.933 1.0 MediumPurple2 -0 0.537 0.408 0.804 1.0 MediumPurple3 -0 0.365 0.278 0.545 1.0 MediumPurple4 -0 1.000 0.882 1.000 1.0 thistle1 -0 0.933 0.824 0.933 1.0 thistle2 -0 0.804 0.710 0.804 1.0 thistle3 -0 0.545 0.482 0.545 1.0 thistle4 -0 0.000 0.000 0.000 1.0 gray0 -0 0.000 0.000 0.000 1.0 grey0 -0 0.012 0.012 0.012 1.0 gray1 -0 0.012 0.012 0.012 1.0 grey1 -0 0.020 0.020 0.020 1.0 gray2 -0 0.020 0.020 0.020 1.0 grey2 -0 0.031 0.031 0.031 1.0 gray3 -0 0.031 0.031 0.031 1.0 grey3 -0 0.039 0.039 0.039 1.0 gray4 -0 0.039 0.039 0.039 1.0 grey4 -0 0.051 0.051 0.051 1.0 gray5 -0 0.051 0.051 0.051 1.0 grey5 -0 0.059 0.059 0.059 1.0 gray6 -0 0.059 0.059 0.059 1.0 grey6 -0 0.071 0.071 0.071 1.0 gray7 -0 0.071 0.071 0.071 1.0 grey7 -0 0.078 0.078 0.078 1.0 gray8 -0 0.078 0.078 0.078 1.0 grey8 -0 0.090 0.090 0.090 1.0 gray9 -0 0.090 0.090 0.090 1.0 grey9 -0 0.102 0.102 0.102 1.0 gray10 -0 0.102 0.102 0.102 1.0 grey10 -0 0.110 0.110 0.110 1.0 gray11 -0 0.110 0.110 0.110 1.0 grey11 -0 0.122 0.122 0.122 1.0 gray12 -0 0.122 0.122 0.122 1.0 grey12 -0 0.129 0.129 0.129 1.0 gray13 -0 0.129 0.129 0.129 1.0 grey13 -0 0.141 0.141 0.141 1.0 gray14 -0 0.141 0.141 0.141 1.0 grey14 -0 0.149 0.149 0.149 1.0 gray15 -0 0.149 0.149 0.149 1.0 grey15 -0 0.161 0.161 0.161 1.0 gray16 -0 0.161 0.161 0.161 1.0 grey16 -0 0.169 0.169 0.169 1.0 gray17 -0 0.169 0.169 0.169 1.0 grey17 -0 0.180 0.180 0.180 1.0 gray18 -0 0.180 0.180 0.180 1.0 grey18 -0 0.188 0.188 0.188 1.0 gray19 -0 0.188 0.188 0.188 1.0 grey19 -0 0.200 0.200 0.200 1.0 gray20 -0 0.200 0.200 0.200 1.0 grey20 -0 0.212 0.212 0.212 1.0 gray21 -0 0.212 0.212 0.212 1.0 grey21 -0 0.220 0.220 0.220 1.0 gray22 -0 0.220 0.220 0.220 1.0 grey22 -0 0.231 0.231 0.231 1.0 gray23 -0 0.231 0.231 0.231 1.0 grey23 -0 0.239 0.239 0.239 1.0 gray24 -0 0.239 0.239 0.239 1.0 grey24 -0 0.251 0.251 0.251 1.0 gray25 -0 0.251 0.251 0.251 1.0 grey25 -0 0.259 0.259 0.259 1.0 gray26 -0 0.259 0.259 0.259 1.0 grey26 -0 0.271 0.271 0.271 1.0 gray27 -0 0.271 0.271 0.271 1.0 grey27 -0 0.278 0.278 0.278 1.0 gray28 -0 0.278 0.278 0.278 1.0 grey28 -0 0.290 0.290 0.290 1.0 gray29 -0 0.290 0.290 0.290 1.0 grey29 -0 0.302 0.302 0.302 1.0 gray30 -0 0.302 0.302 0.302 1.0 grey30 -0 0.310 0.310 0.310 1.0 gray31 -0 0.310 0.310 0.310 1.0 grey31 -0 0.322 0.322 0.322 1.0 gray32 -0 0.322 0.322 0.322 1.0 grey32 -0 0.329 0.329 0.329 1.0 gray33 -0 0.329 0.329 0.329 1.0 grey33 -0 0.341 0.341 0.341 1.0 gray34 -0 0.341 0.341 0.341 1.0 grey34 -0 0.349 0.349 0.349 1.0 gray35 -0 0.349 0.349 0.349 1.0 grey35 -0 0.361 0.361 0.361 1.0 gray36 -0 0.361 0.361 0.361 1.0 grey36 -0 0.369 0.369 0.369 1.0 gray37 -0 0.369 0.369 0.369 1.0 grey37 -0 0.380 0.380 0.380 1.0 gray38 -0 0.380 0.380 0.380 1.0 grey38 -0 0.388 0.388 0.388 1.0 gray39 -0 0.388 0.388 0.388 1.0 grey39 -0 0.400 0.400 0.400 1.0 gray40 -0 0.400 0.400 0.400 1.0 grey40 -0 0.412 0.412 0.412 1.0 gray41 -0 0.412 0.412 0.412 1.0 grey41 -0 0.420 0.420 0.420 1.0 gray42 -0 0.420 0.420 0.420 1.0 grey42 -0 0.431 0.431 0.431 1.0 gray43 -0 0.431 0.431 0.431 1.0 grey43 -0 0.439 0.439 0.439 1.0 gray44 -0 0.439 0.439 0.439 1.0 grey44 -0 0.451 0.451 0.451 1.0 gray45 -0 0.451 0.451 0.451 1.0 grey45 -0 0.459 0.459 0.459 1.0 gray46 -0 0.459 0.459 0.459 1.0 grey46 -0 0.471 0.471 0.471 1.0 gray47 -0 0.471 0.471 0.471 1.0 grey47 -0 0.478 0.478 0.478 1.0 gray48 -0 0.478 0.478 0.478 1.0 grey48 -0 0.490 0.490 0.490 1.0 gray49 -0 0.490 0.490 0.490 1.0 grey49 -0 0.498 0.498 0.498 1.0 gray50 -0 0.498 0.498 0.498 1.0 grey50 -0 0.510 0.510 0.510 1.0 gray51 -0 0.510 0.510 0.510 1.0 grey51 -0 0.522 0.522 0.522 1.0 gray52 -0 0.522 0.522 0.522 1.0 grey52 -0 0.529 0.529 0.529 1.0 gray53 -0 0.529 0.529 0.529 1.0 grey53 -0 0.541 0.541 0.541 1.0 gray54 -0 0.541 0.541 0.541 1.0 grey54 -0 0.549 0.549 0.549 1.0 gray55 -0 0.549 0.549 0.549 1.0 grey55 -0 0.561 0.561 0.561 1.0 gray56 -0 0.561 0.561 0.561 1.0 grey56 -0 0.569 0.569 0.569 1.0 gray57 -0 0.569 0.569 0.569 1.0 grey57 -0 0.580 0.580 0.580 1.0 gray58 -0 0.580 0.580 0.580 1.0 grey58 -0 0.588 0.588 0.588 1.0 gray59 -0 0.588 0.588 0.588 1.0 grey59 -0 0.600 0.600 0.600 1.0 gray60 -0 0.600 0.600 0.600 1.0 grey60 -0 0.612 0.612 0.612 1.0 gray61 -0 0.612 0.612 0.612 1.0 grey61 -0 0.620 0.620 0.620 1.0 gray62 -0 0.620 0.620 0.620 1.0 grey62 -0 0.631 0.631 0.631 1.0 gray63 -0 0.631 0.631 0.631 1.0 grey63 -0 0.639 0.639 0.639 1.0 gray64 -0 0.639 0.639 0.639 1.0 grey64 -0 0.651 0.651 0.651 1.0 gray65 -0 0.651 0.651 0.651 1.0 grey65 -0 0.659 0.659 0.659 1.0 gray66 -0 0.659 0.659 0.659 1.0 grey66 -0 0.671 0.671 0.671 1.0 gray67 -0 0.671 0.671 0.671 1.0 grey67 -0 0.678 0.678 0.678 1.0 gray68 -0 0.678 0.678 0.678 1.0 grey68 -0 0.690 0.690 0.690 1.0 gray69 -0 0.690 0.690 0.690 1.0 grey69 -0 0.702 0.702 0.702 1.0 gray70 -0 0.702 0.702 0.702 1.0 grey70 -0 0.710 0.710 0.710 1.0 gray71 -0 0.710 0.710 0.710 1.0 grey71 -0 0.722 0.722 0.722 1.0 gray72 -0 0.722 0.722 0.722 1.0 grey72 -0 0.729 0.729 0.729 1.0 gray73 -0 0.729 0.729 0.729 1.0 grey73 -0 0.741 0.741 0.741 1.0 gray74 -0 0.741 0.741 0.741 1.0 grey74 -0 0.749 0.749 0.749 1.0 gray75 -0 0.749 0.749 0.749 1.0 grey75 -0 0.761 0.761 0.761 1.0 gray76 -0 0.761 0.761 0.761 1.0 grey76 -0 0.769 0.769 0.769 1.0 gray77 -0 0.769 0.769 0.769 1.0 grey77 -0 0.780 0.780 0.780 1.0 gray78 -0 0.780 0.780 0.780 1.0 grey78 -0 0.788 0.788 0.788 1.0 gray79 -0 0.788 0.788 0.788 1.0 grey79 -0 0.800 0.800 0.800 1.0 gray80 -0 0.800 0.800 0.800 1.0 grey80 -0 0.812 0.812 0.812 1.0 gray81 -0 0.812 0.812 0.812 1.0 grey81 -0 0.820 0.820 0.820 1.0 gray82 -0 0.820 0.820 0.820 1.0 grey82 -0 0.831 0.831 0.831 1.0 gray83 -0 0.831 0.831 0.831 1.0 grey83 -0 0.839 0.839 0.839 1.0 gray84 -0 0.839 0.839 0.839 1.0 grey84 -0 0.851 0.851 0.851 1.0 gray85 -0 0.851 0.851 0.851 1.0 grey85 -0 0.859 0.859 0.859 1.0 gray86 -0 0.859 0.859 0.859 1.0 grey86 -0 0.871 0.871 0.871 1.0 gray87 -0 0.871 0.871 0.871 1.0 grey87 -0 0.878 0.878 0.878 1.0 gray88 -0 0.878 0.878 0.878 1.0 grey88 -0 0.890 0.890 0.890 1.0 gray89 -0 0.890 0.890 0.890 1.0 grey89 -0 0.898 0.898 0.898 1.0 gray90 -0 0.898 0.898 0.898 1.0 grey90 -0 0.910 0.910 0.910 1.0 gray91 -0 0.910 0.910 0.910 1.0 grey91 -0 0.922 0.922 0.922 1.0 gray92 -0 0.922 0.922 0.922 1.0 grey92 -0 0.929 0.929 0.929 1.0 gray93 -0 0.929 0.929 0.929 1.0 grey93 -0 0.941 0.941 0.941 1.0 gray94 -0 0.941 0.941 0.941 1.0 grey94 -0 0.949 0.949 0.949 1.0 gray95 -0 0.949 0.949 0.949 1.0 grey95 -0 0.961 0.961 0.961 1.0 gray96 -0 0.961 0.961 0.961 1.0 grey96 -0 0.969 0.969 0.969 1.0 gray97 -0 0.969 0.969 0.969 1.0 grey97 -0 0.980 0.980 0.980 1.0 gray98 -0 0.980 0.980 0.980 1.0 grey98 -0 0.988 0.988 0.988 1.0 gray99 -0 0.988 0.988 0.988 1.0 grey99 -0 1.000 1.000 1.000 1.0 gray100 -0 1.000 1.000 1.000 1.0 grey100 -0 0.663 0.663 0.663 1.0 dark grey -0 0.663 0.663 0.663 1.0 DarkGrey -0 0.663 0.663 0.663 1.0 dark gray -0 0.663 0.663 0.663 1.0 DarkGray -0 0.000 0.000 0.545 1.0 dark blue -0 0.000 0.000 0.545 1.0 DarkBlue -0 0.000 0.545 0.545 1.0 dark cyan -0 0.000 0.545 0.545 1.0 DarkCyan -0 0.545 0.000 0.545 1.0 dark magenta -0 0.545 0.000 0.545 1.0 DarkMagenta -0 0.545 0.000 0.000 1.0 dark red -0 0.545 0.000 0.000 1.0 DarkRed -0 0.565 0.933 0.565 1.0 light green -0 0.565 0.933 0.565 1.0 LightGreen -0 0.500 0.500 0.500 1.0 Gray -0 0.500 0.500 0.500 1.0 Grey -0 0.667 0.667 0.667 1.0 Light Gray -0 0.667 0.667 0.667 1.0 Light Grey -0 0.000 0.000 0.000 0.0 Highlight diff --git a/src/ChangeLog b/src/ChangeLog index 1196458857..9c4f467694 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-08-01 Adrian Robert + + * w32fns.c (w32-load-color-file): Remove. + (x-open-connection): Use renamed Fx_load_color_file. + * xfaces.c (x-load-color-file): Add. + * nsterm.m (ns_initialize): Load colors from etc/rgb.txt instead of + Emacs.clr. + (ns_draw_window_cursor): Change PENDING to TODO or FIXME. + (hide_hourglass): BLOCK_INPUT before UNBLOCK. + 2008-07-31 Michael Albinus * dbusbind.c (Fdbus_call_method_asynchronously) diff --git a/src/nsterm.m b/src/nsterm.m index 2f8348a9b0..0e6c1f33cf 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2313,7 +2313,7 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, r.size.height = h; r.size.width = w->phys_cursor_width; - /* PENDING: if we overwrite the internal border area, it does not get erased; + /* FIXME: if we overwrite the internal border area, it does not get erased; fix by truncating cursor, but better would be to erase properly */ overspill = r.origin.x + r.size.width - WINDOW_TEXT_TO_FRAME_PIXEL_X (w, WINDOW_BOX_RIGHT_EDGE_X (w) @@ -2321,13 +2321,13 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, if (overspill > 0) r.size.width -= overspill; - /* PENDING: 23: use emacs stored f->cursor_type instead of ns-specific */ + /* TODO: 23: use emacs stored f->cursor_type instead of ns-specific */ oldCursorType = FRAME_CURSOR (f); cursorType = FRAME_CURSOR (f) = FRAME_NEW_CURSOR (f); f->output_data.ns->current_cursor_color = f->output_data.ns->desired_cursor_color; - /* PENDING: only needed in rare cases with last-resort font in HELLO.. + /* TODO: only needed in rare cases with last-resort font in HELLO.. should we do this more efficiently? */ ns_clip_to_row (w, glyph_row, -1, NULL); /* ns_focus (f, &r, 1); */ @@ -2434,6 +2434,8 @@ hide_hourglass () if (!hourglass_shown_p) return; + BLOCK_INPUT; + /* TODO: remove NSProgressIndicator from all frames */ hourglass_shown_p = 0; @@ -3822,37 +3824,37 @@ ns_term_init (Lisp_Object display_name) ns_selection_color = NS_SELECTION_COLOR_DEFAULT; { - id cl; - Lisp_Object tem, tem1; - extern Lisp_Object Vsource_directory; - - cl = [NSColorList colorListNamed: @"Emacs"]; + NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; if ( cl == nil ) { - /* first try data_dir, then invocation-dir - and finally source-directory/etc */ - tem1 = tem - = Fexpand_file_name (build_string ("Emacs.clr"), Vdata_directory); - if (NILP (Ffile_exists_p (tem))) + Lisp_Object color_file, color_map, color; + int r,g,b; + unsigned long c; + char *name; + + color_file = Fexpand_file_name (build_string ("rgb.txt"), + Fsymbol_value (intern ("data-directory"))); + if (NILP (Ffile_readable_p (color_file))) + fatal ("Could not find %s.\n", SDATA (color_file)); + + color_map = Fx_load_color_file (color_file); + if (NILP (color_map)) + fatal ("Could not read %s.\n", SDATA (color_file)); + + cl = [[NSColorList alloc] initWithName: @"Emacs"]; + for ( ; CONSP (color_map); color_map = XCDR (color_map)) { - tem = Fexpand_file_name (build_string ("Emacs.clr"), - Vinvocation_directory); - if (NILP (Ffile_exists_p (tem))) - { - Lisp_Object newdir - = Fexpand_file_name (build_string ("etc/"), - Vsource_directory); - tem = Fexpand_file_name (build_string ("Emacs.clr"), - newdir); - } + color = XCAR (color_map); + name = SDATA (XCAR (color)); + c = XINT (XCDR (color)); + [cl setColor: + [NSColor colorWithCalibratedRed: RED_FROM_ULONG (c) / 255.0 + green: GREEN_FROM_ULONG (c) / 255.0 + blue: BLUE_FROM_ULONG (c) / 255.0 + alpha: 1.0] + forKey: [NSString stringWithUTF8String: name]]; } - - cl = [[NSColorList alloc] - initWithName: @"Emacs" - fromFile: [NSString stringWithCString: SDATA (tem)]]; - if (cl ==nil) - fatal ("Could not find %s.\n", SDATA (tem1)); [cl writeToFile: nil]; } } @@ -6553,7 +6555,7 @@ or shrunk (negative). Zero (the default) means standard line height.\n\ Qcontrol = intern ("control"); Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier)); - /*PENDING: move to common code */ + /* TODO: move to common code */ DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, doc: /* If not nil, Emacs uses toolkit scroll bars. */); #ifdef USE_TOOLKIT_SCROLL_BARS @@ -6586,8 +6588,8 @@ baseline level. The default value is nil. */); /* Tell emacs about this window system. */ Fprovide (intern ("ns"), Qnil); - /* PENDING: try to move this back into lisp, ns-win.el loaded too late - right now */ + /* TODO: try to move this back into lisp, ns-win.el loaded too late + right now */ { Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"), build_string ("NS Window system port version number.") }; diff --git a/src/w32fns.c b/src/w32fns.c index 2fb0311400..74cacf3452 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -502,53 +502,6 @@ if the entry is new. */) return (oldrgb); } -DEFUN ("w32-load-color-file", Fw32_load_color_file, - Sw32_load_color_file, 1, 1, 0, - doc: /* Create an alist of color entries from an external file. -Assign this value to `w32-color-map' to replace the existing color map. - -The file should define one named RGB color per line like so: - R G B name -where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */) - (filename) - Lisp_Object filename; -{ - FILE *fp; - Lisp_Object cmap = Qnil; - Lisp_Object abspath; - - CHECK_STRING (filename); - abspath = Fexpand_file_name (filename, Qnil); - - fp = fopen (SDATA (filename), "rt"); - if (fp) - { - char buf[512]; - int red, green, blue; - int num; - - BLOCK_INPUT; - - while (fgets (buf, sizeof (buf), fp) != NULL) { - if (sscanf (buf, "%u %u %u %n", &red, &green, &blue, &num) == 3) - { - char *name = buf + num; - num = strlen (name) - 1; - if (name[num] == '\n') - name[num] = 0; - cmap = Fcons (Fcons (build_string (name), - make_number (RGB (red, green, blue))), - cmap); - } - } - fclose (fp); - - UNBLOCK_INPUT; - } - - return cmap; -} - /* The default colors for the w32 color map */ typedef struct colormap_t { @@ -4995,7 +4948,7 @@ terminate Emacs if we can't open the connection. */) Fexpand_file_name (build_string ("rgb.txt"), Fsymbol_value (intern ("data-directory"))); - Vw32_color_map = Fw32_load_color_file (color_file); + Vw32_color_map = Fx_load_color_file (color_file); UNGCPRO; } @@ -7226,7 +7179,6 @@ only be necessary if the default setting causes problems. */); defsubr (&Sw32_define_rgb_color); defsubr (&Sw32_default_color_map); - defsubr (&Sw32_load_color_file); defsubr (&Sw32_send_sys_command); defsubr (&Sw32_shell_execute); defsubr (&Sw32_register_hot_key); diff --git a/src/xfaces.c b/src/xfaces.c index ff5a636ee2..6180b899db 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6574,6 +6574,56 @@ merge_faces (f, face_name, face_id, base_face_id) } + +#ifndef HAVE_X_WINDOWS +DEFUN ("x-load-color-file", Fx_load_color_file, + Sx_load_color_file, 1, 1, 0, + doc: /* Create an alist of color entries from an external file. + +The file should define one named RGB color per line like so: + R G B name +where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */) + (filename) + Lisp_Object filename; +{ + FILE *fp; + Lisp_Object cmap = Qnil; + Lisp_Object abspath; + + CHECK_STRING (filename); + abspath = Fexpand_file_name (filename, Qnil); + + fp = fopen (SDATA (filename), "rt"); + if (fp) + { + char buf[512]; + int red, green, blue; + int num; + + BLOCK_INPUT; + + while (fgets (buf, sizeof (buf), fp) != NULL) { + if (sscanf (buf, "%u %u %u %n", &red, &green, &blue, &num) == 3) + { + char *name = buf + num; + num = strlen (name) - 1; + if (name[num] == '\n') + name[num] = 0; + cmap = Fcons (Fcons (build_string (name), + make_number ((red << 16) | (green << 8) | blue)), + cmap); + } + } + fclose (fp); + + UNBLOCK_INPUT; + } + + return cmap; +} +#endif + + /*********************************************************************** Tests ***********************************************************************/ @@ -6829,6 +6879,9 @@ syms_of_xfaces () #endif defsubr (&Scolor_gray_p); defsubr (&Scolor_supported_p); +#ifndef HAVE_X_WINDOWS + defsubr (&Sx_load_color_file); +#endif defsubr (&Sface_attribute_relative_p); defsubr (&Smerge_face_attribute); defsubr (&Sinternal_get_lisp_face_attribute); -- 2.20.1