aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
commit4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch)
treec1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/os
parentdc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff)
downloadvcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/Makefile.am3
-rw-r--r--xorg-server/os/Makefile.in95
-rw-r--r--xorg-server/os/WaitFor.c16
-rw-r--r--xorg-server/os/access.c286
-rw-r--r--xorg-server/os/auth.c43
-rw-r--r--xorg-server/os/connection.c117
-rw-r--r--xorg-server/os/io.c97
-rw-r--r--xorg-server/os/log.c69
-rw-r--r--xorg-server/os/oscolor.c1565
-rw-r--r--xorg-server/os/oscolor.h1508
-rw-r--r--xorg-server/os/osdep.h17
-rw-r--r--xorg-server/os/osinit.c25
-rw-r--r--xorg-server/os/rpcauth.c11
-rw-r--r--xorg-server/os/strcasecmp.c70
-rw-r--r--xorg-server/os/strcasestr.c64
-rw-r--r--xorg-server/os/strlcat.c1
-rw-r--r--xorg-server/os/strlcpy.c1
-rw-r--r--xorg-server/os/utils.c390
-rw-r--r--xorg-server/os/xdmauth.c14
-rw-r--r--xorg-server/os/xdmcp.c12
20 files changed, 1864 insertions, 2540 deletions
diff --git a/xorg-server/os/Makefile.am b/xorg-server/os/Makefile.am
index d6d748577..f89da6ba2 100644
--- a/xorg-server/os/Makefile.am
+++ b/xorg-server/os/Makefile.am
@@ -16,10 +16,11 @@ libos_la_SOURCES = \
io.c \
mitauth.c \
oscolor.c \
- oscolor.h \
osdep.h \
osinit.c \
utils.c \
+ strcasecmp.c \
+ strcasestr.c \
xdmauth.c \
xstrans.c \
xprintf.c \
diff --git a/xorg-server/os/Makefile.in b/xorg-server/os/Makefile.in
index bc2eefdc7..7451117dd 100644
--- a/xorg-server/os/Makefile.in
+++ b/xorg-server/os/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -48,7 +48,6 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \
$(top_builddir)/include/xorg-server.h \
$(top_builddir)/include/dix-config.h \
- $(top_builddir)/include/xgl-config.h \
$(top_builddir)/include/xorg-config.h \
$(top_builddir)/include/xkb-config.h \
$(top_builddir)/include/xwin-config.h \
@@ -57,9 +56,9 @@ CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libos_la_LIBADD =
am__libos_la_SOURCES_DIST = WaitFor.c access.c auth.c backtrace.c \
- connection.c io.c mitauth.c oscolor.c oscolor.h osdep.h \
- osinit.c utils.c xdmauth.c xstrans.c xprintf.c log.c rpcauth.c \
- xdmcp.c strlcat.c strlcpy.c
+ connection.c io.c mitauth.c oscolor.c osdep.h osinit.c utils.c \
+ strcasecmp.c strcasestr.c xdmauth.c xstrans.c xprintf.c log.c \
+ rpcauth.c xdmcp.c strlcat.c strlcpy.c
am__objects_1 = log.lo
am__objects_2 = rpcauth.lo
@SECURE_RPC_TRUE@am__objects_3 = $(am__objects_2)
@@ -69,8 +68,9 @@ am__objects_6 = strlcat.lo strlcpy.lo
@NEED_STRLCAT_TRUE@am__objects_7 = $(am__objects_6)
am_libos_la_OBJECTS = WaitFor.lo access.lo auth.lo backtrace.lo \
connection.lo io.lo mitauth.lo oscolor.lo osinit.lo utils.lo \
- xdmauth.lo xstrans.lo xprintf.lo $(am__objects_1) \
- $(am__objects_3) $(am__objects_5) $(am__objects_7)
+ strcasecmp.lo strcasestr.lo xdmauth.lo xstrans.lo xprintf.lo \
+ $(am__objects_1) $(am__objects_3) $(am__objects_5) \
+ $(am__objects_7)
libos_la_OBJECTS = $(am_libos_la_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
os_O_SOURCES = os.c
@@ -81,9 +81,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -98,8 +95,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
-APPDEFAULTDIR = @APPDEFAULTDIR@
APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@
+APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@
+APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AR = @AR@
@@ -120,10 +118,6 @@ CFLAGS = @CFLAGS@
COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DARWIN_LIBS = @DARWIN_LIBS@
DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -145,6 +139,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@
DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@
+DOLT_BASH = @DOLT_BASH@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@
@@ -154,18 +149,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRI_DRIVER_PATH = @DRI_DRIVER_PATH@
DSYMUTIL = @DSYMUTIL@
DTRACE = @DTRACE@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
-FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
-FREETYPE_LIBS = @FREETYPE_LIBS@
GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@
GLX_DEFINES = @GLX_DEFINES@
GL_CFLAGS = @GL_CFLAGS@
@@ -184,7 +176,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@
KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@
KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@
KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@
-LAUNCHD = @LAUNCHD@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@
LEX = @LEX@
@@ -198,7 +190,10 @@ LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LINUXDOC = @LINUXDOC@
+LIPO = @LIPO@
LN_S = @LN_S@
+LTCOMPILE = @LTCOMPILE@
+LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -210,8 +205,7 @@ MESA_SOURCE = @MESA_SOURCE@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
MKDIR_P = @MKDIR_P@
-MKFONTDIR = @MKFONTDIR@
-MKFONTSCALE = @MKFONTSCALE@
+NM = @NM@
NMEDIT = @NMEDIT@
OBJC = @OBJC@
OBJCCLD = @OBJCCLD@
@@ -220,8 +214,8 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
-OPENSSL_LIBS = @OPENSSL_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -254,7 +248,6 @@ VENDOR_NAME = @VENDOR_NAME@
VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@
VENDOR_RELEASE = @VENDOR_RELEASE@
VERSION = @VERSION@
-X11APP_ARCHS = @X11APP_ARCHS@
X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@
XDMCP_CFLAGS = @XDMCP_CFLAGS@
@@ -264,27 +257,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@
XDMX_CFLAGS = @XDMX_CFLAGS@
XDMX_LIBS = @XDMX_LIBS@
XDMX_SYS_LIBS = @XDMX_SYS_LIBS@
-XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@
-XEGL_LIBS = @XEGL_LIBS@
-XEGL_SYS_LIBS = @XEGL_SYS_LIBS@
XEPHYR_CFLAGS = @XEPHYR_CFLAGS@
-XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@
XEPHYR_INCS = @XEPHYR_INCS@
XEPHYR_LIBS = @XEPHYR_LIBS@
XF86CONFIGFILE = @XF86CONFIGFILE@
-XF86MISC_CFLAGS = @XF86MISC_CFLAGS@
-XF86MISC_LIBS = @XF86MISC_LIBS@
XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@
XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@
-XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@
-XGLMODULES_LIBS = @XGLMODULES_LIBS@
-XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@
-XGLXMODULES_LIBS = @XGLXMODULES_LIBS@
-XGLX_LIBS = @XGLX_LIBS@
-XGLX_SYS_LIBS = @XGLX_SYS_LIBS@
-XGL_LIBS = @XGL_LIBS@
-XGL_MODULE_PATH = @XGL_MODULE_PATH@
-XGL_SYS_LIBS = @XGL_SYS_LIBS@
XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@
XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@
XKB_COMPILED_DIR = @XKB_COMPILED_DIR@
@@ -295,10 +273,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@
XNESTMODULES_LIBS = @XNESTMODULES_LIBS@
XNEST_LIBS = @XNEST_LIBS@
XNEST_SYS_LIBS = @XNEST_SYS_LIBS@
-XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@
-XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@
-XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@
-XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_INCS = @XORG_INCS@
XORG_LIBS = @XORG_LIBS@
@@ -307,13 +281,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@
XORG_OS = @XORG_OS@
XORG_OS_SUBDIR = @XORG_OS_SUBDIR@
XORG_SYS_LIBS = @XORG_SYS_LIBS@
-XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@
-XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@
-XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@
-XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@
-XPRINT_CFLAGS = @XPRINT_CFLAGS@
-XPRINT_LIBS = @XPRINT_LIBS@
-XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@
+XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@
+XPBPROXY_LIBS = @XPBPROXY_LIBS@
XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@
XSDL_INCS = @XSDL_INCS@
@@ -346,8 +315,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -367,7 +335,6 @@ driverdir = @driverdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extdir = @extdir@
-ft_config = @ft_config@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -377,12 +344,12 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-launchagentsdir = @launchagentsdir@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
logdir = @logdir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
@@ -400,8 +367,6 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-xglmoduledir = @xglmoduledir@
-xpconfigdir = @xpconfigdir@
noinst_LTLIBRARIES = libos.la
AM_CFLAGS = $(DIX_CFLAGS)
SECURERPC_SRCS = rpcauth.c
@@ -409,9 +374,9 @@ XDMCP_SRCS = xdmcp.c
STRLCAT_SRCS = strlcat.c strlcpy.c
XORG_SRCS = log.c
libos_la_SOURCES = WaitFor.c access.c auth.c backtrace.c connection.c \
- io.c mitauth.c oscolor.c oscolor.h osdep.h osinit.c utils.c \
- xdmauth.c xstrans.c xprintf.c $(XORG_SRCS) $(am__append_1) \
- $(am__append_2) $(am__append_3)
+ io.c mitauth.c oscolor.c osdep.h osinit.c utils.c strcasecmp.c \
+ strcasestr.c xdmauth.c xstrans.c xprintf.c $(XORG_SRCS) \
+ $(am__append_1) $(am__append_2) $(am__append_3)
EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
$(XDMCP_SRCS) $(STRLCAT_SRCS)
@@ -424,8 +389,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -489,6 +454,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oscolor.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osinit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcauth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@
@@ -529,7 +496,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index da12976ca..d6dd99553 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/os/WaitFor.c
@@ -155,9 +155,7 @@ WaitForSomething(int *pClientsReady)
int nready;
fd_set devicesReadable;
CARD32 now = 0;
-#ifdef SMART_SCHEDULE
Bool someReady = FALSE;
-#endif
FD_ZERO(&clientsReadable);
@@ -170,7 +168,6 @@ WaitForSomething(int *pClientsReady)
ProcessWorkQueue();
if (XFD_ANYSET (&ClientsWithInput))
{
-#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable)
{
someReady = TRUE;
@@ -179,13 +176,11 @@ WaitForSomething(int *pClientsReady)
wt = &waittime;
}
else
-#endif
{
XFD_COPYSET (&ClientsWithInput, &clientsReadable);
break;
}
}
-#ifdef SMART_SCHEDULE
if (someReady)
{
XFD_COPYSET(&AllSockets, &LastSelectMask);
@@ -193,7 +188,6 @@ WaitForSomething(int *pClientsReady)
}
else
{
-#endif
wt = NULL;
if (timers)
{
@@ -215,11 +209,9 @@ WaitForSomething(int *pClientsReady)
}
}
XFD_COPYSET(&AllSockets, &LastSelectMask);
-#ifdef SMART_SCHEDULE
}
SmartScheduleStopTimer ();
-#endif
BlockHandler((pointer)&wt, (pointer)&LastSelectMask);
if (NewOutputPending)
FlushAllOutput();
@@ -237,9 +229,7 @@ WaitForSomething(int *pClientsReady)
}
selecterr = GetErrno();
WakeupHandler(i, (pointer)&LastSelectMask);
-#ifdef SMART_SCHEDULE
SmartScheduleStartTimer ();
-#endif
if (i <= 0) /* An error or timeout occurred */
{
if (dispatchException)
@@ -263,7 +253,6 @@ WaitForSomething(int *pClientsReady)
strerror(selecterr));
}
}
-#ifdef SMART_SCHEDULE
else if (someReady)
{
/*
@@ -273,7 +262,6 @@ WaitForSomething(int *pClientsReady)
XFD_COPYSET(&ClientsWithInput, &clientsReadable);
break;
}
-#endif
if (*checkForInput[0] != *checkForInput[1])
return 0;
@@ -310,10 +298,8 @@ WaitForSomething(int *pClientsReady)
return 0;
}
}
-#ifdef SMART_SCHEDULE
if (someReady)
XFD_ORSET(&LastSelectMask, &ClientsWithInput, &LastSelectMask);
-#endif
if (AnyClientsWriteBlocked && XFD_ANYSET (&clientsWritable))
{
NewOutputPending = TRUE;
@@ -364,7 +350,6 @@ WaitForSomething(int *pClientsReady)
curclient = XFD_FD(&savedClientsReadable, i);
client_index = GetConnectionTranslation(curclient);
#endif
-#ifdef XSYNC
/* We implement "strict" priorities.
* Only the highest priority client is returned to
* dix. If multiple clients at the same priority are
@@ -391,7 +376,6 @@ WaitForSomething(int *pClientsReady)
* clients get batched together
*/
else if (client_priority == highest_priority)
-#endif
{
pClientsReady[nready++] = client_index;
}
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index e91dd37e4..50fc5f9f2 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -76,15 +76,11 @@ SOFTWARE.
#include <errno.h>
#include <sys/types.h>
#ifndef WIN32
-#ifndef Lynx
#include <sys/socket.h>
-#else
-#include <socket.h>
-#endif
#include <sys/ioctl.h>
#include <ctype.h>
-#if defined(TCPCONN) || defined(STREAMSCONN) || defined(ISC) || defined(__SCO__)
+#if defined(TCPCONN) || defined(STREAMSCONN) || defined(__SCO__)
#include <netinet/in.h>
#endif /* TCPCONN || STREAMSCONN || ISC || __SCO__ */
#ifdef DNETCONN
@@ -99,35 +95,11 @@ SOFTWARE.
# endif
#endif
-#if defined(DGUX)
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <sys/utsname.h>
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#include <sys/param.h>
-#include <sys/sockio.h>
-#endif
-
-
-#if defined(hpux) || defined(QNX4)
-# include <sys/utsname.h>
-# ifdef HAS_IFREQ
-# include <net/if.h>
-# endif
-#else
#if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__)
# include <sys/utsname.h>
#endif
#if defined(SYSV) && defined(__i386__)
# include <sys/stream.h>
-# ifdef ISC
-# include <sys/stropts.h>
-# include <sys/sioctl.h>
-# endif /* ISC */
#endif
#ifdef __GNU__
#undef SIOCGIFCONF
@@ -135,7 +107,6 @@ SOFTWARE.
#else /*!__GNU__*/
# include <net/if.h>
#endif /*__GNU__ */
-#endif /* hpux */
#ifdef SVR4
#include <sys/sockio.h>
@@ -177,11 +148,7 @@ SOFTWARE.
#endif /* WIN32 */
#ifndef PATH_MAX
-#ifndef Lynx
#include <sys/param.h>
-#else
-#include <param.h>
-#endif
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
@@ -312,7 +279,7 @@ AccessUsingXdmcp (void)
}
-#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && !defined(__sgi) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
+#if defined(SVR4) && !defined(SCO325) && !defined(sun) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
@@ -329,17 +296,6 @@ ifioctl (int fd, int cmd, char *arg)
{
ioc.ic_len = ((struct ifconf *) arg)->ifc_len;
ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf;
-#ifdef ISC
- /* SIOCGIFCONF is somewhat brain damaged on ISC. The argument
- * buffer must contain the ifconf structure as header. Ifc_req
- * is also not a pointer but a one element array of ifreq
- * structures. On return this array is extended by enough
- * ifreq fields to hold all interfaces. The return buffer length
- * is placed in the buffer header.
- */
- ((struct ifconf *) ioc.ic_dp)->ifc_len =
- ioc.ic_len - sizeof(struct ifconf);
-#endif
}
else
{
@@ -351,19 +307,11 @@ ifioctl (int fd, int cmd, char *arg)
#ifdef SVR4
((struct ifconf *) arg)->ifc_len = ioc.ic_len;
#endif
-#ifdef ISC
- {
- ((struct ifconf *) arg)->ifc_len =
- ((struct ifconf *)ioc.ic_dp)->ifc_len;
- ((struct ifconf *) arg)->ifc_buf =
- (caddr_t)((struct ifconf *)ioc.ic_dp)->ifc_req;
- }
-#endif
return(ret);
}
-#else /* Case DGUX, sun, SCO325 NCR and others */
+#else /* Case sun, SCO325 and others */
#define ifioctl ioctl
-#endif /* ((SVR4 && !DGUX !sun !SCO325 !NCR) || ISC) && SIOCGIFCONF */
+#endif /* ((SVR4 && !sun !SCO325) || ISC) && SIOCGIFCONF */
/*
* DefineSelf (fd):
@@ -372,153 +320,7 @@ ifioctl (int fd, int cmd, char *arg)
* for this fd and add them to the selfhosts list.
*/
-#ifdef WINTCP /* NCR Wollongong based TCP */
-
-#include <sys/un.h>
-#include <stropts.h>
-#include <tiuser.h>
-
-#include <sys/stream.h>
-#include <net/if.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/in.h>
-#include <netinet/in_var.h>
-
-void
-DefineSelf (int fd)
-{
- /*
- * The Wolongong drivers used by NCR SVR4/MP-RAS don't understand the
- * socket IO calls that most other drivers seem to like. Because of
- * this, this routine must be special cased for NCR. Eventually,
- * this will be cleared up.
- */
-
- struct ipb ifnet;
- struct in_ifaddr ifaddr;
- struct strioctl str;
- unsigned char *addr;
- register HOST *host;
- int family, len;
-
- if ((fd = open ("/dev/ip", O_RDWR, 0 )) < 0)
- Error ("Getting interface configuration (1)");
-
- /* Indicate that we want to start at the begining */
- ifnet.ib_next = (struct ipb *) 1;
-
- while (ifnet.ib_next)
- {
- str.ic_cmd = IPIOC_GETIPB;
- str.ic_timout = 0;
- str.ic_len = sizeof (struct ipb);
- str.ic_dp = (char *) &ifnet;
-
- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
- {
- close (fd);
- Error ("Getting interface configuration (2)");
- }
-
- ifaddr.ia_next = (struct in_ifaddr *) ifnet.if_addrlist;
- str.ic_cmd = IPIOC_GETINADDR;
- str.ic_timout = 0;
- str.ic_len = sizeof (struct in_ifaddr);
- str.ic_dp = (char *) &ifaddr;
-
- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
- {
- close (fd);
- Error ("Getting interface configuration (3)");
- }
-
- len = sizeof(struct sockaddr_in);
- family = ConvertAddr (IA_SIN(&ifaddr), &len, (pointer *)&addr);
- if (family == -1 || family == FamilyLocal)
- continue;
- for (host = selfhosts;
- host && !addrEqual (family, addr, len, host);
- host = host->next)
- ;
- if (host)
- continue;
- MakeHost(host,len)
- if (host)
- {
- host->family = family;
- host->len = len;
- acopy(addr, host->addr, len);
- host->next = selfhosts;
- selfhosts = host;
- }
-#ifdef XDMCP
- {
- struct sockaddr broad_addr;
-
- /*
- * If this isn't an Internet Address, don't register it.
- */
- if (family != FamilyInternet)
- continue;
-
- /*
- * Ignore 'localhost' entries as they're not useful
- * on the other end of the wire.
- */
- if (len == 4 &&
- addr[0] == 127 && addr[1] == 0 &&
- addr[2] == 0 && addr[3] == 1)
- continue;
-
- /*
- * Ignore '0.0.0.0' entries as they are
- * returned by some OSes for unconfigured NICs but they are
- * not useful on the other end of the wire.
- */
- if (len == 4 &&
- addr[0] == 0 && addr[1] == 0 &&
- addr[2] == 0 && addr[3] == 0)
- continue;
-
- XdmcpRegisterConnection (family, (char *)addr, len);
-
-
-#define IA_BROADADDR(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_broadaddr))
-
- XdmcpRegisterBroadcastAddress (
- (struct sockaddr_in *) IA_BROADADDR(&ifaddr));
-
-#undef IA_BROADADDR
- }
-#endif /* XDMCP */
- }
-
- close(fd);
-
- /*
- * add something of FamilyLocalHost
- */
- for (host = selfhosts;
- host && !addrEqual(FamilyLocalHost, "", 0, host);
- host = host->next);
- if (!host)
- {
- MakeHost(host, 0);
- if (host)
- {
- host->family = FamilyLocalHost;
- host->len = 0;
- acopy("", host->addr, 0);
- host->next = selfhosts;
- selfhosts = host;
- }
- }
-}
-
-#else /* WINTCP */
-
-#if !defined(SIOCGIFCONF) || (defined (hpux) && ! defined (HAS_IFREQ)) || defined(QNX4)
+#if !defined(SIOCGIFCONF)
void
DefineSelf (int fd)
{
@@ -561,19 +363,11 @@ DefineSelf (int fd)
* uname() lets me access to the whole string (it smashes release, you
* see), whereas gethostname() kindly truncates it for me.
*/
-#ifndef QNX4
#ifndef WIN32
uname(&name);
#else
gethostname(name.nodename, sizeof(name.nodename));
#endif
-#else
- /* QNX4's uname returns node number in name.nodename, not the hostname
- have to overwrite it */
- char hname[1024];
- gethostname(hname, 1024);
- name.nodename = hname;
-#endif
hp = _XGethostbyname(name.nodename, hparams);
if (hp != NULL)
@@ -682,16 +476,11 @@ DefineLocalHost:
p->ifr_addr.sa_len - sizeof (p->ifr_addr) : 0))
#define ifraddr_size(a) (a.sa_len)
#else
-#ifdef QNX4
-#define ifr_size(p) (p->ifr_addr.sa_len + IFNAMSIZ)
-#define ifraddr_size(a) (a.sa_len)
-#else
#define ifr_size(p) (sizeof (ifr_type))
#define ifraddr_size(a) (sizeof (a))
#endif
-#endif
-#if defined(DEF_SELF_DEBUG) || (defined(IPv6) && defined(AF_INET6))
+#if defined(IPv6) && defined(AF_INET6)
#include <arpa/inet.h>
#endif
@@ -713,19 +502,21 @@ void
DefineSelf (int fd)
{
#ifndef HAS_GETIFADDRS
- char buf[2048], *cp, *cplim;
- void * bufptr = buf;
-#ifdef USE_SIOCGLIFCONF
+ char *cp, *cplim;
+# ifdef USE_SIOCGLIFCONF
+ struct sockaddr_storage buf[16];
struct lifconf ifc;
register struct lifreq *ifr;
-#ifdef SIOCGLIFNUM
+# ifdef SIOCGLIFNUM
struct lifnum ifn;
-#endif
-#else
+# endif
+# else /* !USE_SIOCGLIFCONF */
+ char buf[2048];
struct ifconf ifc;
register struct ifreq *ifr;
-#endif
-#else
+# endif
+ void * bufptr = buf;
+#else /* HAS_GETIFADDRS */
struct ifaddrs * ifap, *ifr;
#endif
int len;
@@ -795,11 +586,7 @@ DefineSelf (int fd)
ifc.ifc_buf = bufptr;
#define IFC_IOCTL_REQ SIOCGIFCONF
-#ifdef ISC
-#define IFC_IFC_REQ (struct ifreq *) ifc.ifc_buf
-#else
#define IFC_IFC_REQ ifc.ifc_req
-#endif /* ISC */
#define IFC_IFC_LEN ifc.ifc_len
#define IFR_IFR_ADDR ifr->ifr_addr
#define IFR_IFR_NAME ifr->ifr_name
@@ -829,19 +616,6 @@ DefineSelf (int fd)
if (family == FamilyInternet6)
in6_fillscopeid((struct sockaddr_in6 *)&IFR_IFR_ADDR);
#endif
-#ifdef DEF_SELF_DEBUG
- if (family == FamilyInternet)
- ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %d.%d.%d.%d\n",
- IFR_IFR_NAME, addr[0], addr[1], addr[2], addr[3]);
-#if defined(IPv6) && defined(AF_INET6)
- else if (family == FamilyInternet6) {
- char cp[INET6_ADDRSTRLEN] = "";
- inet_ntop(AF_INET6, addr, cp, sizeof(cp));
- ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %s\n",
- IFR_IFR_NAME, cp);
- }
-#endif
-#endif /* DEF_SELF_DEBUG */
for (host = selfhosts;
host && !addrEqual (family, addr, len, host);
host = host->next)
@@ -951,11 +725,6 @@ DefineSelf (int fd)
continue;
}
#endif /* SIOCGIFBRDADDR */
-#ifdef DEF_SELF_DEBUG
- ErrorF("Xserver: DefineSelf(): ifname = %s, baddr = %s\n",
- IFR_IFR_NAME,
- inet_ntoa(((struct sockaddr_in *) &broad_addr)->sin_addr));
-#endif /* DEF_SELF_DEBUG */
XdmcpRegisterBroadcastAddress ((struct sockaddr_in *) &broad_addr);
}
#endif /* XDMCP */
@@ -983,20 +752,6 @@ DefineSelf (int fd)
in6_fillscopeid((struct sockaddr_in6 *)ifr->ifa_addr);
#endif
-#ifdef DEF_SELF_DEBUG
- if (family == FamilyInternet)
- ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %d.%d.%d.%d\n",
- ifr->ifa_name, addr[0], addr[1], addr[2], addr[3]);
-#if defined(IPv6) && defined(AF_INET6)
- else if (family == FamilyInternet6) {
- char cp[INET6_ADDRSTRLEN];
-
- inet_ntop(AF_INET6, addr, cp, sizeof(cp));
- ErrorF("Xserver: DefineSelf(): ifname = %s addr = %s\n",
- ifr->ifa_name, cp);
- }
-#endif
-#endif /* DEF_SELF_DEBUG */
for (host = selfhosts;
host != NULL && !addrEqual(family, addr, len, host);
host = host->next)
@@ -1061,11 +816,6 @@ DefineSelf (int fd)
broad_addr = *ifr->ifa_broadaddr;
else
continue;
-#ifdef DEF_SELF_DEBUG
- ErrorF("Xserver: DefineSelf(): ifname = %s, baddr = %s\n",
- ifr->ifa_name,
- inet_ntoa(((struct sockaddr_in *) &broad_addr)->sin_addr));
-#endif /* DEF_SELF_DEBUG */
XdmcpRegisterBroadcastAddress((struct sockaddr_in *)
&broad_addr);
}
@@ -1095,7 +845,6 @@ DefineSelf (int fd)
}
}
#endif /* hpux && !HAS_IFREQ */
-#endif /* WINTCP */
#ifdef XDMCP
void
@@ -1188,7 +937,8 @@ ResetHosts (char *display)
strlen(display) + 1;
if (fnamelen > sizeof(fname))
FatalError("Display name `%s' is too long\n", display);
- sprintf(fname, ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, display);
+ snprintf(fname, sizeof(fname), ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX,
+ display);
if ((fd = fopen (fname, "r")) != 0)
{
diff --git a/xorg-server/os/auth.c b/xorg-server/os/auth.c
index dab4f60bd..a852e1c3b 100644
--- a/xorg-server/os/auth.c
+++ b/xorg-server/os/auth.c
@@ -314,8 +314,6 @@ GenerateAuthorization(
return -1;
}
-#ifdef HAVE_URANDOM
-
void
GenerateRandomData (int len, char *buf)
{
@@ -326,45 +324,4 @@ GenerateRandomData (int len, char *buf)
close(fd);
}
-#else /* !HAVE_URANDOM */
-
-/* A random number generator that is more unpredictable
- than that shipped with some systems.
- This code is taken from the C standard. */
-
-static unsigned long int next = 1;
-
-static int
-xdm_rand(void)
-{
- next = next * 1103515245 + 12345;
- return (unsigned int)(next/65536) % 32768;
-}
-
-static void
-xdm_srand(unsigned int seed)
-{
- next = seed;
-}
-
-void
-GenerateRandomData (int len, char *buf)
-{
- static int seed;
- int value;
- int i;
-
- seed += GetTimeInMillis();
- xdm_srand (seed);
- for (i = 0; i < len; i++)
- {
- value = xdm_rand ();
- buf[i] ^= (value & 0xff00) >> 8;
- }
-
- /* XXX add getrusage, popen("ps -ale") */
-}
-
-#endif /* HAVE_URANDOM */
-
#endif /* XCSECURITY */
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 1ae50fef0..8f1f73e43 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -74,46 +74,20 @@ SOFTWARE.
#define TRANS_SERVER
#define TRANS_REOPEN
#include <X11/Xtrans/Xtrans.h>
-#ifdef HAVE_LAUNCHD
#include <X11/Xtrans/Xtransint.h>
-#endif
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef WIN32
-#if defined(Lynx)
-#include <socket.h>
-#else
#include <sys/socket.h>
-#endif
-#ifdef hpux
-#include <sys/utsname.h>
-#include <sys/ioctl.h>
-#endif
-#if defined(DGUX)
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/param.h>
-#include <unistd.h>
-#endif
-
-
-#ifdef AIXV3
-#include <sys/ioctl.h>
-#endif
#if defined(TCPCONN) || defined(STREAMSCONN)
# include <netinet/in.h>
# include <arpa/inet.h>
-# if !defined(hpux)
# ifdef apollo
# ifndef NO_TCP_H
# include <netinet/tcp.h>
@@ -124,31 +98,20 @@ SOFTWARE.
# endif
# include <netinet/tcp.h>
# endif
-# endif
# include <arpa/inet.h>
#endif
-#ifndef Lynx
#include <sys/uio.h>
-#else
-#include <uio.h>
-#endif
+
#endif /* WIN32 */
#include "misc.h" /* for typedef of pointer */
#include "osdep.h"
#include <X11/Xpoll.h>
#include "opaque.h"
#include "dixstruct.h"
-#ifdef XAPPGROUP
-#include "appgroup.h"
-#endif
#include "xace.h"
-#ifdef X_NOT_POSIX
-#define Pid_t int
-#else
#define Pid_t pid_t
-#endif
#ifdef DNETCONN
#include <netdnet/dn.h>
@@ -639,8 +602,8 @@ AuthAudit (ClientPtr client, Bool letin,
#ifdef XSERVER_DTRACE
XSERVER_CLIENT_AUTH(client->index, addr, client_pid, client_zid);
- if (auditTrailLevel > 1) {
#endif
+ if (auditTrailLevel > 1) {
if (proto_n)
AuditF("client %d %s from %s%s\n Auth name: %.*s ID: %d\n",
client->index, letin ? "connected" : "rejected", addr,
@@ -650,9 +613,7 @@ AuthAudit (ClientPtr client, Bool letin,
client->index, letin ? "connected" : "rejected", addr,
client_uid_string);
-#ifdef XSERVER_DTRACE
}
-#endif
}
XID
@@ -696,23 +657,17 @@ ClientAuthorized(ClientPtr client,
XID auth_id;
char *reason = NULL;
XtransConnInfo trans_conn;
-#ifdef HAVE_LAUNCHD
- struct sockaddr *saddr;
-#endif
priv = (OsCommPtr)client->osPrivate;
trans_conn = priv->trans_conn;
-#ifdef HAVE_LAUNCHD
- saddr = (struct sockaddr *) (trans_conn->addr);
/* Allow any client to connect without authorization on a launchd socket,
because it is securely created -- this prevents a race condition on launch */
- if (saddr->sa_len > 11 && saddr->sa_family == AF_UNIX &&
- !strncmp(saddr->sa_data, "/tmp/launch", 11)) goto done;
-#endif
-
- auth_id = CheckAuthorization (proto_n, auth_proto,
- string_n, auth_string, client, &reason);
+ if(trans_conn->flags & TRANS_NOXAUTH) {
+ auth_id = (XID) 0L;
+ } else {
+ auth_id = CheckAuthorization (proto_n, auth_proto, string_n, auth_string, client, &reason);
+ }
if (auth_id == (XID) ~0L)
{
@@ -760,7 +715,6 @@ ClientAuthorized(ClientPtr client,
}
}
priv->auth_id = auth_id;
- done:
priv->conn_time = 0;
#ifdef XDMCP
@@ -917,6 +871,10 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure)
ErrorConnMax(new_trans_conn);
_XSERVTransClose(new_trans_conn);
}
+
+ if(trans_conn->flags & TRANS_NOXAUTH)
+ new_trans_conn->flags = new_trans_conn->flags | TRANS_NOXAUTH;
+
}
#ifndef WIN32
}
@@ -1253,7 +1211,7 @@ AttendClient (ClientPtr client)
/* make client impervious to grabs; assume only executing client calls this */
-_X_EXPORT void
+void
MakeClientGrabImpervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1272,7 +1230,7 @@ MakeClientGrabImpervious(ClientPtr client)
/* make client pervious to grabs; assume only executing client calls this */
-_X_EXPORT void
+void
MakeClientGrabPervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1300,3 +1258,52 @@ MakeClientGrabPervious(ClientPtr client)
}
}
+#ifdef XQUARTZ
+/* Add a fd (from launchd) to our listeners */
+_X_EXPORT void ListenOnOpenFD(int fd, int noxauth) {
+ char port[256];
+ XtransConnInfo ciptr;
+
+ if(!strncmp(getenv("DISPLAY"), "/tmp/launch", 11)) {
+ /* Make the path the launchd socket if our DISPLAY is set right */
+ strcpy(port, getenv("DISPLAY"));
+ } else {
+ /* Just some default so things don't break and die. */
+ sprintf(port, ":%d", atoi(display));
+ }
+
+ /* Make our XtransConnInfo
+ * TRANS_SOCKET_LOCAL_INDEX = 5 from Xtrans.c
+ */
+ ciptr = _XSERVTransReopenCOTSServer(5, fd, port);
+ if(ciptr == NULL) {
+ ErrorF("Got NULL while trying to Reopen launchd port.\n");
+ return;
+ }
+
+ if(noxauth)
+ ciptr->flags = ciptr->flags | TRANS_NOXAUTH;
+
+ /* Allocate space to store it */
+ ListenTransFds = (int *) xrealloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int));
+ ListenTransConns = (XtransConnInfo *) xrealloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo));
+
+ /* Store it */
+ ListenTransConns[ListenTransCount] = ciptr;
+ ListenTransFds[ListenTransCount] = fd;
+
+ FD_SET(fd, &WellKnownConnections);
+ FD_SET(fd, &AllSockets);
+
+ /* Increment the count */
+ ListenTransCount++;
+
+ /* This *might* not be needed... /shrug */
+ ResetAuthorization();
+ ResetHosts(display);
+#ifdef XDMCP
+ XdmcpReset();
+#endif
+}
+
+#endif
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index e7ec60952..f07993e5a 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -70,11 +70,7 @@ SOFTWARE.
#include <X11/Xmd.h>
#include <errno.h>
#if !defined(WIN32)
-#ifndef Lynx
#include <sys/uio.h>
-#else
-#include <uio.h>
-#endif
#endif
#include <X11/X.h>
#define NEED_REPLIES
@@ -96,15 +92,7 @@ static ConnectionOutputPtr AllocateOutputBuffer(void);
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/
#ifndef WIN32
-#if defined(EAGAIN) && defined(EWOULDBLOCK)
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK)
-#else
-#ifdef EAGAIN
-#define ETEST(err) (err == EAGAIN)
-#else
-#define ETEST(err) (err == EWOULDBLOCK)
-#endif
-#endif
#else /* WIN32 The socket errorcodes differ from the normal errors*/
#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK)
#endif
@@ -118,13 +106,11 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
#define get_req_len(req,cli) ((cli)->swapped ? \
lswaps((req)->length) : (req)->length)
-#ifdef BIGREQS
#include <X11/extensions/bigreqstr.h>
#define get_big_req_len(req,cli) ((cli)->swapped ? \
lswapl(((xBigReq *)(req))->length) : \
((xBigReq *)(req))->length)
-#endif
#define MAX_TIMES_PER 10
@@ -185,14 +171,25 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
* a partial request) because others clients need to be scheduled.
*****************************************************************/
-#define YieldControl() \
- { isItTimeToYield = TRUE; \
- timesThisConnection = 0; }
-#define YieldControlNoInput() \
- { YieldControl(); \
- FD_CLR(fd, &ClientsWithInput); }
-#define YieldControlDeath() \
- { timesThisConnection = 0; }
+static void
+YieldControl(void)
+{
+ isItTimeToYield = TRUE;
+ timesThisConnection = 0;
+}
+
+static void
+YieldControlNoInput(int fd)
+{
+ YieldControl();
+ FD_CLR(fd, &ClientsWithInput);
+}
+
+static void
+YieldControlDeath(void)
+{
+ timesThisConnection = 0;
+}
int
ReadRequestFromClient(ClientPtr client)
@@ -204,9 +201,7 @@ ReadRequestFromClient(ClientPtr client)
int result;
register xReq *request;
Bool need_header;
-#ifdef BIGREQS
Bool move_header;
-#endif
/* If an input buffer was empty, either free it if it is too big
* or link it into our list of free input buffers. This means that
@@ -255,9 +250,7 @@ ReadRequestFromClient(ClientPtr client)
oci->bufptr += oci->lenLastReq;
need_header = FALSE;
-#ifdef BIGREQS
move_header = FALSE;
-#endif
gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
if (gotnow < sizeof(xReq))
{
@@ -274,7 +267,6 @@ ReadRequestFromClient(ClientPtr client)
*/
request = (xReq *)oci->bufptr;
needed = get_req_len(request, client);
-#ifdef BIGREQS
if (!needed && client->big_requests)
{
/* It's a Big Request. */
@@ -288,7 +280,6 @@ ReadRequestFromClient(ClientPtr client)
else
needed = get_big_req_len(request, client);
}
-#endif
client->req_len = needed;
needed <<= 2; /* needed is in bytes now */
}
@@ -301,14 +292,12 @@ ReadRequestFromClient(ClientPtr client)
*/
oci->lenLastReq = 0;
-#ifdef BIGREQS
if (needed > maxBigRequestSize << 2)
{
/* request is too big for us to handle */
YieldControlDeath();
return -1;
}
-#endif
if ((gotnow == 0) ||
((oci->bufptr - oci->buffer + needed) > oci->size))
{
@@ -357,7 +346,7 @@ ReadRequestFromClient(ClientPtr client)
if (0)
#endif
{
- YieldControlNoInput();
+ YieldControlNoInput(fd);
return 0;
}
}
@@ -385,7 +374,6 @@ ReadRequestFromClient(ClientPtr client)
/* We wanted an xReq, now we've gotten it. */
request = (xReq *)oci->bufptr;
needed = get_req_len(request, client);
-#ifdef BIGREQS
if (!needed && client->big_requests)
{
move_header = TRUE;
@@ -394,24 +382,21 @@ ReadRequestFromClient(ClientPtr client)
else
needed = get_big_req_len(request, client);
}
-#endif
client->req_len = needed;
needed <<= 2;
}
if (gotnow < needed)
{
/* Still don't have enough; punt. */
- YieldControlNoInput();
+ YieldControlNoInput(fd);
return 0;
}
}
if (needed == 0)
{
-#ifdef BIGREQS
if (client->big_requests)
needed = sizeof(xBigReq);
else
-#endif
needed = sizeof(xReq);
}
oci->lenLastReq = needed;
@@ -429,41 +414,32 @@ ReadRequestFromClient(ClientPtr client)
{
request = (xReq *)(oci->bufptr + needed);
if (gotnow >= (result = (get_req_len(request, client) << 2))
-#ifdef BIGREQS
&& (result ||
(client->big_requests &&
(gotnow >= sizeof(xBigReq) &&
gotnow >= (get_big_req_len(request, client) << 2))))
-#endif
)
FD_SET(fd, &ClientsWithInput);
else
{
-#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable)
FD_CLR(fd, &ClientsWithInput);
else
-#endif
- YieldControlNoInput();
+ YieldControlNoInput(fd);
}
}
else
{
if (!gotnow)
AvailableInput = oc;
-#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable)
FD_CLR(fd, &ClientsWithInput);
else
-#endif
- YieldControlNoInput();
+ YieldControlNoInput(fd);
}
-#ifdef SMART_SCHEDULE
if (SmartScheduleDisable)
-#endif
if (++timesThisConnection >= MAX_TIMES_PER)
YieldControl();
-#ifdef BIGREQS
if (move_header)
{
request = (xReq *)oci->bufptr;
@@ -472,7 +448,6 @@ ReadRequestFromClient(ClientPtr client)
oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
}
-#endif
client->requestBuffer = (pointer)oci->bufptr;
#ifdef DEBUG_COMMUNICATION
{
@@ -554,7 +529,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count)
(gotnow >= (int)(get_req_len((xReq *)oci->bufptr, client) << 2)))
FD_SET(fd, &ClientsWithInput);
else
- YieldControlNoInput();
+ YieldControlNoInput(fd);
return(TRUE);
}
@@ -578,13 +553,12 @@ ResetCurrentRequest(ClientPtr client)
gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
if (gotnow < sizeof(xReq))
{
- YieldControlNoInput();
+ YieldControlNoInput(fd);
}
else
{
request = (xReq *)oci->bufptr;
needed = get_req_len(request, client);
-#ifdef BIGREQS
if (!needed && client->big_requests)
{
oci->bufptr -= sizeof(xBigReq) - sizeof(xReq);
@@ -596,7 +570,6 @@ ResetCurrentRequest(ClientPtr client)
swapl(&((xBigReq *)oci->bufptr)->length, n);
}
}
-#endif
if (gotnow >= (needed << 2))
{
if (FD_ISSET(fd, &AllClients))
@@ -610,17 +583,11 @@ ResetCurrentRequest(ClientPtr client)
YieldControl();
}
else
- YieldControlNoInput();
+ YieldControlNoInput(fd);
}
}
-
-
-_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
-
- /* lookup table for adding padding bytes to data that is read from
- or written to the X socket. */
-static int padlength[4] = {0, 3, 2, 1};
+static const int padlength[4] = {0, 3, 2, 1};
/********************
* FlushAllOutput()
@@ -730,11 +697,12 @@ SetCriticalOutputPending(void)
*****************/
_X_EXPORT int
-WriteToClient (ClientPtr who, int count, char *buf)
+WriteToClient (ClientPtr who, int count, const void *__buf)
{
OsCommPtr oc = (OsCommPtr)who->osPrivate;
ConnectionOutputPtr oco = oc->output;
int padBytes;
+ const char *buf = __buf;
#ifdef DEBUG_COMMUNICATION
Bool multicount = FALSE;
#endif
@@ -871,13 +839,14 @@ WriteToClient (ClientPtr who, int count, char *buf)
**********************/
int
-FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
+FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
{
ConnectionOutputPtr oco = oc->output;
int connection = oc->fd;
XtransConnInfo trans_conn = oc->trans_conn;
struct iovec iov[3];
static char padBuffer[3];
+ const char *extraBuf = __extraBuf;
long written;
long padsize;
long notWritten;
@@ -916,14 +885,14 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
before = (-len); \
} else { \
iov[i].iov_len = len; \
- iov[i].iov_base = (pointer) + before; \
+ iov[i].iov_base = (pointer) + before; \
i++; \
remain -= len; \
before = 0; \
}
InsertIOV ((char *)oco->buf, oco->count)
- InsertIOV (extraBuf, extraCount)
+ InsertIOV ((char *)extraBuf, extraCount)
InsertIOV (padBuffer, padsize)
errno = 0;
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c
index ee14624dc..692e78ad3 100644
--- a/xorg-server/os/log.c
+++ b/xorg-server/os/log.c
@@ -312,7 +312,7 @@ _X_EXPORT void
LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
{
const char *s = X_UNKNOWN_STRING;
- char *tmpBuf = NULL;
+ char tmpBuf[1024];
/* Ignore verbosity for X_ERROR */
if (logVerbosity >= verb || logFileVerbosity >= verb || type == X_ERROR) {
@@ -354,21 +354,11 @@ LogVMessageVerb(MessageType type, int verb, const char *format, va_list args)
break;
}
- /*
- * Prefix the format string with the message type. We do it this way
- * so that LogVWrite() is only called once per message.
- */
- if (s) {
- tmpBuf = malloc(strlen(format) + strlen(s) + 1 + 1);
- /* Silently return if malloc fails here. */
- if (!tmpBuf)
- return;
- sprintf(tmpBuf, "%s ", s);
- strcat(tmpBuf, format);
- LogVWrite(verb, tmpBuf, args);
- free(tmpBuf);
- } else
- LogVWrite(verb, format, args);
+ /* if s is not NULL we need a space before format */
+ snprintf(tmpBuf, sizeof(tmpBuf), "%s%s%s", s ? s : "",
+ s ? " " : "",
+ format);
+ LogVWrite(verb, tmpBuf, args);
}
}
@@ -411,9 +401,7 @@ AbortServer(void)
exit (1);
}
-#ifndef AUDIT_PREFIX
-#define AUDIT_PREFIX "AUDIT: %s: %ld %s: "
-#endif
+#define AUDIT_PREFIX "AUDIT: %s: %ld: "
#ifndef AUDIT_TIMEOUT
#define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */
#endif
@@ -445,15 +433,11 @@ AuditPrefix(void)
autime = ctime(&tm);
if ((s = strchr(autime, '\n')))
*s = '\0';
- if ((s = strrchr(argvGlobal[0], '/')))
- s++;
- else
- s = argvGlobal[0];
- len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + strlen(s) + 1;
+ len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1;
tmpBuf = malloc(len);
if (!tmpBuf)
return NULL;
- snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid(), s);
+ snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long)getpid());
return tmpBuf;
}
@@ -499,15 +483,6 @@ VAuditF(const char *f, va_list args)
prefix = AuditPrefix();
len = vsnprintf(buf, sizeof(buf), f, args);
-#if 1
- /* XXX Compressing duplicated messages is temporarily disabled to
- * work around bugzilla 964:
- * https://freedesktop.org/bugzilla/show_bug.cgi?id=964
- */
- ErrorF("%s%s", prefix != NULL ? prefix : "", buf);
- oldlen = -1;
- nrepeat = 0;
-#else
if (len == oldlen && strcmp(buf, oldbuf) == 0) {
/* Message already seen */
nrepeat++;
@@ -521,7 +496,6 @@ VAuditF(const char *f, va_list args)
nrepeat = 0;
auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL);
}
-#endif
if (prefix != NULL)
free(prefix);
}
@@ -541,13 +515,8 @@ FatalError(const char *f, ...)
VErrorF(f, args);
va_end(args);
ErrorF("\n");
-#ifdef DDXOSFATALERROR
if (!beenhere)
OsVendorFatalError();
-#endif
-#ifdef ABORTONFATALERROR
- abort();
-#endif
if (!beenhere) {
beenhere = TRUE;
AbortServer();
@@ -581,21 +550,6 @@ ErrorF(const char * f, ...)
/* A perror() workalike. */
-#ifndef NEED_STRERROR
-#ifdef SYSV
-#if !defined(ISC) || defined(ISC202) || defined(ISC22)
-#define NEED_STRERROR
-#endif
-#endif
-#endif
-
-#if defined(NEED_STRERROR) && !defined(strerror)
-extern char *sys_errlist[];
-extern int sys_nerr;
-#define strerror(n) \
- ((n) >= 0 && (n) < sys_nerr) ? sys_errlist[(n)] : "unknown error"
-#endif
-
_X_EXPORT void
Error(char *str)
{
@@ -608,9 +562,10 @@ Error(char *str)
return;
sprintf(err, "%s: ", str);
strcat(err, strerror(saveErrno));
- LogWrite(-1, err);
+ LogWrite(-1, "%s", err);
+ free(err);
} else
- LogWrite(-1, strerror(saveErrno));
+ LogWrite(-1, "%s", strerror(saveErrno));
}
void
diff --git a/xorg-server/os/oscolor.c b/xorg-server/os/oscolor.c
index f3ff9beac..7f6b93880 100644
--- a/xorg-server/os/oscolor.c
+++ b/xorg-server/os/oscolor.c
@@ -59,60 +59,1527 @@ typedef struct _builtinColor {
unsigned short name;
} BuiltinColor;
-/* These have to come after the struct definition because despair. */
-#include "oscolor.h"
-#define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0]))
+static const char BuiltinColorNames[] = {
+ "alice blue\0"
+ "AliceBlue\0"
+ "antique white\0"
+ "AntiqueWhite\0"
+ "AntiqueWhite1\0"
+ "AntiqueWhite2\0"
+ "AntiqueWhite3\0"
+ "AntiqueWhite4\0"
+ "aquamarine\0"
+ "aquamarine1\0"
+ "aquamarine2\0"
+ "aquamarine3\0"
+ "aquamarine4\0"
+ "azure\0"
+ "azure1\0"
+ "azure2\0"
+ "azure3\0"
+ "azure4\0"
+ "beige\0"
+ "bisque\0"
+ "bisque1\0"
+ "bisque2\0"
+ "bisque3\0"
+ "bisque4\0"
+ "black\0"
+ "blanched almond\0"
+ "BlanchedAlmond\0"
+ "blue\0"
+ "blue violet\0"
+ "blue1\0"
+ "blue2\0"
+ "blue3\0"
+ "blue4\0"
+ "BlueViolet\0"
+ "brown\0"
+ "brown1\0"
+ "brown2\0"
+ "brown3\0"
+ "brown4\0"
+ "burlywood\0"
+ "burlywood1\0"
+ "burlywood2\0"
+ "burlywood3\0"
+ "burlywood4\0"
+ "cadet blue\0"
+ "CadetBlue\0"
+ "CadetBlue1\0"
+ "CadetBlue2\0"
+ "CadetBlue3\0"
+ "CadetBlue4\0"
+ "chartreuse\0"
+ "chartreuse1\0"
+ "chartreuse2\0"
+ "chartreuse3\0"
+ "chartreuse4\0"
+ "chocolate\0"
+ "chocolate1\0"
+ "chocolate2\0"
+ "chocolate3\0"
+ "chocolate4\0"
+ "coral\0"
+ "coral1\0"
+ "coral2\0"
+ "coral3\0"
+ "coral4\0"
+ "cornflower blue\0"
+ "CornflowerBlue\0"
+ "cornsilk\0"
+ "cornsilk1\0"
+ "cornsilk2\0"
+ "cornsilk3\0"
+ "cornsilk4\0"
+ "cyan\0"
+ "cyan1\0"
+ "cyan2\0"
+ "cyan3\0"
+ "cyan4\0"
+ "dark blue\0"
+ "dark cyan\0"
+ "dark goldenrod\0"
+ "dark gray\0"
+ "dark green\0"
+ "dark grey\0"
+ "dark khaki\0"
+ "dark magenta\0"
+ "dark olive green\0"
+ "dark orange\0"
+ "dark orchid\0"
+ "dark red\0"
+ "dark salmon\0"
+ "dark sea green\0"
+ "dark slate blue\0"
+ "dark slate gray\0"
+ "dark slate grey\0"
+ "dark turquoise\0"
+ "dark violet\0"
+ "DarkBlue\0"
+ "DarkCyan\0"
+ "DarkGoldenrod\0"
+ "DarkGoldenrod1\0"
+ "DarkGoldenrod2\0"
+ "DarkGoldenrod3\0"
+ "DarkGoldenrod4\0"
+ "DarkGray\0"
+ "DarkGreen\0"
+ "DarkGrey\0"
+ "DarkKhaki\0"
+ "DarkMagenta\0"
+ "DarkOliveGreen\0"
+ "DarkOliveGreen1\0"
+ "DarkOliveGreen2\0"
+ "DarkOliveGreen3\0"
+ "DarkOliveGreen4\0"
+ "DarkOrange\0"
+ "DarkOrange1\0"
+ "DarkOrange2\0"
+ "DarkOrange3\0"
+ "DarkOrange4\0"
+ "DarkOrchid\0"
+ "DarkOrchid1\0"
+ "DarkOrchid2\0"
+ "DarkOrchid3\0"
+ "DarkOrchid4\0"
+ "DarkRed\0"
+ "DarkSalmon\0"
+ "DarkSeaGreen\0"
+ "DarkSeaGreen1\0"
+ "DarkSeaGreen2\0"
+ "DarkSeaGreen3\0"
+ "DarkSeaGreen4\0"
+ "DarkSlateBlue\0"
+ "DarkSlateGray\0"
+ "DarkSlateGray1\0"
+ "DarkSlateGray2\0"
+ "DarkSlateGray3\0"
+ "DarkSlateGray4\0"
+ "DarkSlateGrey\0"
+ "DarkTurquoise\0"
+ "DarkViolet\0"
+ "deep pink\0"
+ "deep sky blue\0"
+ "DeepPink\0"
+ "DeepPink1\0"
+ "DeepPink2\0"
+ "DeepPink3\0"
+ "DeepPink4\0"
+ "DeepSkyBlue\0"
+ "DeepSkyBlue1\0"
+ "DeepSkyBlue2\0"
+ "DeepSkyBlue3\0"
+ "DeepSkyBlue4\0"
+ "dim gray\0"
+ "dim grey\0"
+ "DimGray\0"
+ "DimGrey\0"
+ "dodger blue\0"
+ "DodgerBlue\0"
+ "DodgerBlue1\0"
+ "DodgerBlue2\0"
+ "DodgerBlue3\0"
+ "DodgerBlue4\0"
+ "firebrick\0"
+ "firebrick1\0"
+ "firebrick2\0"
+ "firebrick3\0"
+ "firebrick4\0"
+ "floral white\0"
+ "FloralWhite\0"
+ "forest green\0"
+ "ForestGreen\0"
+ "gainsboro\0"
+ "ghost white\0"
+ "GhostWhite\0"
+ "gold\0"
+ "gold1\0"
+ "gold2\0"
+ "gold3\0"
+ "gold4\0"
+ "goldenrod\0"
+ "goldenrod1\0"
+ "goldenrod2\0"
+ "goldenrod3\0"
+ "goldenrod4\0"
+ "gray\0"
+ "gray0\0"
+ "gray1\0"
+ "gray10\0"
+ "gray100\0"
+ "gray11\0"
+ "gray12\0"
+ "gray13\0"
+ "gray14\0"
+ "gray15\0"
+ "gray16\0"
+ "gray17\0"
+ "gray18\0"
+ "gray19\0"
+ "gray2\0"
+ "gray20\0"
+ "gray21\0"
+ "gray22\0"
+ "gray23\0"
+ "gray24\0"
+ "gray25\0"
+ "gray26\0"
+ "gray27\0"
+ "gray28\0"
+ "gray29\0"
+ "gray3\0"
+ "gray30\0"
+ "gray31\0"
+ "gray32\0"
+ "gray33\0"
+ "gray34\0"
+ "gray35\0"
+ "gray36\0"
+ "gray37\0"
+ "gray38\0"
+ "gray39\0"
+ "gray4\0"
+ "gray40\0"
+ "gray41\0"
+ "gray42\0"
+ "gray43\0"
+ "gray44\0"
+ "gray45\0"
+ "gray46\0"
+ "gray47\0"
+ "gray48\0"
+ "gray49\0"
+ "gray5\0"
+ "gray50\0"
+ "gray51\0"
+ "gray52\0"
+ "gray53\0"
+ "gray54\0"
+ "gray55\0"
+ "gray56\0"
+ "gray57\0"
+ "gray58\0"
+ "gray59\0"
+ "gray6\0"
+ "gray60\0"
+ "gray61\0"
+ "gray62\0"
+ "gray63\0"
+ "gray64\0"
+ "gray65\0"
+ "gray66\0"
+ "gray67\0"
+ "gray68\0"
+ "gray69\0"
+ "gray7\0"
+ "gray70\0"
+ "gray71\0"
+ "gray72\0"
+ "gray73\0"
+ "gray74\0"
+ "gray75\0"
+ "gray76\0"
+ "gray77\0"
+ "gray78\0"
+ "gray79\0"
+ "gray8\0"
+ "gray80\0"
+ "gray81\0"
+ "gray82\0"
+ "gray83\0"
+ "gray84\0"
+ "gray85\0"
+ "gray86\0"
+ "gray87\0"
+ "gray88\0"
+ "gray89\0"
+ "gray9\0"
+ "gray90\0"
+ "gray91\0"
+ "gray92\0"
+ "gray93\0"
+ "gray94\0"
+ "gray95\0"
+ "gray96\0"
+ "gray97\0"
+ "gray98\0"
+ "gray99\0"
+ "green\0"
+ "green yellow\0"
+ "green1\0"
+ "green2\0"
+ "green3\0"
+ "green4\0"
+ "GreenYellow\0"
+ "grey\0"
+ "grey0\0"
+ "grey1\0"
+ "grey10\0"
+ "grey100\0"
+ "grey11\0"
+ "grey12\0"
+ "grey13\0"
+ "grey14\0"
+ "grey15\0"
+ "grey16\0"
+ "grey17\0"
+ "grey18\0"
+ "grey19\0"
+ "grey2\0"
+ "grey20\0"
+ "grey21\0"
+ "grey22\0"
+ "grey23\0"
+ "grey24\0"
+ "grey25\0"
+ "grey26\0"
+ "grey27\0"
+ "grey28\0"
+ "grey29\0"
+ "grey3\0"
+ "grey30\0"
+ "grey31\0"
+ "grey32\0"
+ "grey33\0"
+ "grey34\0"
+ "grey35\0"
+ "grey36\0"
+ "grey37\0"
+ "grey38\0"
+ "grey39\0"
+ "grey4\0"
+ "grey40\0"
+ "grey41\0"
+ "grey42\0"
+ "grey43\0"
+ "grey44\0"
+ "grey45\0"
+ "grey46\0"
+ "grey47\0"
+ "grey48\0"
+ "grey49\0"
+ "grey5\0"
+ "grey50\0"
+ "grey51\0"
+ "grey52\0"
+ "grey53\0"
+ "grey54\0"
+ "grey55\0"
+ "grey56\0"
+ "grey57\0"
+ "grey58\0"
+ "grey59\0"
+ "grey6\0"
+ "grey60\0"
+ "grey61\0"
+ "grey62\0"
+ "grey63\0"
+ "grey64\0"
+ "grey65\0"
+ "grey66\0"
+ "grey67\0"
+ "grey68\0"
+ "grey69\0"
+ "grey7\0"
+ "grey70\0"
+ "grey71\0"
+ "grey72\0"
+ "grey73\0"
+ "grey74\0"
+ "grey75\0"
+ "grey76\0"
+ "grey77\0"
+ "grey78\0"
+ "grey79\0"
+ "grey8\0"
+ "grey80\0"
+ "grey81\0"
+ "grey82\0"
+ "grey83\0"
+ "grey84\0"
+ "grey85\0"
+ "grey86\0"
+ "grey87\0"
+ "grey88\0"
+ "grey89\0"
+ "grey9\0"
+ "grey90\0"
+ "grey91\0"
+ "grey92\0"
+ "grey93\0"
+ "grey94\0"
+ "grey95\0"
+ "grey96\0"
+ "grey97\0"
+ "grey98\0"
+ "grey99\0"
+ "honeydew\0"
+ "honeydew1\0"
+ "honeydew2\0"
+ "honeydew3\0"
+ "honeydew4\0"
+ "hot pink\0"
+ "HotPink\0"
+ "HotPink1\0"
+ "HotPink2\0"
+ "HotPink3\0"
+ "HotPink4\0"
+ "indian red\0"
+ "IndianRed\0"
+ "IndianRed1\0"
+ "IndianRed2\0"
+ "IndianRed3\0"
+ "IndianRed4\0"
+ "ivory\0"
+ "ivory1\0"
+ "ivory2\0"
+ "ivory3\0"
+ "ivory4\0"
+ "khaki\0"
+ "khaki1\0"
+ "khaki2\0"
+ "khaki3\0"
+ "khaki4\0"
+ "lavender\0"
+ "lavender blush\0"
+ "LavenderBlush\0"
+ "LavenderBlush1\0"
+ "LavenderBlush2\0"
+ "LavenderBlush3\0"
+ "LavenderBlush4\0"
+ "lawn green\0"
+ "LawnGreen\0"
+ "lemon chiffon\0"
+ "LemonChiffon\0"
+ "LemonChiffon1\0"
+ "LemonChiffon2\0"
+ "LemonChiffon3\0"
+ "LemonChiffon4\0"
+ "light blue\0"
+ "light coral\0"
+ "light cyan\0"
+ "light goldenrod\0"
+ "light goldenrod yellow\0"
+ "light gray\0"
+ "light green\0"
+ "light grey\0"
+ "light pink\0"
+ "light salmon\0"
+ "light sea green\0"
+ "light sky blue\0"
+ "light slate blue\0"
+ "light slate gray\0"
+ "light slate grey\0"
+ "light steel blue\0"
+ "light yellow\0"
+ "LightBlue\0"
+ "LightBlue1\0"
+ "LightBlue2\0"
+ "LightBlue3\0"
+ "LightBlue4\0"
+ "LightCoral\0"
+ "LightCyan\0"
+ "LightCyan1\0"
+ "LightCyan2\0"
+ "LightCyan3\0"
+ "LightCyan4\0"
+ "LightGoldenrod\0"
+ "LightGoldenrod1\0"
+ "LightGoldenrod2\0"
+ "LightGoldenrod3\0"
+ "LightGoldenrod4\0"
+ "LightGoldenrodYellow\0"
+ "LightGray\0"
+ "LightGreen\0"
+ "LightGrey\0"
+ "LightPink\0"
+ "LightPink1\0"
+ "LightPink2\0"
+ "LightPink3\0"
+ "LightPink4\0"
+ "LightSalmon\0"
+ "LightSalmon1\0"
+ "LightSalmon2\0"
+ "LightSalmon3\0"
+ "LightSalmon4\0"
+ "LightSeaGreen\0"
+ "LightSkyBlue\0"
+ "LightSkyBlue1\0"
+ "LightSkyBlue2\0"
+ "LightSkyBlue3\0"
+ "LightSkyBlue4\0"
+ "LightSlateBlue\0"
+ "LightSlateGray\0"
+ "LightSlateGrey\0"
+ "LightSteelBlue\0"
+ "LightSteelBlue1\0"
+ "LightSteelBlue2\0"
+ "LightSteelBlue3\0"
+ "LightSteelBlue4\0"
+ "LightYellow\0"
+ "LightYellow1\0"
+ "LightYellow2\0"
+ "LightYellow3\0"
+ "LightYellow4\0"
+ "lime green\0"
+ "LimeGreen\0"
+ "linen\0"
+ "magenta\0"
+ "magenta1\0"
+ "magenta2\0"
+ "magenta3\0"
+ "magenta4\0"
+ "maroon\0"
+ "maroon1\0"
+ "maroon2\0"
+ "maroon3\0"
+ "maroon4\0"
+ "medium aquamarine\0"
+ "medium blue\0"
+ "medium orchid\0"
+ "medium purple\0"
+ "medium sea green\0"
+ "medium slate blue\0"
+ "medium spring green\0"
+ "medium turquoise\0"
+ "medium violet red\0"
+ "MediumAquamarine\0"
+ "MediumBlue\0"
+ "MediumOrchid\0"
+ "MediumOrchid1\0"
+ "MediumOrchid2\0"
+ "MediumOrchid3\0"
+ "MediumOrchid4\0"
+ "MediumPurple\0"
+ "MediumPurple1\0"
+ "MediumPurple2\0"
+ "MediumPurple3\0"
+ "MediumPurple4\0"
+ "MediumSeaGreen\0"
+ "MediumSlateBlue\0"
+ "MediumSpringGreen\0"
+ "MediumTurquoise\0"
+ "MediumVioletRed\0"
+ "midnight blue\0"
+ "MidnightBlue\0"
+ "mint cream\0"
+ "MintCream\0"
+ "misty rose\0"
+ "MistyRose\0"
+ "MistyRose1\0"
+ "MistyRose2\0"
+ "MistyRose3\0"
+ "MistyRose4\0"
+ "moccasin\0"
+ "navajo white\0"
+ "NavajoWhite\0"
+ "NavajoWhite1\0"
+ "NavajoWhite2\0"
+ "NavajoWhite3\0"
+ "NavajoWhite4\0"
+ "navy\0"
+ "navy blue\0"
+ "NavyBlue\0"
+ "old lace\0"
+ "OldLace\0"
+ "olive drab\0"
+ "OliveDrab\0"
+ "OliveDrab1\0"
+ "OliveDrab2\0"
+ "OliveDrab3\0"
+ "OliveDrab4\0"
+ "orange\0"
+ "orange red\0"
+ "orange1\0"
+ "orange2\0"
+ "orange3\0"
+ "orange4\0"
+ "OrangeRed\0"
+ "OrangeRed1\0"
+ "OrangeRed2\0"
+ "OrangeRed3\0"
+ "OrangeRed4\0"
+ "orchid\0"
+ "orchid1\0"
+ "orchid2\0"
+ "orchid3\0"
+ "orchid4\0"
+ "pale goldenrod\0"
+ "pale green\0"
+ "pale turquoise\0"
+ "pale violet red\0"
+ "PaleGoldenrod\0"
+ "PaleGreen\0"
+ "PaleGreen1\0"
+ "PaleGreen2\0"
+ "PaleGreen3\0"
+ "PaleGreen4\0"
+ "PaleTurquoise\0"
+ "PaleTurquoise1\0"
+ "PaleTurquoise2\0"
+ "PaleTurquoise3\0"
+ "PaleTurquoise4\0"
+ "PaleVioletRed\0"
+ "PaleVioletRed1\0"
+ "PaleVioletRed2\0"
+ "PaleVioletRed3\0"
+ "PaleVioletRed4\0"
+ "papaya whip\0"
+ "PapayaWhip\0"
+ "peach puff\0"
+ "PeachPuff\0"
+ "PeachPuff1\0"
+ "PeachPuff2\0"
+ "PeachPuff3\0"
+ "PeachPuff4\0"
+ "peru\0"
+ "pink\0"
+ "pink1\0"
+ "pink2\0"
+ "pink3\0"
+ "pink4\0"
+ "plum\0"
+ "plum1\0"
+ "plum2\0"
+ "plum3\0"
+ "plum4\0"
+ "powder blue\0"
+ "PowderBlue\0"
+ "purple\0"
+ "purple1\0"
+ "purple2\0"
+ "purple3\0"
+ "purple4\0"
+ "red\0"
+ "red1\0"
+ "red2\0"
+ "red3\0"
+ "red4\0"
+ "rosy brown\0"
+ "RosyBrown\0"
+ "RosyBrown1\0"
+ "RosyBrown2\0"
+ "RosyBrown3\0"
+ "RosyBrown4\0"
+ "royal blue\0"
+ "RoyalBlue\0"
+ "RoyalBlue1\0"
+ "RoyalBlue2\0"
+ "RoyalBlue3\0"
+ "RoyalBlue4\0"
+ "saddle brown\0"
+ "SaddleBrown\0"
+ "salmon\0"
+ "salmon1\0"
+ "salmon2\0"
+ "salmon3\0"
+ "salmon4\0"
+ "sandy brown\0"
+ "SandyBrown\0"
+ "sea green\0"
+ "SeaGreen\0"
+ "SeaGreen1\0"
+ "SeaGreen2\0"
+ "SeaGreen3\0"
+ "SeaGreen4\0"
+ "seashell\0"
+ "seashell1\0"
+ "seashell2\0"
+ "seashell3\0"
+ "seashell4\0"
+ "sienna\0"
+ "sienna1\0"
+ "sienna2\0"
+ "sienna3\0"
+ "sienna4\0"
+ "sky blue\0"
+ "SkyBlue\0"
+ "SkyBlue1\0"
+ "SkyBlue2\0"
+ "SkyBlue3\0"
+ "SkyBlue4\0"
+ "slate blue\0"
+ "slate gray\0"
+ "slate grey\0"
+ "SlateBlue\0"
+ "SlateBlue1\0"
+ "SlateBlue2\0"
+ "SlateBlue3\0"
+ "SlateBlue4\0"
+ "SlateGray\0"
+ "SlateGray1\0"
+ "SlateGray2\0"
+ "SlateGray3\0"
+ "SlateGray4\0"
+ "SlateGrey\0"
+ "snow\0"
+ "snow1\0"
+ "snow2\0"
+ "snow3\0"
+ "snow4\0"
+ "spring green\0"
+ "SpringGreen\0"
+ "SpringGreen1\0"
+ "SpringGreen2\0"
+ "SpringGreen3\0"
+ "SpringGreen4\0"
+ "steel blue\0"
+ "SteelBlue\0"
+ "SteelBlue1\0"
+ "SteelBlue2\0"
+ "SteelBlue3\0"
+ "SteelBlue4\0"
+ "tan\0"
+ "tan1\0"
+ "tan2\0"
+ "tan3\0"
+ "tan4\0"
+ "thistle\0"
+ "thistle1\0"
+ "thistle2\0"
+ "thistle3\0"
+ "thistle4\0"
+ "tomato\0"
+ "tomato1\0"
+ "tomato2\0"
+ "tomato3\0"
+ "tomato4\0"
+ "turquoise\0"
+ "turquoise1\0"
+ "turquoise2\0"
+ "turquoise3\0"
+ "turquoise4\0"
+ "violet\0"
+ "violet red\0"
+ "VioletRed\0"
+ "VioletRed1\0"
+ "VioletRed2\0"
+ "VioletRed3\0"
+ "VioletRed4\0"
+ "wheat\0"
+ "wheat1\0"
+ "wheat2\0"
+ "wheat3\0"
+ "wheat4\0"
+ "white\0"
+ "white smoke\0"
+ "WhiteSmoke\0"
+ "yellow\0"
+ "yellow green\0"
+ "yellow1\0"
+ "yellow2\0"
+ "yellow3\0"
+ "yellow4\0"
+ "YellowGreen\0"
+};
-static unsigned char
-OsToLower (unsigned char a)
-{
- if ((a >= XK_A) && (a <= XK_Z))
- return a + (XK_a - XK_A);
- else if ((a >= XK_Agrave) && (a <= XK_Odiaeresis))
- return a + (XK_agrave - XK_Agrave);
- else if ((a >= XK_Ooblique) && (a <= XK_Thorn))
- return a + (XK_oslash - XK_Ooblique);
- else
- return a;
-}
-
-static int
-OsStrCaseCmp (const unsigned char *s1, const unsigned char *s2, int l2)
-{
- unsigned char c1, c2;
-
- for (;;)
- {
- c1 = OsToLower (*s1++);
- if (l2 == 0)
- c2 = '\0';
- else
- c2 = OsToLower (*s2++);
- if (!c1 || !c2)
- break;
- if (c1 != c2)
- break;
- l2--;
- }
- return c2 - c1;
-}
+static const BuiltinColor BuiltinColors[] = {
+ { 240, 248, 255, 0 }, /* alice blue */
+ { 240, 248, 255, 11 }, /* AliceBlue */
+ { 250, 235, 215, 21 }, /* antique white */
+ { 250, 235, 215, 35 }, /* AntiqueWhite */
+ { 255, 239, 219, 48 }, /* AntiqueWhite1 */
+ { 238, 223, 204, 62 }, /* AntiqueWhite2 */
+ { 205, 192, 176, 76 }, /* AntiqueWhite3 */
+ { 139, 131, 120, 90 }, /* AntiqueWhite4 */
+ { 127, 255, 212, 104 }, /* aquamarine */
+ { 127, 255, 212, 115 }, /* aquamarine1 */
+ { 118, 238, 198, 127 }, /* aquamarine2 */
+ { 102, 205, 170, 139 }, /* aquamarine3 */
+ { 69, 139, 116, 151 }, /* aquamarine4 */
+ { 240, 255, 255, 163 }, /* azure */
+ { 240, 255, 255, 169 }, /* azure1 */
+ { 224, 238, 238, 176 }, /* azure2 */
+ { 193, 205, 205, 183 }, /* azure3 */
+ { 131, 139, 139, 190 }, /* azure4 */
+ { 245, 245, 220, 197 }, /* beige */
+ { 255, 228, 196, 203 }, /* bisque */
+ { 255, 228, 196, 210 }, /* bisque1 */
+ { 238, 213, 183, 218 }, /* bisque2 */
+ { 205, 183, 158, 226 }, /* bisque3 */
+ { 139, 125, 107, 234 }, /* bisque4 */
+ { 0, 0, 0, 242 }, /* black */
+ { 255, 235, 205, 248 }, /* blanched almond */
+ { 255, 235, 205, 264 }, /* BlanchedAlmond */
+ { 0, 0, 255, 279 }, /* blue */
+ { 138, 43, 226, 284 }, /* blue violet */
+ { 0, 0, 255, 296 }, /* blue1 */
+ { 0, 0, 238, 302 }, /* blue2 */
+ { 0, 0, 205, 308 }, /* blue3 */
+ { 0, 0, 139, 314 }, /* blue4 */
+ { 138, 43, 226, 320 }, /* BlueViolet */
+ { 165, 42, 42, 331 }, /* brown */
+ { 255, 64, 64, 337 }, /* brown1 */
+ { 238, 59, 59, 344 }, /* brown2 */
+ { 205, 51, 51, 351 }, /* brown3 */
+ { 139, 35, 35, 358 }, /* brown4 */
+ { 222, 184, 135, 365 }, /* burlywood */
+ { 255, 211, 155, 375 }, /* burlywood1 */
+ { 238, 197, 145, 386 }, /* burlywood2 */
+ { 205, 170, 125, 397 }, /* burlywood3 */
+ { 139, 115, 85, 408 }, /* burlywood4 */
+ { 95, 158, 160, 419 }, /* cadet blue */
+ { 95, 158, 160, 430 }, /* CadetBlue */
+ { 152, 245, 255, 440 }, /* CadetBlue1 */
+ { 142, 229, 238, 451 }, /* CadetBlue2 */
+ { 122, 197, 205, 462 }, /* CadetBlue3 */
+ { 83, 134, 139, 473 }, /* CadetBlue4 */
+ { 127, 255, 0, 484 }, /* chartreuse */
+ { 127, 255, 0, 495 }, /* chartreuse1 */
+ { 118, 238, 0, 507 }, /* chartreuse2 */
+ { 102, 205, 0, 519 }, /* chartreuse3 */
+ { 69, 139, 0, 531 }, /* chartreuse4 */
+ { 210, 105, 30, 543 }, /* chocolate */
+ { 255, 127, 36, 553 }, /* chocolate1 */
+ { 238, 118, 33, 564 }, /* chocolate2 */
+ { 205, 102, 29, 575 }, /* chocolate3 */
+ { 139, 69, 19, 586 }, /* chocolate4 */
+ { 255, 127, 80, 597 }, /* coral */
+ { 255, 114, 86, 603 }, /* coral1 */
+ { 238, 106, 80, 610 }, /* coral2 */
+ { 205, 91, 69, 617 }, /* coral3 */
+ { 139, 62, 47, 624 }, /* coral4 */
+ { 100, 149, 237, 631 }, /* cornflower blue */
+ { 100, 149, 237, 647 }, /* CornflowerBlue */
+ { 255, 248, 220, 662 }, /* cornsilk */
+ { 255, 248, 220, 671 }, /* cornsilk1 */
+ { 238, 232, 205, 681 }, /* cornsilk2 */
+ { 205, 200, 177, 691 }, /* cornsilk3 */
+ { 139, 136, 120, 701 }, /* cornsilk4 */
+ { 0, 255, 255, 711 }, /* cyan */
+ { 0, 255, 255, 716 }, /* cyan1 */
+ { 0, 238, 238, 722 }, /* cyan2 */
+ { 0, 205, 205, 728 }, /* cyan3 */
+ { 0, 139, 139, 734 }, /* cyan4 */
+ { 0, 0, 139, 740 }, /* dark blue */
+ { 0, 139, 139, 750 }, /* dark cyan */
+ { 184, 134, 11, 760 }, /* dark goldenrod */
+ { 169, 169, 169, 775 }, /* dark gray */
+ { 0, 100, 0, 785 }, /* dark green */
+ { 169, 169, 169, 796 }, /* dark grey */
+ { 189, 183, 107, 806 }, /* dark khaki */
+ { 139, 0, 139, 817 }, /* dark magenta */
+ { 85, 107, 47, 830 }, /* dark olive green */
+ { 255, 140, 0, 847 }, /* dark orange */
+ { 153, 50, 204, 859 }, /* dark orchid */
+ { 139, 0, 0, 871 }, /* dark red */
+ { 233, 150, 122, 880 }, /* dark salmon */
+ { 143, 188, 143, 892 }, /* dark sea green */
+ { 72, 61, 139, 907 }, /* dark slate blue */
+ { 47, 79, 79, 923 }, /* dark slate gray */
+ { 47, 79, 79, 939 }, /* dark slate grey */
+ { 0, 206, 209, 955 }, /* dark turquoise */
+ { 148, 0, 211, 970 }, /* dark violet */
+ { 0, 0, 139, 982 }, /* DarkBlue */
+ { 0, 139, 139, 991 }, /* DarkCyan */
+ { 184, 134, 11, 1000 }, /* DarkGoldenrod */
+ { 255, 185, 15, 1014 }, /* DarkGoldenrod1 */
+ { 238, 173, 14, 1029 }, /* DarkGoldenrod2 */
+ { 205, 149, 12, 1044 }, /* DarkGoldenrod3 */
+ { 139, 101, 8, 1059 }, /* DarkGoldenrod4 */
+ { 169, 169, 169, 1074 }, /* DarkGray */
+ { 0, 100, 0, 1083 }, /* DarkGreen */
+ { 169, 169, 169, 1093 }, /* DarkGrey */
+ { 189, 183, 107, 1102 }, /* DarkKhaki */
+ { 139, 0, 139, 1112 }, /* DarkMagenta */
+ { 85, 107, 47, 1124 }, /* DarkOliveGreen */
+ { 202, 255, 112, 1139 }, /* DarkOliveGreen1 */
+ { 188, 238, 104, 1155 }, /* DarkOliveGreen2 */
+ { 162, 205, 90, 1171 }, /* DarkOliveGreen3 */
+ { 110, 139, 61, 1187 }, /* DarkOliveGreen4 */
+ { 255, 140, 0, 1203 }, /* DarkOrange */
+ { 255, 127, 0, 1214 }, /* DarkOrange1 */
+ { 238, 118, 0, 1226 }, /* DarkOrange2 */
+ { 205, 102, 0, 1238 }, /* DarkOrange3 */
+ { 139, 69, 0, 1250 }, /* DarkOrange4 */
+ { 153, 50, 204, 1262 }, /* DarkOrchid */
+ { 191, 62, 255, 1273 }, /* DarkOrchid1 */
+ { 178, 58, 238, 1285 }, /* DarkOrchid2 */
+ { 154, 50, 205, 1297 }, /* DarkOrchid3 */
+ { 104, 34, 139, 1309 }, /* DarkOrchid4 */
+ { 139, 0, 0, 1321 }, /* DarkRed */
+ { 233, 150, 122, 1329 }, /* DarkSalmon */
+ { 143, 188, 143, 1340 }, /* DarkSeaGreen */
+ { 193, 255, 193, 1353 }, /* DarkSeaGreen1 */
+ { 180, 238, 180, 1367 }, /* DarkSeaGreen2 */
+ { 155, 205, 155, 1381 }, /* DarkSeaGreen3 */
+ { 105, 139, 105, 1395 }, /* DarkSeaGreen4 */
+ { 72, 61, 139, 1409 }, /* DarkSlateBlue */
+ { 47, 79, 79, 1423 }, /* DarkSlateGray */
+ { 151, 255, 255, 1437 }, /* DarkSlateGray1 */
+ { 141, 238, 238, 1452 }, /* DarkSlateGray2 */
+ { 121, 205, 205, 1467 }, /* DarkSlateGray3 */
+ { 82, 139, 139, 1482 }, /* DarkSlateGray4 */
+ { 47, 79, 79, 1497 }, /* DarkSlateGrey */
+ { 0, 206, 209, 1511 }, /* DarkTurquoise */
+ { 148, 0, 211, 1525 }, /* DarkViolet */
+ { 255, 20, 147, 1536 }, /* deep pink */
+ { 0, 191, 255, 1546 }, /* deep sky blue */
+ { 255, 20, 147, 1560 }, /* DeepPink */
+ { 255, 20, 147, 1569 }, /* DeepPink1 */
+ { 238, 18, 137, 1579 }, /* DeepPink2 */
+ { 205, 16, 118, 1589 }, /* DeepPink3 */
+ { 139, 10, 80, 1599 }, /* DeepPink4 */
+ { 0, 191, 255, 1609 }, /* DeepSkyBlue */
+ { 0, 191, 255, 1621 }, /* DeepSkyBlue1 */
+ { 0, 178, 238, 1634 }, /* DeepSkyBlue2 */
+ { 0, 154, 205, 1647 }, /* DeepSkyBlue3 */
+ { 0, 104, 139, 1660 }, /* DeepSkyBlue4 */
+ { 105, 105, 105, 1673 }, /* dim gray */
+ { 105, 105, 105, 1682 }, /* dim grey */
+ { 105, 105, 105, 1691 }, /* DimGray */
+ { 105, 105, 105, 1699 }, /* DimGrey */
+ { 30, 144, 255, 1707 }, /* dodger blue */
+ { 30, 144, 255, 1719 }, /* DodgerBlue */
+ { 30, 144, 255, 1730 }, /* DodgerBlue1 */
+ { 28, 134, 238, 1742 }, /* DodgerBlue2 */
+ { 24, 116, 205, 1754 }, /* DodgerBlue3 */
+ { 16, 78, 139, 1766 }, /* DodgerBlue4 */
+ { 178, 34, 34, 1778 }, /* firebrick */
+ { 255, 48, 48, 1788 }, /* firebrick1 */
+ { 238, 44, 44, 1799 }, /* firebrick2 */
+ { 205, 38, 38, 1810 }, /* firebrick3 */
+ { 139, 26, 26, 1821 }, /* firebrick4 */
+ { 255, 250, 240, 1832 }, /* floral white */
+ { 255, 250, 240, 1845 }, /* FloralWhite */
+ { 34, 139, 34, 1857 }, /* forest green */
+ { 34, 139, 34, 1870 }, /* ForestGreen */
+ { 220, 220, 220, 1882 }, /* gainsboro */
+ { 248, 248, 255, 1892 }, /* ghost white */
+ { 248, 248, 255, 1904 }, /* GhostWhite */
+ { 255, 215, 0, 1915 }, /* gold */
+ { 255, 215, 0, 1920 }, /* gold1 */
+ { 238, 201, 0, 1926 }, /* gold2 */
+ { 205, 173, 0, 1932 }, /* gold3 */
+ { 139, 117, 0, 1938 }, /* gold4 */
+ { 218, 165, 32, 1944 }, /* goldenrod */
+ { 255, 193, 37, 1954 }, /* goldenrod1 */
+ { 238, 180, 34, 1965 }, /* goldenrod2 */
+ { 205, 155, 29, 1976 }, /* goldenrod3 */
+ { 139, 105, 20, 1987 }, /* goldenrod4 */
+ { 190, 190, 190, 1998 }, /* gray */
+ { 0, 0, 0, 2003 }, /* gray0 */
+ { 3, 3, 3, 2009 }, /* gray1 */
+ { 26, 26, 26, 2015 }, /* gray10 */
+ { 255, 255, 255, 2022 }, /* gray100 */
+ { 28, 28, 28, 2030 }, /* gray11 */
+ { 31, 31, 31, 2037 }, /* gray12 */
+ { 33, 33, 33, 2044 }, /* gray13 */
+ { 36, 36, 36, 2051 }, /* gray14 */
+ { 38, 38, 38, 2058 }, /* gray15 */
+ { 41, 41, 41, 2065 }, /* gray16 */
+ { 43, 43, 43, 2072 }, /* gray17 */
+ { 46, 46, 46, 2079 }, /* gray18 */
+ { 48, 48, 48, 2086 }, /* gray19 */
+ { 5, 5, 5, 2093 }, /* gray2 */
+ { 51, 51, 51, 2099 }, /* gray20 */
+ { 54, 54, 54, 2106 }, /* gray21 */
+ { 56, 56, 56, 2113 }, /* gray22 */
+ { 59, 59, 59, 2120 }, /* gray23 */
+ { 61, 61, 61, 2127 }, /* gray24 */
+ { 64, 64, 64, 2134 }, /* gray25 */
+ { 66, 66, 66, 2141 }, /* gray26 */
+ { 69, 69, 69, 2148 }, /* gray27 */
+ { 71, 71, 71, 2155 }, /* gray28 */
+ { 74, 74, 74, 2162 }, /* gray29 */
+ { 8, 8, 8, 2169 }, /* gray3 */
+ { 77, 77, 77, 2175 }, /* gray30 */
+ { 79, 79, 79, 2182 }, /* gray31 */
+ { 82, 82, 82, 2189 }, /* gray32 */
+ { 84, 84, 84, 2196 }, /* gray33 */
+ { 87, 87, 87, 2203 }, /* gray34 */
+ { 89, 89, 89, 2210 }, /* gray35 */
+ { 92, 92, 92, 2217 }, /* gray36 */
+ { 94, 94, 94, 2224 }, /* gray37 */
+ { 97, 97, 97, 2231 }, /* gray38 */
+ { 99, 99, 99, 2238 }, /* gray39 */
+ { 10, 10, 10, 2245 }, /* gray4 */
+ { 102, 102, 102, 2251 }, /* gray40 */
+ { 105, 105, 105, 2258 }, /* gray41 */
+ { 107, 107, 107, 2265 }, /* gray42 */
+ { 110, 110, 110, 2272 }, /* gray43 */
+ { 112, 112, 112, 2279 }, /* gray44 */
+ { 115, 115, 115, 2286 }, /* gray45 */
+ { 117, 117, 117, 2293 }, /* gray46 */
+ { 120, 120, 120, 2300 }, /* gray47 */
+ { 122, 122, 122, 2307 }, /* gray48 */
+ { 125, 125, 125, 2314 }, /* gray49 */
+ { 13, 13, 13, 2321 }, /* gray5 */
+ { 127, 127, 127, 2327 }, /* gray50 */
+ { 130, 130, 130, 2334 }, /* gray51 */
+ { 133, 133, 133, 2341 }, /* gray52 */
+ { 135, 135, 135, 2348 }, /* gray53 */
+ { 138, 138, 138, 2355 }, /* gray54 */
+ { 140, 140, 140, 2362 }, /* gray55 */
+ { 143, 143, 143, 2369 }, /* gray56 */
+ { 145, 145, 145, 2376 }, /* gray57 */
+ { 148, 148, 148, 2383 }, /* gray58 */
+ { 150, 150, 150, 2390 }, /* gray59 */
+ { 15, 15, 15, 2397 }, /* gray6 */
+ { 153, 153, 153, 2403 }, /* gray60 */
+ { 156, 156, 156, 2410 }, /* gray61 */
+ { 158, 158, 158, 2417 }, /* gray62 */
+ { 161, 161, 161, 2424 }, /* gray63 */
+ { 163, 163, 163, 2431 }, /* gray64 */
+ { 166, 166, 166, 2438 }, /* gray65 */
+ { 168, 168, 168, 2445 }, /* gray66 */
+ { 171, 171, 171, 2452 }, /* gray67 */
+ { 173, 173, 173, 2459 }, /* gray68 */
+ { 176, 176, 176, 2466 }, /* gray69 */
+ { 18, 18, 18, 2473 }, /* gray7 */
+ { 179, 179, 179, 2479 }, /* gray70 */
+ { 181, 181, 181, 2486 }, /* gray71 */
+ { 184, 184, 184, 2493 }, /* gray72 */
+ { 186, 186, 186, 2500 }, /* gray73 */
+ { 189, 189, 189, 2507 }, /* gray74 */
+ { 191, 191, 191, 2514 }, /* gray75 */
+ { 194, 194, 194, 2521 }, /* gray76 */
+ { 196, 196, 196, 2528 }, /* gray77 */
+ { 199, 199, 199, 2535 }, /* gray78 */
+ { 201, 201, 201, 2542 }, /* gray79 */
+ { 20, 20, 20, 2549 }, /* gray8 */
+ { 204, 204, 204, 2555 }, /* gray80 */
+ { 207, 207, 207, 2562 }, /* gray81 */
+ { 209, 209, 209, 2569 }, /* gray82 */
+ { 212, 212, 212, 2576 }, /* gray83 */
+ { 214, 214, 214, 2583 }, /* gray84 */
+ { 217, 217, 217, 2590 }, /* gray85 */
+ { 219, 219, 219, 2597 }, /* gray86 */
+ { 222, 222, 222, 2604 }, /* gray87 */
+ { 224, 224, 224, 2611 }, /* gray88 */
+ { 227, 227, 227, 2618 }, /* gray89 */
+ { 23, 23, 23, 2625 }, /* gray9 */
+ { 229, 229, 229, 2631 }, /* gray90 */
+ { 232, 232, 232, 2638 }, /* gray91 */
+ { 235, 235, 235, 2645 }, /* gray92 */
+ { 237, 237, 237, 2652 }, /* gray93 */
+ { 240, 240, 240, 2659 }, /* gray94 */
+ { 242, 242, 242, 2666 }, /* gray95 */
+ { 245, 245, 245, 2673 }, /* gray96 */
+ { 247, 247, 247, 2680 }, /* gray97 */
+ { 250, 250, 250, 2687 }, /* gray98 */
+ { 252, 252, 252, 2694 }, /* gray99 */
+ { 0, 255, 0, 2701 }, /* green */
+ { 173, 255, 47, 2707 }, /* green yellow */
+ { 0, 255, 0, 2720 }, /* green1 */
+ { 0, 238, 0, 2727 }, /* green2 */
+ { 0, 205, 0, 2734 }, /* green3 */
+ { 0, 139, 0, 2741 }, /* green4 */
+ { 173, 255, 47, 2748 }, /* GreenYellow */
+ { 190, 190, 190, 2760 }, /* grey */
+ { 0, 0, 0, 2765 }, /* grey0 */
+ { 3, 3, 3, 2771 }, /* grey1 */
+ { 26, 26, 26, 2777 }, /* grey10 */
+ { 255, 255, 255, 2784 }, /* grey100 */
+ { 28, 28, 28, 2792 }, /* grey11 */
+ { 31, 31, 31, 2799 }, /* grey12 */
+ { 33, 33, 33, 2806 }, /* grey13 */
+ { 36, 36, 36, 2813 }, /* grey14 */
+ { 38, 38, 38, 2820 }, /* grey15 */
+ { 41, 41, 41, 2827 }, /* grey16 */
+ { 43, 43, 43, 2834 }, /* grey17 */
+ { 46, 46, 46, 2841 }, /* grey18 */
+ { 48, 48, 48, 2848 }, /* grey19 */
+ { 5, 5, 5, 2855 }, /* grey2 */
+ { 51, 51, 51, 2861 }, /* grey20 */
+ { 54, 54, 54, 2868 }, /* grey21 */
+ { 56, 56, 56, 2875 }, /* grey22 */
+ { 59, 59, 59, 2882 }, /* grey23 */
+ { 61, 61, 61, 2889 }, /* grey24 */
+ { 64, 64, 64, 2896 }, /* grey25 */
+ { 66, 66, 66, 2903 }, /* grey26 */
+ { 69, 69, 69, 2910 }, /* grey27 */
+ { 71, 71, 71, 2917 }, /* grey28 */
+ { 74, 74, 74, 2924 }, /* grey29 */
+ { 8, 8, 8, 2931 }, /* grey3 */
+ { 77, 77, 77, 2937 }, /* grey30 */
+ { 79, 79, 79, 2944 }, /* grey31 */
+ { 82, 82, 82, 2951 }, /* grey32 */
+ { 84, 84, 84, 2958 }, /* grey33 */
+ { 87, 87, 87, 2965 }, /* grey34 */
+ { 89, 89, 89, 2972 }, /* grey35 */
+ { 92, 92, 92, 2979 }, /* grey36 */
+ { 94, 94, 94, 2986 }, /* grey37 */
+ { 97, 97, 97, 2993 }, /* grey38 */
+ { 99, 99, 99, 3000 }, /* grey39 */
+ { 10, 10, 10, 3007 }, /* grey4 */
+ { 102, 102, 102, 3013 }, /* grey40 */
+ { 105, 105, 105, 3020 }, /* grey41 */
+ { 107, 107, 107, 3027 }, /* grey42 */
+ { 110, 110, 110, 3034 }, /* grey43 */
+ { 112, 112, 112, 3041 }, /* grey44 */
+ { 115, 115, 115, 3048 }, /* grey45 */
+ { 117, 117, 117, 3055 }, /* grey46 */
+ { 120, 120, 120, 3062 }, /* grey47 */
+ { 122, 122, 122, 3069 }, /* grey48 */
+ { 125, 125, 125, 3076 }, /* grey49 */
+ { 13, 13, 13, 3083 }, /* grey5 */
+ { 127, 127, 127, 3089 }, /* grey50 */
+ { 130, 130, 130, 3096 }, /* grey51 */
+ { 133, 133, 133, 3103 }, /* grey52 */
+ { 135, 135, 135, 3110 }, /* grey53 */
+ { 138, 138, 138, 3117 }, /* grey54 */
+ { 140, 140, 140, 3124 }, /* grey55 */
+ { 143, 143, 143, 3131 }, /* grey56 */
+ { 145, 145, 145, 3138 }, /* grey57 */
+ { 148, 148, 148, 3145 }, /* grey58 */
+ { 150, 150, 150, 3152 }, /* grey59 */
+ { 15, 15, 15, 3159 }, /* grey6 */
+ { 153, 153, 153, 3165 }, /* grey60 */
+ { 156, 156, 156, 3172 }, /* grey61 */
+ { 158, 158, 158, 3179 }, /* grey62 */
+ { 161, 161, 161, 3186 }, /* grey63 */
+ { 163, 163, 163, 3193 }, /* grey64 */
+ { 166, 166, 166, 3200 }, /* grey65 */
+ { 168, 168, 168, 3207 }, /* grey66 */
+ { 171, 171, 171, 3214 }, /* grey67 */
+ { 173, 173, 173, 3221 }, /* grey68 */
+ { 176, 176, 176, 3228 }, /* grey69 */
+ { 18, 18, 18, 3235 }, /* grey7 */
+ { 179, 179, 179, 3241 }, /* grey70 */
+ { 181, 181, 181, 3248 }, /* grey71 */
+ { 184, 184, 184, 3255 }, /* grey72 */
+ { 186, 186, 186, 3262 }, /* grey73 */
+ { 189, 189, 189, 3269 }, /* grey74 */
+ { 191, 191, 191, 3276 }, /* grey75 */
+ { 194, 194, 194, 3283 }, /* grey76 */
+ { 196, 196, 196, 3290 }, /* grey77 */
+ { 199, 199, 199, 3297 }, /* grey78 */
+ { 201, 201, 201, 3304 }, /* grey79 */
+ { 20, 20, 20, 3311 }, /* grey8 */
+ { 204, 204, 204, 3317 }, /* grey80 */
+ { 207, 207, 207, 3324 }, /* grey81 */
+ { 209, 209, 209, 3331 }, /* grey82 */
+ { 212, 212, 212, 3338 }, /* grey83 */
+ { 214, 214, 214, 3345 }, /* grey84 */
+ { 217, 217, 217, 3352 }, /* grey85 */
+ { 219, 219, 219, 3359 }, /* grey86 */
+ { 222, 222, 222, 3366 }, /* grey87 */
+ { 224, 224, 224, 3373 }, /* grey88 */
+ { 227, 227, 227, 3380 }, /* grey89 */
+ { 23, 23, 23, 3387 }, /* grey9 */
+ { 229, 229, 229, 3393 }, /* grey90 */
+ { 232, 232, 232, 3400 }, /* grey91 */
+ { 235, 235, 235, 3407 }, /* grey92 */
+ { 237, 237, 237, 3414 }, /* grey93 */
+ { 240, 240, 240, 3421 }, /* grey94 */
+ { 242, 242, 242, 3428 }, /* grey95 */
+ { 245, 245, 245, 3435 }, /* grey96 */
+ { 247, 247, 247, 3442 }, /* grey97 */
+ { 250, 250, 250, 3449 }, /* grey98 */
+ { 252, 252, 252, 3456 }, /* grey99 */
+ { 240, 255, 240, 3463 }, /* honeydew */
+ { 240, 255, 240, 3472 }, /* honeydew1 */
+ { 224, 238, 224, 3482 }, /* honeydew2 */
+ { 193, 205, 193, 3492 }, /* honeydew3 */
+ { 131, 139, 131, 3502 }, /* honeydew4 */
+ { 255, 105, 180, 3512 }, /* hot pink */
+ { 255, 105, 180, 3521 }, /* HotPink */
+ { 255, 110, 180, 3529 }, /* HotPink1 */
+ { 238, 106, 167, 3538 }, /* HotPink2 */
+ { 205, 96, 144, 3547 }, /* HotPink3 */
+ { 139, 58, 98, 3556 }, /* HotPink4 */
+ { 205, 92, 92, 3565 }, /* indian red */
+ { 205, 92, 92, 3576 }, /* IndianRed */
+ { 255, 106, 106, 3586 }, /* IndianRed1 */
+ { 238, 99, 99, 3597 }, /* IndianRed2 */
+ { 205, 85, 85, 3608 }, /* IndianRed3 */
+ { 139, 58, 58, 3619 }, /* IndianRed4 */
+ { 255, 255, 240, 3630 }, /* ivory */
+ { 255, 255, 240, 3636 }, /* ivory1 */
+ { 238, 238, 224, 3643 }, /* ivory2 */
+ { 205, 205, 193, 3650 }, /* ivory3 */
+ { 139, 139, 131, 3657 }, /* ivory4 */
+ { 240, 230, 140, 3664 }, /* khaki */
+ { 255, 246, 143, 3670 }, /* khaki1 */
+ { 238, 230, 133, 3677 }, /* khaki2 */
+ { 205, 198, 115, 3684 }, /* khaki3 */
+ { 139, 134, 78, 3691 }, /* khaki4 */
+ { 230, 230, 250, 3698 }, /* lavender */
+ { 255, 240, 245, 3707 }, /* lavender blush */
+ { 255, 240, 245, 3722 }, /* LavenderBlush */
+ { 255, 240, 245, 3736 }, /* LavenderBlush1 */
+ { 238, 224, 229, 3751 }, /* LavenderBlush2 */
+ { 205, 193, 197, 3766 }, /* LavenderBlush3 */
+ { 139, 131, 134, 3781 }, /* LavenderBlush4 */
+ { 124, 252, 0, 3796 }, /* lawn green */
+ { 124, 252, 0, 3807 }, /* LawnGreen */
+ { 255, 250, 205, 3817 }, /* lemon chiffon */
+ { 255, 250, 205, 3831 }, /* LemonChiffon */
+ { 255, 250, 205, 3844 }, /* LemonChiffon1 */
+ { 238, 233, 191, 3858 }, /* LemonChiffon2 */
+ { 205, 201, 165, 3872 }, /* LemonChiffon3 */
+ { 139, 137, 112, 3886 }, /* LemonChiffon4 */
+ { 173, 216, 230, 3900 }, /* light blue */
+ { 240, 128, 128, 3911 }, /* light coral */
+ { 224, 255, 255, 3923 }, /* light cyan */
+ { 238, 221, 130, 3934 }, /* light goldenrod */
+ { 250, 250, 210, 3950 }, /* light goldenrod yellow */
+ { 211, 211, 211, 3973 }, /* light gray */
+ { 144, 238, 144, 3984 }, /* light green */
+ { 211, 211, 211, 3996 }, /* light grey */
+ { 255, 182, 193, 4007 }, /* light pink */
+ { 255, 160, 122, 4018 }, /* light salmon */
+ { 32, 178, 170, 4031 }, /* light sea green */
+ { 135, 206, 250, 4047 }, /* light sky blue */
+ { 132, 112, 255, 4062 }, /* light slate blue */
+ { 119, 136, 153, 4079 }, /* light slate gray */
+ { 119, 136, 153, 4096 }, /* light slate grey */
+ { 176, 196, 222, 4113 }, /* light steel blue */
+ { 255, 255, 224, 4130 }, /* light yellow */
+ { 173, 216, 230, 4143 }, /* LightBlue */
+ { 191, 239, 255, 4153 }, /* LightBlue1 */
+ { 178, 223, 238, 4164 }, /* LightBlue2 */
+ { 154, 192, 205, 4175 }, /* LightBlue3 */
+ { 104, 131, 139, 4186 }, /* LightBlue4 */
+ { 240, 128, 128, 4197 }, /* LightCoral */
+ { 224, 255, 255, 4208 }, /* LightCyan */
+ { 224, 255, 255, 4218 }, /* LightCyan1 */
+ { 209, 238, 238, 4229 }, /* LightCyan2 */
+ { 180, 205, 205, 4240 }, /* LightCyan3 */
+ { 122, 139, 139, 4251 }, /* LightCyan4 */
+ { 238, 221, 130, 4262 }, /* LightGoldenrod */
+ { 255, 236, 139, 4277 }, /* LightGoldenrod1 */
+ { 238, 220, 130, 4293 }, /* LightGoldenrod2 */
+ { 205, 190, 112, 4309 }, /* LightGoldenrod3 */
+ { 139, 129, 76, 4325 }, /* LightGoldenrod4 */
+ { 250, 250, 210, 4341 }, /* LightGoldenrodYellow */
+ { 211, 211, 211, 4362 }, /* LightGray */
+ { 144, 238, 144, 4372 }, /* LightGreen */
+ { 211, 211, 211, 4383 }, /* LightGrey */
+ { 255, 182, 193, 4393 }, /* LightPink */
+ { 255, 174, 185, 4403 }, /* LightPink1 */
+ { 238, 162, 173, 4414 }, /* LightPink2 */
+ { 205, 140, 149, 4425 }, /* LightPink3 */
+ { 139, 95, 101, 4436 }, /* LightPink4 */
+ { 255, 160, 122, 4447 }, /* LightSalmon */
+ { 255, 160, 122, 4459 }, /* LightSalmon1 */
+ { 238, 149, 114, 4472 }, /* LightSalmon2 */
+ { 205, 129, 98, 4485 }, /* LightSalmon3 */
+ { 139, 87, 66, 4498 }, /* LightSalmon4 */
+ { 32, 178, 170, 4511 }, /* LightSeaGreen */
+ { 135, 206, 250, 4525 }, /* LightSkyBlue */
+ { 176, 226, 255, 4538 }, /* LightSkyBlue1 */
+ { 164, 211, 238, 4552 }, /* LightSkyBlue2 */
+ { 141, 182, 205, 4566 }, /* LightSkyBlue3 */
+ { 96, 123, 139, 4580 }, /* LightSkyBlue4 */
+ { 132, 112, 255, 4594 }, /* LightSlateBlue */
+ { 119, 136, 153, 4609 }, /* LightSlateGray */
+ { 119, 136, 153, 4624 }, /* LightSlateGrey */
+ { 176, 196, 222, 4639 }, /* LightSteelBlue */
+ { 202, 225, 255, 4654 }, /* LightSteelBlue1 */
+ { 188, 210, 238, 4670 }, /* LightSteelBlue2 */
+ { 162, 181, 205, 4686 }, /* LightSteelBlue3 */
+ { 110, 123, 139, 4702 }, /* LightSteelBlue4 */
+ { 255, 255, 224, 4718 }, /* LightYellow */
+ { 255, 255, 224, 4730 }, /* LightYellow1 */
+ { 238, 238, 209, 4743 }, /* LightYellow2 */
+ { 205, 205, 180, 4756 }, /* LightYellow3 */
+ { 139, 139, 122, 4769 }, /* LightYellow4 */
+ { 50, 205, 50, 4782 }, /* lime green */
+ { 50, 205, 50, 4793 }, /* LimeGreen */
+ { 250, 240, 230, 4803 }, /* linen */
+ { 255, 0, 255, 4809 }, /* magenta */
+ { 255, 0, 255, 4817 }, /* magenta1 */
+ { 238, 0, 238, 4826 }, /* magenta2 */
+ { 205, 0, 205, 4835 }, /* magenta3 */
+ { 139, 0, 139, 4844 }, /* magenta4 */
+ { 176, 48, 96, 4853 }, /* maroon */
+ { 255, 52, 179, 4860 }, /* maroon1 */
+ { 238, 48, 167, 4868 }, /* maroon2 */
+ { 205, 41, 144, 4876 }, /* maroon3 */
+ { 139, 28, 98, 4884 }, /* maroon4 */
+ { 102, 205, 170, 4892 }, /* medium aquamarine */
+ { 0, 0, 205, 4910 }, /* medium blue */
+ { 186, 85, 211, 4922 }, /* medium orchid */
+ { 147, 112, 219, 4936 }, /* medium purple */
+ { 60, 179, 113, 4950 }, /* medium sea green */
+ { 123, 104, 238, 4967 }, /* medium slate blue */
+ { 0, 250, 154, 4985 }, /* medium spring green */
+ { 72, 209, 204, 5005 }, /* medium turquoise */
+ { 199, 21, 133, 5022 }, /* medium violet red */
+ { 102, 205, 170, 5040 }, /* MediumAquamarine */
+ { 0, 0, 205, 5057 }, /* MediumBlue */
+ { 186, 85, 211, 5068 }, /* MediumOrchid */
+ { 224, 102, 255, 5081 }, /* MediumOrchid1 */
+ { 209, 95, 238, 5095 }, /* MediumOrchid2 */
+ { 180, 82, 205, 5109 }, /* MediumOrchid3 */
+ { 122, 55, 139, 5123 }, /* MediumOrchid4 */
+ { 147, 112, 219, 5137 }, /* MediumPurple */
+ { 171, 130, 255, 5150 }, /* MediumPurple1 */
+ { 159, 121, 238, 5164 }, /* MediumPurple2 */
+ { 137, 104, 205, 5178 }, /* MediumPurple3 */
+ { 93, 71, 139, 5192 }, /* MediumPurple4 */
+ { 60, 179, 113, 5206 }, /* MediumSeaGreen */
+ { 123, 104, 238, 5221 }, /* MediumSlateBlue */
+ { 0, 250, 154, 5237 }, /* MediumSpringGreen */
+ { 72, 209, 204, 5255 }, /* MediumTurquoise */
+ { 199, 21, 133, 5271 }, /* MediumVioletRed */
+ { 25, 25, 112, 5287 }, /* midnight blue */
+ { 25, 25, 112, 5301 }, /* MidnightBlue */
+ { 245, 255, 250, 5314 }, /* mint cream */
+ { 245, 255, 250, 5325 }, /* MintCream */
+ { 255, 228, 225, 5335 }, /* misty rose */
+ { 255, 228, 225, 5346 }, /* MistyRose */
+ { 255, 228, 225, 5356 }, /* MistyRose1 */
+ { 238, 213, 210, 5367 }, /* MistyRose2 */
+ { 205, 183, 181, 5378 }, /* MistyRose3 */
+ { 139, 125, 123, 5389 }, /* MistyRose4 */
+ { 255, 228, 181, 5400 }, /* moccasin */
+ { 255, 222, 173, 5409 }, /* navajo white */
+ { 255, 222, 173, 5422 }, /* NavajoWhite */
+ { 255, 222, 173, 5434 }, /* NavajoWhite1 */
+ { 238, 207, 161, 5447 }, /* NavajoWhite2 */
+ { 205, 179, 139, 5460 }, /* NavajoWhite3 */
+ { 139, 121, 94, 5473 }, /* NavajoWhite4 */
+ { 0, 0, 128, 5486 }, /* navy */
+ { 0, 0, 128, 5491 }, /* navy blue */
+ { 0, 0, 128, 5501 }, /* NavyBlue */
+ { 253, 245, 230, 5510 }, /* old lace */
+ { 253, 245, 230, 5519 }, /* OldLace */
+ { 107, 142, 35, 5527 }, /* olive drab */
+ { 107, 142, 35, 5538 }, /* OliveDrab */
+ { 192, 255, 62, 5548 }, /* OliveDrab1 */
+ { 179, 238, 58, 5559 }, /* OliveDrab2 */
+ { 154, 205, 50, 5570 }, /* OliveDrab3 */
+ { 105, 139, 34, 5581 }, /* OliveDrab4 */
+ { 255, 165, 0, 5592 }, /* orange */
+ { 255, 69, 0, 5599 }, /* orange red */
+ { 255, 165, 0, 5610 }, /* orange1 */
+ { 238, 154, 0, 5618 }, /* orange2 */
+ { 205, 133, 0, 5626 }, /* orange3 */
+ { 139, 90, 0, 5634 }, /* orange4 */
+ { 255, 69, 0, 5642 }, /* OrangeRed */
+ { 255, 69, 0, 5652 }, /* OrangeRed1 */
+ { 238, 64, 0, 5663 }, /* OrangeRed2 */
+ { 205, 55, 0, 5674 }, /* OrangeRed3 */
+ { 139, 37, 0, 5685 }, /* OrangeRed4 */
+ { 218, 112, 214, 5696 }, /* orchid */
+ { 255, 131, 250, 5703 }, /* orchid1 */
+ { 238, 122, 233, 5711 }, /* orchid2 */
+ { 205, 105, 201, 5719 }, /* orchid3 */
+ { 139, 71, 137, 5727 }, /* orchid4 */
+ { 238, 232, 170, 5735 }, /* pale goldenrod */
+ { 152, 251, 152, 5750 }, /* pale green */
+ { 175, 238, 238, 5761 }, /* pale turquoise */
+ { 219, 112, 147, 5776 }, /* pale violet red */
+ { 238, 232, 170, 5792 }, /* PaleGoldenrod */
+ { 152, 251, 152, 5806 }, /* PaleGreen */
+ { 154, 255, 154, 5816 }, /* PaleGreen1 */
+ { 144, 238, 144, 5827 }, /* PaleGreen2 */
+ { 124, 205, 124, 5838 }, /* PaleGreen3 */
+ { 84, 139, 84, 5849 }, /* PaleGreen4 */
+ { 175, 238, 238, 5860 }, /* PaleTurquoise */
+ { 187, 255, 255, 5874 }, /* PaleTurquoise1 */
+ { 174, 238, 238, 5889 }, /* PaleTurquoise2 */
+ { 150, 205, 205, 5904 }, /* PaleTurquoise3 */
+ { 102, 139, 139, 5919 }, /* PaleTurquoise4 */
+ { 219, 112, 147, 5934 }, /* PaleVioletRed */
+ { 255, 130, 171, 5948 }, /* PaleVioletRed1 */
+ { 238, 121, 159, 5963 }, /* PaleVioletRed2 */
+ { 205, 104, 137, 5978 }, /* PaleVioletRed3 */
+ { 139, 71, 93, 5993 }, /* PaleVioletRed4 */
+ { 255, 239, 213, 6008 }, /* papaya whip */
+ { 255, 239, 213, 6020 }, /* PapayaWhip */
+ { 255, 218, 185, 6031 }, /* peach puff */
+ { 255, 218, 185, 6042 }, /* PeachPuff */
+ { 255, 218, 185, 6052 }, /* PeachPuff1 */
+ { 238, 203, 173, 6063 }, /* PeachPuff2 */
+ { 205, 175, 149, 6074 }, /* PeachPuff3 */
+ { 139, 119, 101, 6085 }, /* PeachPuff4 */
+ { 205, 133, 63, 6096 }, /* peru */
+ { 255, 192, 203, 6101 }, /* pink */
+ { 255, 181, 197, 6106 }, /* pink1 */
+ { 238, 169, 184, 6112 }, /* pink2 */
+ { 205, 145, 158, 6118 }, /* pink3 */
+ { 139, 99, 108, 6124 }, /* pink4 */
+ { 221, 160, 221, 6130 }, /* plum */
+ { 255, 187, 255, 6135 }, /* plum1 */
+ { 238, 174, 238, 6141 }, /* plum2 */
+ { 205, 150, 205, 6147 }, /* plum3 */
+ { 139, 102, 139, 6153 }, /* plum4 */
+ { 176, 224, 230, 6159 }, /* powder blue */
+ { 176, 224, 230, 6171 }, /* PowderBlue */
+ { 160, 32, 240, 6182 }, /* purple */
+ { 155, 48, 255, 6189 }, /* purple1 */
+ { 145, 44, 238, 6197 }, /* purple2 */
+ { 125, 38, 205, 6205 }, /* purple3 */
+ { 85, 26, 139, 6213 }, /* purple4 */
+ { 255, 0, 0, 6221 }, /* red */
+ { 255, 0, 0, 6225 }, /* red1 */
+ { 238, 0, 0, 6230 }, /* red2 */
+ { 205, 0, 0, 6235 }, /* red3 */
+ { 139, 0, 0, 6240 }, /* red4 */
+ { 188, 143, 143, 6245 }, /* rosy brown */
+ { 188, 143, 143, 6256 }, /* RosyBrown */
+ { 255, 193, 193, 6266 }, /* RosyBrown1 */
+ { 238, 180, 180, 6277 }, /* RosyBrown2 */
+ { 205, 155, 155, 6288 }, /* RosyBrown3 */
+ { 139, 105, 105, 6299 }, /* RosyBrown4 */
+ { 65, 105, 225, 6310 }, /* royal blue */
+ { 65, 105, 225, 6321 }, /* RoyalBlue */
+ { 72, 118, 255, 6331 }, /* RoyalBlue1 */
+ { 67, 110, 238, 6342 }, /* RoyalBlue2 */
+ { 58, 95, 205, 6353 }, /* RoyalBlue3 */
+ { 39, 64, 139, 6364 }, /* RoyalBlue4 */
+ { 139, 69, 19, 6375 }, /* saddle brown */
+ { 139, 69, 19, 6388 }, /* SaddleBrown */
+ { 250, 128, 114, 6400 }, /* salmon */
+ { 255, 140, 105, 6407 }, /* salmon1 */
+ { 238, 130, 98, 6415 }, /* salmon2 */
+ { 205, 112, 84, 6423 }, /* salmon3 */
+ { 139, 76, 57, 6431 }, /* salmon4 */
+ { 244, 164, 96, 6439 }, /* sandy brown */
+ { 244, 164, 96, 6451 }, /* SandyBrown */
+ { 46, 139, 87, 6462 }, /* sea green */
+ { 46, 139, 87, 6472 }, /* SeaGreen */
+ { 84, 255, 159, 6481 }, /* SeaGreen1 */
+ { 78, 238, 148, 6491 }, /* SeaGreen2 */
+ { 67, 205, 128, 6501 }, /* SeaGreen3 */
+ { 46, 139, 87, 6511 }, /* SeaGreen4 */
+ { 255, 245, 238, 6521 }, /* seashell */
+ { 255, 245, 238, 6530 }, /* seashell1 */
+ { 238, 229, 222, 6540 }, /* seashell2 */
+ { 205, 197, 191, 6550 }, /* seashell3 */
+ { 139, 134, 130, 6560 }, /* seashell4 */
+ { 160, 82, 45, 6570 }, /* sienna */
+ { 255, 130, 71, 6577 }, /* sienna1 */
+ { 238, 121, 66, 6585 }, /* sienna2 */
+ { 205, 104, 57, 6593 }, /* sienna3 */
+ { 139, 71, 38, 6601 }, /* sienna4 */
+ { 135, 206, 235, 6609 }, /* sky blue */
+ { 135, 206, 235, 6618 }, /* SkyBlue */
+ { 135, 206, 255, 6626 }, /* SkyBlue1 */
+ { 126, 192, 238, 6635 }, /* SkyBlue2 */
+ { 108, 166, 205, 6644 }, /* SkyBlue3 */
+ { 74, 112, 139, 6653 }, /* SkyBlue4 */
+ { 106, 90, 205, 6662 }, /* slate blue */
+ { 112, 128, 144, 6673 }, /* slate gray */
+ { 112, 128, 144, 6684 }, /* slate grey */
+ { 106, 90, 205, 6695 }, /* SlateBlue */
+ { 131, 111, 255, 6705 }, /* SlateBlue1 */
+ { 122, 103, 238, 6716 }, /* SlateBlue2 */
+ { 105, 89, 205, 6727 }, /* SlateBlue3 */
+ { 71, 60, 139, 6738 }, /* SlateBlue4 */
+ { 112, 128, 144, 6749 }, /* SlateGray */
+ { 198, 226, 255, 6759 }, /* SlateGray1 */
+ { 185, 211, 238, 6770 }, /* SlateGray2 */
+ { 159, 182, 205, 6781 }, /* SlateGray3 */
+ { 108, 123, 139, 6792 }, /* SlateGray4 */
+ { 112, 128, 144, 6803 }, /* SlateGrey */
+ { 255, 250, 250, 6813 }, /* snow */
+ { 255, 250, 250, 6818 }, /* snow1 */
+ { 238, 233, 233, 6824 }, /* snow2 */
+ { 205, 201, 201, 6830 }, /* snow3 */
+ { 139, 137, 137, 6836 }, /* snow4 */
+ { 0, 255, 127, 6842 }, /* spring green */
+ { 0, 255, 127, 6855 }, /* SpringGreen */
+ { 0, 255, 127, 6867 }, /* SpringGreen1 */
+ { 0, 238, 118, 6880 }, /* SpringGreen2 */
+ { 0, 205, 102, 6893 }, /* SpringGreen3 */
+ { 0, 139, 69, 6906 }, /* SpringGreen4 */
+ { 70, 130, 180, 6919 }, /* steel blue */
+ { 70, 130, 180, 6930 }, /* SteelBlue */
+ { 99, 184, 255, 6940 }, /* SteelBlue1 */
+ { 92, 172, 238, 6951 }, /* SteelBlue2 */
+ { 79, 148, 205, 6962 }, /* SteelBlue3 */
+ { 54, 100, 139, 6973 }, /* SteelBlue4 */
+ { 210, 180, 140, 6984 }, /* tan */
+ { 255, 165, 79, 6988 }, /* tan1 */
+ { 238, 154, 73, 6993 }, /* tan2 */
+ { 205, 133, 63, 6998 }, /* tan3 */
+ { 139, 90, 43, 7003 }, /* tan4 */
+ { 216, 191, 216, 7008 }, /* thistle */
+ { 255, 225, 255, 7016 }, /* thistle1 */
+ { 238, 210, 238, 7025 }, /* thistle2 */
+ { 205, 181, 205, 7034 }, /* thistle3 */
+ { 139, 123, 139, 7043 }, /* thistle4 */
+ { 255, 99, 71, 7052 }, /* tomato */
+ { 255, 99, 71, 7059 }, /* tomato1 */
+ { 238, 92, 66, 7067 }, /* tomato2 */
+ { 205, 79, 57, 7075 }, /* tomato3 */
+ { 139, 54, 38, 7083 }, /* tomato4 */
+ { 64, 224, 208, 7091 }, /* turquoise */
+ { 0, 245, 255, 7101 }, /* turquoise1 */
+ { 0, 229, 238, 7112 }, /* turquoise2 */
+ { 0, 197, 205, 7123 }, /* turquoise3 */
+ { 0, 134, 139, 7134 }, /* turquoise4 */
+ { 238, 130, 238, 7145 }, /* violet */
+ { 208, 32, 144, 7152 }, /* violet red */
+ { 208, 32, 144, 7163 }, /* VioletRed */
+ { 255, 62, 150, 7173 }, /* VioletRed1 */
+ { 238, 58, 140, 7184 }, /* VioletRed2 */
+ { 205, 50, 120, 7195 }, /* VioletRed3 */
+ { 139, 34, 82, 7206 }, /* VioletRed4 */
+ { 245, 222, 179, 7217 }, /* wheat */
+ { 255, 231, 186, 7223 }, /* wheat1 */
+ { 238, 216, 174, 7230 }, /* wheat2 */
+ { 205, 186, 150, 7237 }, /* wheat3 */
+ { 139, 126, 102, 7244 }, /* wheat4 */
+ { 255, 255, 255, 7251 }, /* white */
+ { 245, 245, 245, 7257 }, /* white smoke */
+ { 245, 245, 245, 7269 }, /* WhiteSmoke */
+ { 255, 255, 0, 7280 }, /* yellow */
+ { 154, 205, 50, 7287 }, /* yellow green */
+ { 255, 255, 0, 7300 }, /* yellow1 */
+ { 238, 238, 0, 7308 }, /* yellow2 */
+ { 205, 205, 0, 7316 }, /* yellow3 */
+ { 139, 139, 0, 7324 }, /* yellow4 */
+ { 154, 205, 50, 7332 }, /* YellowGreen */
+};
-Bool
-OsInitColors(void)
-{
- return TRUE;
-}
+#define NUM_BUILTIN_COLORS (sizeof (BuiltinColors) / sizeof (BuiltinColors[0]))
Bool
-OsLookupColor(int screen,
- char *s_name,
- unsigned int len,
+OsLookupColor(int screen,
+ char *name,
+ unsigned int len,
unsigned short *pred,
unsigned short *pgreen,
unsigned short *pblue)
{
const BuiltinColor *c;
- unsigned char *name = (unsigned char *) s_name;
int low, mid, high;
int r;
@@ -122,8 +1589,8 @@ OsLookupColor(int screen,
{
mid = (low + high) / 2;
c = &BuiltinColors[mid];
- r = OsStrCaseCmp (&BuiltinColorNames[c->name], name, len);
- if (r == 0)
+ r = strncasecmp (&BuiltinColorNames[c->name], name, len);
+ if (r == 0 && len == strlen (&BuiltinColorNames[c->name]))
{
*pred = c->red * 0x101;
*pgreen = c->green * 0x101;
@@ -131,9 +1598,9 @@ OsLookupColor(int screen,
return TRUE;
}
if (r < 0)
- high = mid - 1;
- else
low = mid + 1;
+ else
+ high = mid - 1;
}
return FALSE;
}
diff --git a/xorg-server/os/oscolor.h b/xorg-server/os/oscolor.h
deleted file mode 100644
index 3d0a76222..000000000
--- a/xorg-server/os/oscolor.h
+++ /dev/null
@@ -1,1508 +0,0 @@
-static const unsigned char BuiltinColorNames[] = {
- "alice blue\0"
- "AliceBlue\0"
- "antique white\0"
- "AntiqueWhite\0"
- "AntiqueWhite1\0"
- "AntiqueWhite2\0"
- "AntiqueWhite3\0"
- "AntiqueWhite4\0"
- "aquamarine\0"
- "aquamarine1\0"
- "aquamarine2\0"
- "aquamarine3\0"
- "aquamarine4\0"
- "azure\0"
- "azure1\0"
- "azure2\0"
- "azure3\0"
- "azure4\0"
- "beige\0"
- "bisque\0"
- "bisque1\0"
- "bisque2\0"
- "bisque3\0"
- "bisque4\0"
- "black\0"
- "blanched almond\0"
- "BlanchedAlmond\0"
- "blue\0"
- "blue violet\0"
- "blue1\0"
- "blue2\0"
- "blue3\0"
- "blue4\0"
- "BlueViolet\0"
- "brown\0"
- "brown1\0"
- "brown2\0"
- "brown3\0"
- "brown4\0"
- "burlywood\0"
- "burlywood1\0"
- "burlywood2\0"
- "burlywood3\0"
- "burlywood4\0"
- "cadet blue\0"
- "CadetBlue\0"
- "CadetBlue1\0"
- "CadetBlue2\0"
- "CadetBlue3\0"
- "CadetBlue4\0"
- "chartreuse\0"
- "chartreuse1\0"
- "chartreuse2\0"
- "chartreuse3\0"
- "chartreuse4\0"
- "chocolate\0"
- "chocolate1\0"
- "chocolate2\0"
- "chocolate3\0"
- "chocolate4\0"
- "coral\0"
- "coral1\0"
- "coral2\0"
- "coral3\0"
- "coral4\0"
- "cornflower blue\0"
- "CornflowerBlue\0"
- "cornsilk\0"
- "cornsilk1\0"
- "cornsilk2\0"
- "cornsilk3\0"
- "cornsilk4\0"
- "cyan\0"
- "cyan1\0"
- "cyan2\0"
- "cyan3\0"
- "cyan4\0"
- "dark blue\0"
- "dark cyan\0"
- "dark goldenrod\0"
- "dark gray\0"
- "dark green\0"
- "dark grey\0"
- "dark khaki\0"
- "dark magenta\0"
- "dark olive green\0"
- "dark orange\0"
- "dark orchid\0"
- "dark red\0"
- "dark salmon\0"
- "dark sea green\0"
- "dark slate blue\0"
- "dark slate gray\0"
- "dark slate grey\0"
- "dark turquoise\0"
- "dark violet\0"
- "DarkBlue\0"
- "DarkCyan\0"
- "DarkGoldenrod\0"
- "DarkGoldenrod1\0"
- "DarkGoldenrod2\0"
- "DarkGoldenrod3\0"
- "DarkGoldenrod4\0"
- "DarkGray\0"
- "DarkGreen\0"
- "DarkGrey\0"
- "DarkKhaki\0"
- "DarkMagenta\0"
- "DarkOliveGreen\0"
- "DarkOliveGreen1\0"
- "DarkOliveGreen2\0"
- "DarkOliveGreen3\0"
- "DarkOliveGreen4\0"
- "DarkOrange\0"
- "DarkOrange1\0"
- "DarkOrange2\0"
- "DarkOrange3\0"
- "DarkOrange4\0"
- "DarkOrchid\0"
- "DarkOrchid1\0"
- "DarkOrchid2\0"
- "DarkOrchid3\0"
- "DarkOrchid4\0"
- "DarkRed\0"
- "DarkSalmon\0"
- "DarkSeaGreen\0"
- "DarkSeaGreen1\0"
- "DarkSeaGreen2\0"
- "DarkSeaGreen3\0"
- "DarkSeaGreen4\0"
- "DarkSlateBlue\0"
- "DarkSlateGray\0"
- "DarkSlateGray1\0"
- "DarkSlateGray2\0"
- "DarkSlateGray3\0"
- "DarkSlateGray4\0"
- "DarkSlateGrey\0"
- "DarkTurquoise\0"
- "DarkViolet\0"
- "deep pink\0"
- "deep sky blue\0"
- "DeepPink\0"
- "DeepPink1\0"
- "DeepPink2\0"
- "DeepPink3\0"
- "DeepPink4\0"
- "DeepSkyBlue\0"
- "DeepSkyBlue1\0"
- "DeepSkyBlue2\0"
- "DeepSkyBlue3\0"
- "DeepSkyBlue4\0"
- "dim gray\0"
- "dim grey\0"
- "DimGray\0"
- "DimGrey\0"
- "dodger blue\0"
- "DodgerBlue\0"
- "DodgerBlue1\0"
- "DodgerBlue2\0"
- "DodgerBlue3\0"
- "DodgerBlue4\0"
- "firebrick\0"
- "firebrick1\0"
- "firebrick2\0"
- "firebrick3\0"
- "firebrick4\0"
- "floral white\0"
- "FloralWhite\0"
- "forest green\0"
- "ForestGreen\0"
- "gainsboro\0"
- "ghost white\0"
- "GhostWhite\0"
- "gold\0"
- "gold1\0"
- "gold2\0"
- "gold3\0"
- "gold4\0"
- "goldenrod\0"
- "goldenrod1\0"
- "goldenrod2\0"
- "goldenrod3\0"
- "goldenrod4\0"
- "gray\0"
- "gray0\0"
- "gray1\0"
- "gray10\0"
- "gray100\0"
- "gray11\0"
- "gray12\0"
- "gray13\0"
- "gray14\0"
- "gray15\0"
- "gray16\0"
- "gray17\0"
- "gray18\0"
- "gray19\0"
- "gray2\0"
- "gray20\0"
- "gray21\0"
- "gray22\0"
- "gray23\0"
- "gray24\0"
- "gray25\0"
- "gray26\0"
- "gray27\0"
- "gray28\0"
- "gray29\0"
- "gray3\0"
- "gray30\0"
- "gray31\0"
- "gray32\0"
- "gray33\0"
- "gray34\0"
- "gray35\0"
- "gray36\0"
- "gray37\0"
- "gray38\0"
- "gray39\0"
- "gray4\0"
- "gray40\0"
- "gray41\0"
- "gray42\0"
- "gray43\0"
- "gray44\0"
- "gray45\0"
- "gray46\0"
- "gray47\0"
- "gray48\0"
- "gray49\0"
- "gray5\0"
- "gray50\0"
- "gray51\0"
- "gray52\0"
- "gray53\0"
- "gray54\0"
- "gray55\0"
- "gray56\0"
- "gray57\0"
- "gray58\0"
- "gray59\0"
- "gray6\0"
- "gray60\0"
- "gray61\0"
- "gray62\0"
- "gray63\0"
- "gray64\0"
- "gray65\0"
- "gray66\0"
- "gray67\0"
- "gray68\0"
- "gray69\0"
- "gray7\0"
- "gray70\0"
- "gray71\0"
- "gray72\0"
- "gray73\0"
- "gray74\0"
- "gray75\0"
- "gray76\0"
- "gray77\0"
- "gray78\0"
- "gray79\0"
- "gray8\0"
- "gray80\0"
- "gray81\0"
- "gray82\0"
- "gray83\0"
- "gray84\0"
- "gray85\0"
- "gray86\0"
- "gray87\0"
- "gray88\0"
- "gray89\0"
- "gray9\0"
- "gray90\0"
- "gray91\0"
- "gray92\0"
- "gray93\0"
- "gray94\0"
- "gray95\0"
- "gray96\0"
- "gray97\0"
- "gray98\0"
- "gray99\0"
- "green\0"
- "green yellow\0"
- "green1\0"
- "green2\0"
- "green3\0"
- "green4\0"
- "GreenYellow\0"
- "grey\0"
- "grey0\0"
- "grey1\0"
- "grey10\0"
- "grey100\0"
- "grey11\0"
- "grey12\0"
- "grey13\0"
- "grey14\0"
- "grey15\0"
- "grey16\0"
- "grey17\0"
- "grey18\0"
- "grey19\0"
- "grey2\0"
- "grey20\0"
- "grey21\0"
- "grey22\0"
- "grey23\0"
- "grey24\0"
- "grey25\0"
- "grey26\0"
- "grey27\0"
- "grey28\0"
- "grey29\0"
- "grey3\0"
- "grey30\0"
- "grey31\0"
- "grey32\0"
- "grey33\0"
- "grey34\0"
- "grey35\0"
- "grey36\0"
- "grey37\0"
- "grey38\0"
- "grey39\0"
- "grey4\0"
- "grey40\0"
- "grey41\0"
- "grey42\0"
- "grey43\0"
- "grey44\0"
- "grey45\0"
- "grey46\0"
- "grey47\0"
- "grey48\0"
- "grey49\0"
- "grey5\0"
- "grey50\0"
- "grey51\0"
- "grey52\0"
- "grey53\0"
- "grey54\0"
- "grey55\0"
- "grey56\0"
- "grey57\0"
- "grey58\0"
- "grey59\0"
- "grey6\0"
- "grey60\0"
- "grey61\0"
- "grey62\0"
- "grey63\0"
- "grey64\0"
- "grey65\0"
- "grey66\0"
- "grey67\0"
- "grey68\0"
- "grey69\0"
- "grey7\0"
- "grey70\0"
- "grey71\0"
- "grey72\0"
- "grey73\0"
- "grey74\0"
- "grey75\0"
- "grey76\0"
- "grey77\0"
- "grey78\0"
- "grey79\0"
- "grey8\0"
- "grey80\0"
- "grey81\0"
- "grey82\0"
- "grey83\0"
- "grey84\0"
- "grey85\0"
- "grey86\0"
- "grey87\0"
- "grey88\0"
- "grey89\0"
- "grey9\0"
- "grey90\0"
- "grey91\0"
- "grey92\0"
- "grey93\0"
- "grey94\0"
- "grey95\0"
- "grey96\0"
- "grey97\0"
- "grey98\0"
- "grey99\0"
- "honeydew\0"
- "honeydew1\0"
- "honeydew2\0"
- "honeydew3\0"
- "honeydew4\0"
- "hot pink\0"
- "HotPink\0"
- "HotPink1\0"
- "HotPink2\0"
- "HotPink3\0"
- "HotPink4\0"
- "indian red\0"
- "IndianRed\0"
- "IndianRed1\0"
- "IndianRed2\0"
- "IndianRed3\0"
- "IndianRed4\0"
- "ivory\0"
- "ivory1\0"
- "ivory2\0"
- "ivory3\0"
- "ivory4\0"
- "khaki\0"
- "khaki1\0"
- "khaki2\0"
- "khaki3\0"
- "khaki4\0"
- "lavender\0"
- "lavender blush\0"
- "LavenderBlush\0"
- "LavenderBlush1\0"
- "LavenderBlush2\0"
- "LavenderBlush3\0"
- "LavenderBlush4\0"
- "lawn green\0"
- "LawnGreen\0"
- "lemon chiffon\0"
- "LemonChiffon\0"
- "LemonChiffon1\0"
- "LemonChiffon2\0"
- "LemonChiffon3\0"
- "LemonChiffon4\0"
- "light blue\0"
- "light coral\0"
- "light cyan\0"
- "light goldenrod\0"
- "light goldenrod yellow\0"
- "light gray\0"
- "light green\0"
- "light grey\0"
- "light pink\0"
- "light salmon\0"
- "light sea green\0"
- "light sky blue\0"
- "light slate blue\0"
- "light slate gray\0"
- "light slate grey\0"
- "light steel blue\0"
- "light yellow\0"
- "LightBlue\0"
- "LightBlue1\0"
- "LightBlue2\0"
- "LightBlue3\0"
- "LightBlue4\0"
- "LightCoral\0"
- "LightCyan\0"
- "LightCyan1\0"
- "LightCyan2\0"
- "LightCyan3\0"
- "LightCyan4\0"
- "LightGoldenrod\0"
- "LightGoldenrod1\0"
- "LightGoldenrod2\0"
- "LightGoldenrod3\0"
- "LightGoldenrod4\0"
- "LightGoldenrodYellow\0"
- "LightGray\0"
- "LightGreen\0"
- "LightGrey\0"
- "LightPink\0"
- "LightPink1\0"
- "LightPink2\0"
- "LightPink3\0"
- "LightPink4\0"
- "LightSalmon\0"
- "LightSalmon1\0"
- "LightSalmon2\0"
- "LightSalmon3\0"
- "LightSalmon4\0"
- "LightSeaGreen\0"
- "LightSkyBlue\0"
- "LightSkyBlue1\0"
- "LightSkyBlue2\0"
- "LightSkyBlue3\0"
- "LightSkyBlue4\0"
- "LightSlateBlue\0"
- "LightSlateGray\0"
- "LightSlateGrey\0"
- "LightSteelBlue\0"
- "LightSteelBlue1\0"
- "LightSteelBlue2\0"
- "LightSteelBlue3\0"
- "LightSteelBlue4\0"
- "LightYellow\0"
- "LightYellow1\0"
- "LightYellow2\0"
- "LightYellow3\0"
- "LightYellow4\0"
- "lime green\0"
- "LimeGreen\0"
- "linen\0"
- "magenta\0"
- "magenta1\0"
- "magenta2\0"
- "magenta3\0"
- "magenta4\0"
- "maroon\0"
- "maroon1\0"
- "maroon2\0"
- "maroon3\0"
- "maroon4\0"
- "medium aquamarine\0"
- "medium blue\0"
- "medium orchid\0"
- "medium purple\0"
- "medium sea green\0"
- "medium slate blue\0"
- "medium spring green\0"
- "medium turquoise\0"
- "medium violet red\0"
- "MediumAquamarine\0"
- "MediumBlue\0"
- "MediumOrchid\0"
- "MediumOrchid1\0"
- "MediumOrchid2\0"
- "MediumOrchid3\0"
- "MediumOrchid4\0"
- "MediumPurple\0"
- "MediumPurple1\0"
- "MediumPurple2\0"
- "MediumPurple3\0"
- "MediumPurple4\0"
- "MediumSeaGreen\0"
- "MediumSlateBlue\0"
- "MediumSpringGreen\0"
- "MediumTurquoise\0"
- "MediumVioletRed\0"
- "midnight blue\0"
- "MidnightBlue\0"
- "mint cream\0"
- "MintCream\0"
- "misty rose\0"
- "MistyRose\0"
- "MistyRose1\0"
- "MistyRose2\0"
- "MistyRose3\0"
- "MistyRose4\0"
- "moccasin\0"
- "navajo white\0"
- "NavajoWhite\0"
- "NavajoWhite1\0"
- "NavajoWhite2\0"
- "NavajoWhite3\0"
- "NavajoWhite4\0"
- "navy\0"
- "navy blue\0"
- "NavyBlue\0"
- "old lace\0"
- "OldLace\0"
- "olive drab\0"
- "OliveDrab\0"
- "OliveDrab1\0"
- "OliveDrab2\0"
- "OliveDrab3\0"
- "OliveDrab4\0"
- "orange\0"
- "orange red\0"
- "orange1\0"
- "orange2\0"
- "orange3\0"
- "orange4\0"
- "OrangeRed\0"
- "OrangeRed1\0"
- "OrangeRed2\0"
- "OrangeRed3\0"
- "OrangeRed4\0"
- "orchid\0"
- "orchid1\0"
- "orchid2\0"
- "orchid3\0"
- "orchid4\0"
- "pale goldenrod\0"
- "pale green\0"
- "pale turquoise\0"
- "pale violet red\0"
- "PaleGoldenrod\0"
- "PaleGreen\0"
- "PaleGreen1\0"
- "PaleGreen2\0"
- "PaleGreen3\0"
- "PaleGreen4\0"
- "PaleTurquoise\0"
- "PaleTurquoise1\0"
- "PaleTurquoise2\0"
- "PaleTurquoise3\0"
- "PaleTurquoise4\0"
- "PaleVioletRed\0"
- "PaleVioletRed1\0"
- "PaleVioletRed2\0"
- "PaleVioletRed3\0"
- "PaleVioletRed4\0"
- "papaya whip\0"
- "PapayaWhip\0"
- "peach puff\0"
- "PeachPuff\0"
- "PeachPuff1\0"
- "PeachPuff2\0"
- "PeachPuff3\0"
- "PeachPuff4\0"
- "peru\0"
- "pink\0"
- "pink1\0"
- "pink2\0"
- "pink3\0"
- "pink4\0"
- "plum\0"
- "plum1\0"
- "plum2\0"
- "plum3\0"
- "plum4\0"
- "powder blue\0"
- "PowderBlue\0"
- "purple\0"
- "purple1\0"
- "purple2\0"
- "purple3\0"
- "purple4\0"
- "red\0"
- "red1\0"
- "red2\0"
- "red3\0"
- "red4\0"
- "rosy brown\0"
- "RosyBrown\0"
- "RosyBrown1\0"
- "RosyBrown2\0"
- "RosyBrown3\0"
- "RosyBrown4\0"
- "royal blue\0"
- "RoyalBlue\0"
- "RoyalBlue1\0"
- "RoyalBlue2\0"
- "RoyalBlue3\0"
- "RoyalBlue4\0"
- "saddle brown\0"
- "SaddleBrown\0"
- "salmon\0"
- "salmon1\0"
- "salmon2\0"
- "salmon3\0"
- "salmon4\0"
- "sandy brown\0"
- "SandyBrown\0"
- "sea green\0"
- "SeaGreen\0"
- "SeaGreen1\0"
- "SeaGreen2\0"
- "SeaGreen3\0"
- "SeaGreen4\0"
- "seashell\0"
- "seashell1\0"
- "seashell2\0"
- "seashell3\0"
- "seashell4\0"
- "sienna\0"
- "sienna1\0"
- "sienna2\0"
- "sienna3\0"
- "sienna4\0"
- "sky blue\0"
- "SkyBlue\0"
- "SkyBlue1\0"
- "SkyBlue2\0"
- "SkyBlue3\0"
- "SkyBlue4\0"
- "slate blue\0"
- "slate gray\0"
- "slate grey\0"
- "SlateBlue\0"
- "SlateBlue1\0"
- "SlateBlue2\0"
- "SlateBlue3\0"
- "SlateBlue4\0"
- "SlateGray\0"
- "SlateGray1\0"
- "SlateGray2\0"
- "SlateGray3\0"
- "SlateGray4\0"
- "SlateGrey\0"
- "snow\0"
- "snow1\0"
- "snow2\0"
- "snow3\0"
- "snow4\0"
- "spring green\0"
- "SpringGreen\0"
- "SpringGreen1\0"
- "SpringGreen2\0"
- "SpringGreen3\0"
- "SpringGreen4\0"
- "steel blue\0"
- "SteelBlue\0"
- "SteelBlue1\0"
- "SteelBlue2\0"
- "SteelBlue3\0"
- "SteelBlue4\0"
- "tan\0"
- "tan1\0"
- "tan2\0"
- "tan3\0"
- "tan4\0"
- "thistle\0"
- "thistle1\0"
- "thistle2\0"
- "thistle3\0"
- "thistle4\0"
- "tomato\0"
- "tomato1\0"
- "tomato2\0"
- "tomato3\0"
- "tomato4\0"
- "turquoise\0"
- "turquoise1\0"
- "turquoise2\0"
- "turquoise3\0"
- "turquoise4\0"
- "violet\0"
- "violet red\0"
- "VioletRed\0"
- "VioletRed1\0"
- "VioletRed2\0"
- "VioletRed3\0"
- "VioletRed4\0"
- "wheat\0"
- "wheat1\0"
- "wheat2\0"
- "wheat3\0"
- "wheat4\0"
- "white\0"
- "white smoke\0"
- "WhiteSmoke\0"
- "yellow\0"
- "yellow green\0"
- "yellow1\0"
- "yellow2\0"
- "yellow3\0"
- "yellow4\0"
- "YellowGreen\0"
-};
-static const BuiltinColor BuiltinColors[] = {
- { 240, 248, 255, 0 }, /* alice blue */
- { 240, 248, 255, 11 }, /* AliceBlue */
- { 250, 235, 215, 21 }, /* antique white */
- { 250, 235, 215, 35 }, /* AntiqueWhite */
- { 255, 239, 219, 48 }, /* AntiqueWhite1 */
- { 238, 223, 204, 62 }, /* AntiqueWhite2 */
- { 205, 192, 176, 76 }, /* AntiqueWhite3 */
- { 139, 131, 120, 90 }, /* AntiqueWhite4 */
- { 127, 255, 212, 104 }, /* aquamarine */
- { 127, 255, 212, 115 }, /* aquamarine1 */
- { 118, 238, 198, 127 }, /* aquamarine2 */
- { 102, 205, 170, 139 }, /* aquamarine3 */
- { 69, 139, 116, 151 }, /* aquamarine4 */
- { 240, 255, 255, 163 }, /* azure */
- { 240, 255, 255, 169 }, /* azure1 */
- { 224, 238, 238, 176 }, /* azure2 */
- { 193, 205, 205, 183 }, /* azure3 */
- { 131, 139, 139, 190 }, /* azure4 */
- { 245, 245, 220, 197 }, /* beige */
- { 255, 228, 196, 203 }, /* bisque */
- { 255, 228, 196, 210 }, /* bisque1 */
- { 238, 213, 183, 218 }, /* bisque2 */
- { 205, 183, 158, 226 }, /* bisque3 */
- { 139, 125, 107, 234 }, /* bisque4 */
- { 0, 0, 0, 242 }, /* black */
- { 255, 235, 205, 248 }, /* blanched almond */
- { 255, 235, 205, 264 }, /* BlanchedAlmond */
- { 0, 0, 255, 279 }, /* blue */
- { 138, 43, 226, 284 }, /* blue violet */
- { 0, 0, 255, 296 }, /* blue1 */
- { 0, 0, 238, 302 }, /* blue2 */
- { 0, 0, 205, 308 }, /* blue3 */
- { 0, 0, 139, 314 }, /* blue4 */
- { 138, 43, 226, 320 }, /* BlueViolet */
- { 165, 42, 42, 331 }, /* brown */
- { 255, 64, 64, 337 }, /* brown1 */
- { 238, 59, 59, 344 }, /* brown2 */
- { 205, 51, 51, 351 }, /* brown3 */
- { 139, 35, 35, 358 }, /* brown4 */
- { 222, 184, 135, 365 }, /* burlywood */
- { 255, 211, 155, 375 }, /* burlywood1 */
- { 238, 197, 145, 386 }, /* burlywood2 */
- { 205, 170, 125, 397 }, /* burlywood3 */
- { 139, 115, 85, 408 }, /* burlywood4 */
- { 95, 158, 160, 419 }, /* cadet blue */
- { 95, 158, 160, 430 }, /* CadetBlue */
- { 152, 245, 255, 440 }, /* CadetBlue1 */
- { 142, 229, 238, 451 }, /* CadetBlue2 */
- { 122, 197, 205, 462 }, /* CadetBlue3 */
- { 83, 134, 139, 473 }, /* CadetBlue4 */
- { 127, 255, 0, 484 }, /* chartreuse */
- { 127, 255, 0, 495 }, /* chartreuse1 */
- { 118, 238, 0, 507 }, /* chartreuse2 */
- { 102, 205, 0, 519 }, /* chartreuse3 */
- { 69, 139, 0, 531 }, /* chartreuse4 */
- { 210, 105, 30, 543 }, /* chocolate */
- { 255, 127, 36, 553 }, /* chocolate1 */
- { 238, 118, 33, 564 }, /* chocolate2 */
- { 205, 102, 29, 575 }, /* chocolate3 */
- { 139, 69, 19, 586 }, /* chocolate4 */
- { 255, 127, 80, 597 }, /* coral */
- { 255, 114, 86, 603 }, /* coral1 */
- { 238, 106, 80, 610 }, /* coral2 */
- { 205, 91, 69, 617 }, /* coral3 */
- { 139, 62, 47, 624 }, /* coral4 */
- { 100, 149, 237, 631 }, /* cornflower blue */
- { 100, 149, 237, 647 }, /* CornflowerBlue */
- { 255, 248, 220, 662 }, /* cornsilk */
- { 255, 248, 220, 671 }, /* cornsilk1 */
- { 238, 232, 205, 681 }, /* cornsilk2 */
- { 205, 200, 177, 691 }, /* cornsilk3 */
- { 139, 136, 120, 701 }, /* cornsilk4 */
- { 0, 255, 255, 711 }, /* cyan */
- { 0, 255, 255, 716 }, /* cyan1 */
- { 0, 238, 238, 722 }, /* cyan2 */
- { 0, 205, 205, 728 }, /* cyan3 */
- { 0, 139, 139, 734 }, /* cyan4 */
- { 0, 0, 139, 740 }, /* dark blue */
- { 0, 139, 139, 750 }, /* dark cyan */
- { 184, 134, 11, 760 }, /* dark goldenrod */
- { 169, 169, 169, 775 }, /* dark gray */
- { 0, 100, 0, 785 }, /* dark green */
- { 169, 169, 169, 796 }, /* dark grey */
- { 189, 183, 107, 806 }, /* dark khaki */
- { 139, 0, 139, 817 }, /* dark magenta */
- { 85, 107, 47, 830 }, /* dark olive green */
- { 255, 140, 0, 847 }, /* dark orange */
- { 153, 50, 204, 859 }, /* dark orchid */
- { 139, 0, 0, 871 }, /* dark red */
- { 233, 150, 122, 880 }, /* dark salmon */
- { 143, 188, 143, 892 }, /* dark sea green */
- { 72, 61, 139, 907 }, /* dark slate blue */
- { 47, 79, 79, 923 }, /* dark slate gray */
- { 47, 79, 79, 939 }, /* dark slate grey */
- { 0, 206, 209, 955 }, /* dark turquoise */
- { 148, 0, 211, 970 }, /* dark violet */
- { 0, 0, 139, 982 }, /* DarkBlue */
- { 0, 139, 139, 991 }, /* DarkCyan */
- { 184, 134, 11, 1000 }, /* DarkGoldenrod */
- { 255, 185, 15, 1014 }, /* DarkGoldenrod1 */
- { 238, 173, 14, 1029 }, /* DarkGoldenrod2 */
- { 205, 149, 12, 1044 }, /* DarkGoldenrod3 */
- { 139, 101, 8, 1059 }, /* DarkGoldenrod4 */
- { 169, 169, 169, 1074 }, /* DarkGray */
- { 0, 100, 0, 1083 }, /* DarkGreen */
- { 169, 169, 169, 1093 }, /* DarkGrey */
- { 189, 183, 107, 1102 }, /* DarkKhaki */
- { 139, 0, 139, 1112 }, /* DarkMagenta */
- { 85, 107, 47, 1124 }, /* DarkOliveGreen */
- { 202, 255, 112, 1139 }, /* DarkOliveGreen1 */
- { 188, 238, 104, 1155 }, /* DarkOliveGreen2 */
- { 162, 205, 90, 1171 }, /* DarkOliveGreen3 */
- { 110, 139, 61, 1187 }, /* DarkOliveGreen4 */
- { 255, 140, 0, 1203 }, /* DarkOrange */
- { 255, 127, 0, 1214 }, /* DarkOrange1 */
- { 238, 118, 0, 1226 }, /* DarkOrange2 */
- { 205, 102, 0, 1238 }, /* DarkOrange3 */
- { 139, 69, 0, 1250 }, /* DarkOrange4 */
- { 153, 50, 204, 1262 }, /* DarkOrchid */
- { 191, 62, 255, 1273 }, /* DarkOrchid1 */
- { 178, 58, 238, 1285 }, /* DarkOrchid2 */
- { 154, 50, 205, 1297 }, /* DarkOrchid3 */
- { 104, 34, 139, 1309 }, /* DarkOrchid4 */
- { 139, 0, 0, 1321 }, /* DarkRed */
- { 233, 150, 122, 1329 }, /* DarkSalmon */
- { 143, 188, 143, 1340 }, /* DarkSeaGreen */
- { 193, 255, 193, 1353 }, /* DarkSeaGreen1 */
- { 180, 238, 180, 1367 }, /* DarkSeaGreen2 */
- { 155, 205, 155, 1381 }, /* DarkSeaGreen3 */
- { 105, 139, 105, 1395 }, /* DarkSeaGreen4 */
- { 72, 61, 139, 1409 }, /* DarkSlateBlue */
- { 47, 79, 79, 1423 }, /* DarkSlateGray */
- { 151, 255, 255, 1437 }, /* DarkSlateGray1 */
- { 141, 238, 238, 1452 }, /* DarkSlateGray2 */
- { 121, 205, 205, 1467 }, /* DarkSlateGray3 */
- { 82, 139, 139, 1482 }, /* DarkSlateGray4 */
- { 47, 79, 79, 1497 }, /* DarkSlateGrey */
- { 0, 206, 209, 1511 }, /* DarkTurquoise */
- { 148, 0, 211, 1525 }, /* DarkViolet */
- { 255, 20, 147, 1536 }, /* deep pink */
- { 0, 191, 255, 1546 }, /* deep sky blue */
- { 255, 20, 147, 1560 }, /* DeepPink */
- { 255, 20, 147, 1569 }, /* DeepPink1 */
- { 238, 18, 137, 1579 }, /* DeepPink2 */
- { 205, 16, 118, 1589 }, /* DeepPink3 */
- { 139, 10, 80, 1599 }, /* DeepPink4 */
- { 0, 191, 255, 1609 }, /* DeepSkyBlue */
- { 0, 191, 255, 1621 }, /* DeepSkyBlue1 */
- { 0, 178, 238, 1634 }, /* DeepSkyBlue2 */
- { 0, 154, 205, 1647 }, /* DeepSkyBlue3 */
- { 0, 104, 139, 1660 }, /* DeepSkyBlue4 */
- { 105, 105, 105, 1673 }, /* dim gray */
- { 105, 105, 105, 1682 }, /* dim grey */
- { 105, 105, 105, 1691 }, /* DimGray */
- { 105, 105, 105, 1699 }, /* DimGrey */
- { 30, 144, 255, 1707 }, /* dodger blue */
- { 30, 144, 255, 1719 }, /* DodgerBlue */
- { 30, 144, 255, 1730 }, /* DodgerBlue1 */
- { 28, 134, 238, 1742 }, /* DodgerBlue2 */
- { 24, 116, 205, 1754 }, /* DodgerBlue3 */
- { 16, 78, 139, 1766 }, /* DodgerBlue4 */
- { 178, 34, 34, 1778 }, /* firebrick */
- { 255, 48, 48, 1788 }, /* firebrick1 */
- { 238, 44, 44, 1799 }, /* firebrick2 */
- { 205, 38, 38, 1810 }, /* firebrick3 */
- { 139, 26, 26, 1821 }, /* firebrick4 */
- { 255, 250, 240, 1832 }, /* floral white */
- { 255, 250, 240, 1845 }, /* FloralWhite */
- { 34, 139, 34, 1857 }, /* forest green */
- { 34, 139, 34, 1870 }, /* ForestGreen */
- { 220, 220, 220, 1882 }, /* gainsboro */
- { 248, 248, 255, 1892 }, /* ghost white */
- { 248, 248, 255, 1904 }, /* GhostWhite */
- { 255, 215, 0, 1915 }, /* gold */
- { 255, 215, 0, 1920 }, /* gold1 */
- { 238, 201, 0, 1926 }, /* gold2 */
- { 205, 173, 0, 1932 }, /* gold3 */
- { 139, 117, 0, 1938 }, /* gold4 */
- { 218, 165, 32, 1944 }, /* goldenrod */
- { 255, 193, 37, 1954 }, /* goldenrod1 */
- { 238, 180, 34, 1965 }, /* goldenrod2 */
- { 205, 155, 29, 1976 }, /* goldenrod3 */
- { 139, 105, 20, 1987 }, /* goldenrod4 */
- { 190, 190, 190, 1998 }, /* gray */
- { 0, 0, 0, 2003 }, /* gray0 */
- { 3, 3, 3, 2009 }, /* gray1 */
- { 26, 26, 26, 2015 }, /* gray10 */
- { 255, 255, 255, 2022 }, /* gray100 */
- { 28, 28, 28, 2030 }, /* gray11 */
- { 31, 31, 31, 2037 }, /* gray12 */
- { 33, 33, 33, 2044 }, /* gray13 */
- { 36, 36, 36, 2051 }, /* gray14 */
- { 38, 38, 38, 2058 }, /* gray15 */
- { 41, 41, 41, 2065 }, /* gray16 */
- { 43, 43, 43, 2072 }, /* gray17 */
- { 46, 46, 46, 2079 }, /* gray18 */
- { 48, 48, 48, 2086 }, /* gray19 */
- { 5, 5, 5, 2093 }, /* gray2 */
- { 51, 51, 51, 2099 }, /* gray20 */
- { 54, 54, 54, 2106 }, /* gray21 */
- { 56, 56, 56, 2113 }, /* gray22 */
- { 59, 59, 59, 2120 }, /* gray23 */
- { 61, 61, 61, 2127 }, /* gray24 */
- { 64, 64, 64, 2134 }, /* gray25 */
- { 66, 66, 66, 2141 }, /* gray26 */
- { 69, 69, 69, 2148 }, /* gray27 */
- { 71, 71, 71, 2155 }, /* gray28 */
- { 74, 74, 74, 2162 }, /* gray29 */
- { 8, 8, 8, 2169 }, /* gray3 */
- { 77, 77, 77, 2175 }, /* gray30 */
- { 79, 79, 79, 2182 }, /* gray31 */
- { 82, 82, 82, 2189 }, /* gray32 */
- { 84, 84, 84, 2196 }, /* gray33 */
- { 87, 87, 87, 2203 }, /* gray34 */
- { 89, 89, 89, 2210 }, /* gray35 */
- { 92, 92, 92, 2217 }, /* gray36 */
- { 94, 94, 94, 2224 }, /* gray37 */
- { 97, 97, 97, 2231 }, /* gray38 */
- { 99, 99, 99, 2238 }, /* gray39 */
- { 10, 10, 10, 2245 }, /* gray4 */
- { 102, 102, 102, 2251 }, /* gray40 */
- { 105, 105, 105, 2258 }, /* gray41 */
- { 107, 107, 107, 2265 }, /* gray42 */
- { 110, 110, 110, 2272 }, /* gray43 */
- { 112, 112, 112, 2279 }, /* gray44 */
- { 115, 115, 115, 2286 }, /* gray45 */
- { 117, 117, 117, 2293 }, /* gray46 */
- { 120, 120, 120, 2300 }, /* gray47 */
- { 122, 122, 122, 2307 }, /* gray48 */
- { 125, 125, 125, 2314 }, /* gray49 */
- { 13, 13, 13, 2321 }, /* gray5 */
- { 127, 127, 127, 2327 }, /* gray50 */
- { 130, 130, 130, 2334 }, /* gray51 */
- { 133, 133, 133, 2341 }, /* gray52 */
- { 135, 135, 135, 2348 }, /* gray53 */
- { 138, 138, 138, 2355 }, /* gray54 */
- { 140, 140, 140, 2362 }, /* gray55 */
- { 143, 143, 143, 2369 }, /* gray56 */
- { 145, 145, 145, 2376 }, /* gray57 */
- { 148, 148, 148, 2383 }, /* gray58 */
- { 150, 150, 150, 2390 }, /* gray59 */
- { 15, 15, 15, 2397 }, /* gray6 */
- { 153, 153, 153, 2403 }, /* gray60 */
- { 156, 156, 156, 2410 }, /* gray61 */
- { 158, 158, 158, 2417 }, /* gray62 */
- { 161, 161, 161, 2424 }, /* gray63 */
- { 163, 163, 163, 2431 }, /* gray64 */
- { 166, 166, 166, 2438 }, /* gray65 */
- { 168, 168, 168, 2445 }, /* gray66 */
- { 171, 171, 171, 2452 }, /* gray67 */
- { 173, 173, 173, 2459 }, /* gray68 */
- { 176, 176, 176, 2466 }, /* gray69 */
- { 18, 18, 18, 2473 }, /* gray7 */
- { 179, 179, 179, 2479 }, /* gray70 */
- { 181, 181, 181, 2486 }, /* gray71 */
- { 184, 184, 184, 2493 }, /* gray72 */
- { 186, 186, 186, 2500 }, /* gray73 */
- { 189, 189, 189, 2507 }, /* gray74 */
- { 191, 191, 191, 2514 }, /* gray75 */
- { 194, 194, 194, 2521 }, /* gray76 */
- { 196, 196, 196, 2528 }, /* gray77 */
- { 199, 199, 199, 2535 }, /* gray78 */
- { 201, 201, 201, 2542 }, /* gray79 */
- { 20, 20, 20, 2549 }, /* gray8 */
- { 204, 204, 204, 2555 }, /* gray80 */
- { 207, 207, 207, 2562 }, /* gray81 */
- { 209, 209, 209, 2569 }, /* gray82 */
- { 212, 212, 212, 2576 }, /* gray83 */
- { 214, 214, 214, 2583 }, /* gray84 */
- { 217, 217, 217, 2590 }, /* gray85 */
- { 219, 219, 219, 2597 }, /* gray86 */
- { 222, 222, 222, 2604 }, /* gray87 */
- { 224, 224, 224, 2611 }, /* gray88 */
- { 227, 227, 227, 2618 }, /* gray89 */
- { 23, 23, 23, 2625 }, /* gray9 */
- { 229, 229, 229, 2631 }, /* gray90 */
- { 232, 232, 232, 2638 }, /* gray91 */
- { 235, 235, 235, 2645 }, /* gray92 */
- { 237, 237, 237, 2652 }, /* gray93 */
- { 240, 240, 240, 2659 }, /* gray94 */
- { 242, 242, 242, 2666 }, /* gray95 */
- { 245, 245, 245, 2673 }, /* gray96 */
- { 247, 247, 247, 2680 }, /* gray97 */
- { 250, 250, 250, 2687 }, /* gray98 */
- { 252, 252, 252, 2694 }, /* gray99 */
- { 0, 255, 0, 2701 }, /* green */
- { 173, 255, 47, 2707 }, /* green yellow */
- { 0, 255, 0, 2720 }, /* green1 */
- { 0, 238, 0, 2727 }, /* green2 */
- { 0, 205, 0, 2734 }, /* green3 */
- { 0, 139, 0, 2741 }, /* green4 */
- { 173, 255, 47, 2748 }, /* GreenYellow */
- { 190, 190, 190, 2760 }, /* grey */
- { 0, 0, 0, 2765 }, /* grey0 */
- { 3, 3, 3, 2771 }, /* grey1 */
- { 26, 26, 26, 2777 }, /* grey10 */
- { 255, 255, 255, 2784 }, /* grey100 */
- { 28, 28, 28, 2792 }, /* grey11 */
- { 31, 31, 31, 2799 }, /* grey12 */
- { 33, 33, 33, 2806 }, /* grey13 */
- { 36, 36, 36, 2813 }, /* grey14 */
- { 38, 38, 38, 2820 }, /* grey15 */
- { 41, 41, 41, 2827 }, /* grey16 */
- { 43, 43, 43, 2834 }, /* grey17 */
- { 46, 46, 46, 2841 }, /* grey18 */
- { 48, 48, 48, 2848 }, /* grey19 */
- { 5, 5, 5, 2855 }, /* grey2 */
- { 51, 51, 51, 2861 }, /* grey20 */
- { 54, 54, 54, 2868 }, /* grey21 */
- { 56, 56, 56, 2875 }, /* grey22 */
- { 59, 59, 59, 2882 }, /* grey23 */
- { 61, 61, 61, 2889 }, /* grey24 */
- { 64, 64, 64, 2896 }, /* grey25 */
- { 66, 66, 66, 2903 }, /* grey26 */
- { 69, 69, 69, 2910 }, /* grey27 */
- { 71, 71, 71, 2917 }, /* grey28 */
- { 74, 74, 74, 2924 }, /* grey29 */
- { 8, 8, 8, 2931 }, /* grey3 */
- { 77, 77, 77, 2937 }, /* grey30 */
- { 79, 79, 79, 2944 }, /* grey31 */
- { 82, 82, 82, 2951 }, /* grey32 */
- { 84, 84, 84, 2958 }, /* grey33 */
- { 87, 87, 87, 2965 }, /* grey34 */
- { 89, 89, 89, 2972 }, /* grey35 */
- { 92, 92, 92, 2979 }, /* grey36 */
- { 94, 94, 94, 2986 }, /* grey37 */
- { 97, 97, 97, 2993 }, /* grey38 */
- { 99, 99, 99, 3000 }, /* grey39 */
- { 10, 10, 10, 3007 }, /* grey4 */
- { 102, 102, 102, 3013 }, /* grey40 */
- { 105, 105, 105, 3020 }, /* grey41 */
- { 107, 107, 107, 3027 }, /* grey42 */
- { 110, 110, 110, 3034 }, /* grey43 */
- { 112, 112, 112, 3041 }, /* grey44 */
- { 115, 115, 115, 3048 }, /* grey45 */
- { 117, 117, 117, 3055 }, /* grey46 */
- { 120, 120, 120, 3062 }, /* grey47 */
- { 122, 122, 122, 3069 }, /* grey48 */
- { 125, 125, 125, 3076 }, /* grey49 */
- { 13, 13, 13, 3083 }, /* grey5 */
- { 127, 127, 127, 3089 }, /* grey50 */
- { 130, 130, 130, 3096 }, /* grey51 */
- { 133, 133, 133, 3103 }, /* grey52 */
- { 135, 135, 135, 3110 }, /* grey53 */
- { 138, 138, 138, 3117 }, /* grey54 */
- { 140, 140, 140, 3124 }, /* grey55 */
- { 143, 143, 143, 3131 }, /* grey56 */
- { 145, 145, 145, 3138 }, /* grey57 */
- { 148, 148, 148, 3145 }, /* grey58 */
- { 150, 150, 150, 3152 }, /* grey59 */
- { 15, 15, 15, 3159 }, /* grey6 */
- { 153, 153, 153, 3165 }, /* grey60 */
- { 156, 156, 156, 3172 }, /* grey61 */
- { 158, 158, 158, 3179 }, /* grey62 */
- { 161, 161, 161, 3186 }, /* grey63 */
- { 163, 163, 163, 3193 }, /* grey64 */
- { 166, 166, 166, 3200 }, /* grey65 */
- { 168, 168, 168, 3207 }, /* grey66 */
- { 171, 171, 171, 3214 }, /* grey67 */
- { 173, 173, 173, 3221 }, /* grey68 */
- { 176, 176, 176, 3228 }, /* grey69 */
- { 18, 18, 18, 3235 }, /* grey7 */
- { 179, 179, 179, 3241 }, /* grey70 */
- { 181, 181, 181, 3248 }, /* grey71 */
- { 184, 184, 184, 3255 }, /* grey72 */
- { 186, 186, 186, 3262 }, /* grey73 */
- { 189, 189, 189, 3269 }, /* grey74 */
- { 191, 191, 191, 3276 }, /* grey75 */
- { 194, 194, 194, 3283 }, /* grey76 */
- { 196, 196, 196, 3290 }, /* grey77 */
- { 199, 199, 199, 3297 }, /* grey78 */
- { 201, 201, 201, 3304 }, /* grey79 */
- { 20, 20, 20, 3311 }, /* grey8 */
- { 204, 204, 204, 3317 }, /* grey80 */
- { 207, 207, 207, 3324 }, /* grey81 */
- { 209, 209, 209, 3331 }, /* grey82 */
- { 212, 212, 212, 3338 }, /* grey83 */
- { 214, 214, 214, 3345 }, /* grey84 */
- { 217, 217, 217, 3352 }, /* grey85 */
- { 219, 219, 219, 3359 }, /* grey86 */
- { 222, 222, 222, 3366 }, /* grey87 */
- { 224, 224, 224, 3373 }, /* grey88 */
- { 227, 227, 227, 3380 }, /* grey89 */
- { 23, 23, 23, 3387 }, /* grey9 */
- { 229, 229, 229, 3393 }, /* grey90 */
- { 232, 232, 232, 3400 }, /* grey91 */
- { 235, 235, 235, 3407 }, /* grey92 */
- { 237, 237, 237, 3414 }, /* grey93 */
- { 240, 240, 240, 3421 }, /* grey94 */
- { 242, 242, 242, 3428 }, /* grey95 */
- { 245, 245, 245, 3435 }, /* grey96 */
- { 247, 247, 247, 3442 }, /* grey97 */
- { 250, 250, 250, 3449 }, /* grey98 */
- { 252, 252, 252, 3456 }, /* grey99 */
- { 240, 255, 240, 3463 }, /* honeydew */
- { 240, 255, 240, 3472 }, /* honeydew1 */
- { 224, 238, 224, 3482 }, /* honeydew2 */
- { 193, 205, 193, 3492 }, /* honeydew3 */
- { 131, 139, 131, 3502 }, /* honeydew4 */
- { 255, 105, 180, 3512 }, /* hot pink */
- { 255, 105, 180, 3521 }, /* HotPink */
- { 255, 110, 180, 3529 }, /* HotPink1 */
- { 238, 106, 167, 3538 }, /* HotPink2 */
- { 205, 96, 144, 3547 }, /* HotPink3 */
- { 139, 58, 98, 3556 }, /* HotPink4 */
- { 205, 92, 92, 3565 }, /* indian red */
- { 205, 92, 92, 3576 }, /* IndianRed */
- { 255, 106, 106, 3586 }, /* IndianRed1 */
- { 238, 99, 99, 3597 }, /* IndianRed2 */
- { 205, 85, 85, 3608 }, /* IndianRed3 */
- { 139, 58, 58, 3619 }, /* IndianRed4 */
- { 255, 255, 240, 3630 }, /* ivory */
- { 255, 255, 240, 3636 }, /* ivory1 */
- { 238, 238, 224, 3643 }, /* ivory2 */
- { 205, 205, 193, 3650 }, /* ivory3 */
- { 139, 139, 131, 3657 }, /* ivory4 */
- { 240, 230, 140, 3664 }, /* khaki */
- { 255, 246, 143, 3670 }, /* khaki1 */
- { 238, 230, 133, 3677 }, /* khaki2 */
- { 205, 198, 115, 3684 }, /* khaki3 */
- { 139, 134, 78, 3691 }, /* khaki4 */
- { 230, 230, 250, 3698 }, /* lavender */
- { 255, 240, 245, 3707 }, /* lavender blush */
- { 255, 240, 245, 3722 }, /* LavenderBlush */
- { 255, 240, 245, 3736 }, /* LavenderBlush1 */
- { 238, 224, 229, 3751 }, /* LavenderBlush2 */
- { 205, 193, 197, 3766 }, /* LavenderBlush3 */
- { 139, 131, 134, 3781 }, /* LavenderBlush4 */
- { 124, 252, 0, 3796 }, /* lawn green */
- { 124, 252, 0, 3807 }, /* LawnGreen */
- { 255, 250, 205, 3817 }, /* lemon chiffon */
- { 255, 250, 205, 3831 }, /* LemonChiffon */
- { 255, 250, 205, 3844 }, /* LemonChiffon1 */
- { 238, 233, 191, 3858 }, /* LemonChiffon2 */
- { 205, 201, 165, 3872 }, /* LemonChiffon3 */
- { 139, 137, 112, 3886 }, /* LemonChiffon4 */
- { 173, 216, 230, 3900 }, /* light blue */
- { 240, 128, 128, 3911 }, /* light coral */
- { 224, 255, 255, 3923 }, /* light cyan */
- { 238, 221, 130, 3934 }, /* light goldenrod */
- { 250, 250, 210, 3950 }, /* light goldenrod yellow */
- { 211, 211, 211, 3973 }, /* light gray */
- { 144, 238, 144, 3984 }, /* light green */
- { 211, 211, 211, 3996 }, /* light grey */
- { 255, 182, 193, 4007 }, /* light pink */
- { 255, 160, 122, 4018 }, /* light salmon */
- { 32, 178, 170, 4031 }, /* light sea green */
- { 135, 206, 250, 4047 }, /* light sky blue */
- { 132, 112, 255, 4062 }, /* light slate blue */
- { 119, 136, 153, 4079 }, /* light slate gray */
- { 119, 136, 153, 4096 }, /* light slate grey */
- { 176, 196, 222, 4113 }, /* light steel blue */
- { 255, 255, 224, 4130 }, /* light yellow */
- { 173, 216, 230, 4143 }, /* LightBlue */
- { 191, 239, 255, 4153 }, /* LightBlue1 */
- { 178, 223, 238, 4164 }, /* LightBlue2 */
- { 154, 192, 205, 4175 }, /* LightBlue3 */
- { 104, 131, 139, 4186 }, /* LightBlue4 */
- { 240, 128, 128, 4197 }, /* LightCoral */
- { 224, 255, 255, 4208 }, /* LightCyan */
- { 224, 255, 255, 4218 }, /* LightCyan1 */
- { 209, 238, 238, 4229 }, /* LightCyan2 */
- { 180, 205, 205, 4240 }, /* LightCyan3 */
- { 122, 139, 139, 4251 }, /* LightCyan4 */
- { 238, 221, 130, 4262 }, /* LightGoldenrod */
- { 255, 236, 139, 4277 }, /* LightGoldenrod1 */
- { 238, 220, 130, 4293 }, /* LightGoldenrod2 */
- { 205, 190, 112, 4309 }, /* LightGoldenrod3 */
- { 139, 129, 76, 4325 }, /* LightGoldenrod4 */
- { 250, 250, 210, 4341 }, /* LightGoldenrodYellow */
- { 211, 211, 211, 4362 }, /* LightGray */
- { 144, 238, 144, 4372 }, /* LightGreen */
- { 211, 211, 211, 4383 }, /* LightGrey */
- { 255, 182, 193, 4393 }, /* LightPink */
- { 255, 174, 185, 4403 }, /* LightPink1 */
- { 238, 162, 173, 4414 }, /* LightPink2 */
- { 205, 140, 149, 4425 }, /* LightPink3 */
- { 139, 95, 101, 4436 }, /* LightPink4 */
- { 255, 160, 122, 4447 }, /* LightSalmon */
- { 255, 160, 122, 4459 }, /* LightSalmon1 */
- { 238, 149, 114, 4472 }, /* LightSalmon2 */
- { 205, 129, 98, 4485 }, /* LightSalmon3 */
- { 139, 87, 66, 4498 }, /* LightSalmon4 */
- { 32, 178, 170, 4511 }, /* LightSeaGreen */
- { 135, 206, 250, 4525 }, /* LightSkyBlue */
- { 176, 226, 255, 4538 }, /* LightSkyBlue1 */
- { 164, 211, 238, 4552 }, /* LightSkyBlue2 */
- { 141, 182, 205, 4566 }, /* LightSkyBlue3 */
- { 96, 123, 139, 4580 }, /* LightSkyBlue4 */
- { 132, 112, 255, 4594 }, /* LightSlateBlue */
- { 119, 136, 153, 4609 }, /* LightSlateGray */
- { 119, 136, 153, 4624 }, /* LightSlateGrey */
- { 176, 196, 222, 4639 }, /* LightSteelBlue */
- { 202, 225, 255, 4654 }, /* LightSteelBlue1 */
- { 188, 210, 238, 4670 }, /* LightSteelBlue2 */
- { 162, 181, 205, 4686 }, /* LightSteelBlue3 */
- { 110, 123, 139, 4702 }, /* LightSteelBlue4 */
- { 255, 255, 224, 4718 }, /* LightYellow */
- { 255, 255, 224, 4730 }, /* LightYellow1 */
- { 238, 238, 209, 4743 }, /* LightYellow2 */
- { 205, 205, 180, 4756 }, /* LightYellow3 */
- { 139, 139, 122, 4769 }, /* LightYellow4 */
- { 50, 205, 50, 4782 }, /* lime green */
- { 50, 205, 50, 4793 }, /* LimeGreen */
- { 250, 240, 230, 4803 }, /* linen */
- { 255, 0, 255, 4809 }, /* magenta */
- { 255, 0, 255, 4817 }, /* magenta1 */
- { 238, 0, 238, 4826 }, /* magenta2 */
- { 205, 0, 205, 4835 }, /* magenta3 */
- { 139, 0, 139, 4844 }, /* magenta4 */
- { 176, 48, 96, 4853 }, /* maroon */
- { 255, 52, 179, 4860 }, /* maroon1 */
- { 238, 48, 167, 4868 }, /* maroon2 */
- { 205, 41, 144, 4876 }, /* maroon3 */
- { 139, 28, 98, 4884 }, /* maroon4 */
- { 102, 205, 170, 4892 }, /* medium aquamarine */
- { 0, 0, 205, 4910 }, /* medium blue */
- { 186, 85, 211, 4922 }, /* medium orchid */
- { 147, 112, 219, 4936 }, /* medium purple */
- { 60, 179, 113, 4950 }, /* medium sea green */
- { 123, 104, 238, 4967 }, /* medium slate blue */
- { 0, 250, 154, 4985 }, /* medium spring green */
- { 72, 209, 204, 5005 }, /* medium turquoise */
- { 199, 21, 133, 5022 }, /* medium violet red */
- { 102, 205, 170, 5040 }, /* MediumAquamarine */
- { 0, 0, 205, 5057 }, /* MediumBlue */
- { 186, 85, 211, 5068 }, /* MediumOrchid */
- { 224, 102, 255, 5081 }, /* MediumOrchid1 */
- { 209, 95, 238, 5095 }, /* MediumOrchid2 */
- { 180, 82, 205, 5109 }, /* MediumOrchid3 */
- { 122, 55, 139, 5123 }, /* MediumOrchid4 */
- { 147, 112, 219, 5137 }, /* MediumPurple */
- { 171, 130, 255, 5150 }, /* MediumPurple1 */
- { 159, 121, 238, 5164 }, /* MediumPurple2 */
- { 137, 104, 205, 5178 }, /* MediumPurple3 */
- { 93, 71, 139, 5192 }, /* MediumPurple4 */
- { 60, 179, 113, 5206 }, /* MediumSeaGreen */
- { 123, 104, 238, 5221 }, /* MediumSlateBlue */
- { 0, 250, 154, 5237 }, /* MediumSpringGreen */
- { 72, 209, 204, 5255 }, /* MediumTurquoise */
- { 199, 21, 133, 5271 }, /* MediumVioletRed */
- { 25, 25, 112, 5287 }, /* midnight blue */
- { 25, 25, 112, 5301 }, /* MidnightBlue */
- { 245, 255, 250, 5314 }, /* mint cream */
- { 245, 255, 250, 5325 }, /* MintCream */
- { 255, 228, 225, 5335 }, /* misty rose */
- { 255, 228, 225, 5346 }, /* MistyRose */
- { 255, 228, 225, 5356 }, /* MistyRose1 */
- { 238, 213, 210, 5367 }, /* MistyRose2 */
- { 205, 183, 181, 5378 }, /* MistyRose3 */
- { 139, 125, 123, 5389 }, /* MistyRose4 */
- { 255, 228, 181, 5400 }, /* moccasin */
- { 255, 222, 173, 5409 }, /* navajo white */
- { 255, 222, 173, 5422 }, /* NavajoWhite */
- { 255, 222, 173, 5434 }, /* NavajoWhite1 */
- { 238, 207, 161, 5447 }, /* NavajoWhite2 */
- { 205, 179, 139, 5460 }, /* NavajoWhite3 */
- { 139, 121, 94, 5473 }, /* NavajoWhite4 */
- { 0, 0, 128, 5486 }, /* navy */
- { 0, 0, 128, 5491 }, /* navy blue */
- { 0, 0, 128, 5501 }, /* NavyBlue */
- { 253, 245, 230, 5510 }, /* old lace */
- { 253, 245, 230, 5519 }, /* OldLace */
- { 107, 142, 35, 5527 }, /* olive drab */
- { 107, 142, 35, 5538 }, /* OliveDrab */
- { 192, 255, 62, 5548 }, /* OliveDrab1 */
- { 179, 238, 58, 5559 }, /* OliveDrab2 */
- { 154, 205, 50, 5570 }, /* OliveDrab3 */
- { 105, 139, 34, 5581 }, /* OliveDrab4 */
- { 255, 165, 0, 5592 }, /* orange */
- { 255, 69, 0, 5599 }, /* orange red */
- { 255, 165, 0, 5610 }, /* orange1 */
- { 238, 154, 0, 5618 }, /* orange2 */
- { 205, 133, 0, 5626 }, /* orange3 */
- { 139, 90, 0, 5634 }, /* orange4 */
- { 255, 69, 0, 5642 }, /* OrangeRed */
- { 255, 69, 0, 5652 }, /* OrangeRed1 */
- { 238, 64, 0, 5663 }, /* OrangeRed2 */
- { 205, 55, 0, 5674 }, /* OrangeRed3 */
- { 139, 37, 0, 5685 }, /* OrangeRed4 */
- { 218, 112, 214, 5696 }, /* orchid */
- { 255, 131, 250, 5703 }, /* orchid1 */
- { 238, 122, 233, 5711 }, /* orchid2 */
- { 205, 105, 201, 5719 }, /* orchid3 */
- { 139, 71, 137, 5727 }, /* orchid4 */
- { 238, 232, 170, 5735 }, /* pale goldenrod */
- { 152, 251, 152, 5750 }, /* pale green */
- { 175, 238, 238, 5761 }, /* pale turquoise */
- { 219, 112, 147, 5776 }, /* pale violet red */
- { 238, 232, 170, 5792 }, /* PaleGoldenrod */
- { 152, 251, 152, 5806 }, /* PaleGreen */
- { 154, 255, 154, 5816 }, /* PaleGreen1 */
- { 144, 238, 144, 5827 }, /* PaleGreen2 */
- { 124, 205, 124, 5838 }, /* PaleGreen3 */
- { 84, 139, 84, 5849 }, /* PaleGreen4 */
- { 175, 238, 238, 5860 }, /* PaleTurquoise */
- { 187, 255, 255, 5874 }, /* PaleTurquoise1 */
- { 174, 238, 238, 5889 }, /* PaleTurquoise2 */
- { 150, 205, 205, 5904 }, /* PaleTurquoise3 */
- { 102, 139, 139, 5919 }, /* PaleTurquoise4 */
- { 219, 112, 147, 5934 }, /* PaleVioletRed */
- { 255, 130, 171, 5948 }, /* PaleVioletRed1 */
- { 238, 121, 159, 5963 }, /* PaleVioletRed2 */
- { 205, 104, 137, 5978 }, /* PaleVioletRed3 */
- { 139, 71, 93, 5993 }, /* PaleVioletRed4 */
- { 255, 239, 213, 6008 }, /* papaya whip */
- { 255, 239, 213, 6020 }, /* PapayaWhip */
- { 255, 218, 185, 6031 }, /* peach puff */
- { 255, 218, 185, 6042 }, /* PeachPuff */
- { 255, 218, 185, 6052 }, /* PeachPuff1 */
- { 238, 203, 173, 6063 }, /* PeachPuff2 */
- { 205, 175, 149, 6074 }, /* PeachPuff3 */
- { 139, 119, 101, 6085 }, /* PeachPuff4 */
- { 205, 133, 63, 6096 }, /* peru */
- { 255, 192, 203, 6101 }, /* pink */
- { 255, 181, 197, 6106 }, /* pink1 */
- { 238, 169, 184, 6112 }, /* pink2 */
- { 205, 145, 158, 6118 }, /* pink3 */
- { 139, 99, 108, 6124 }, /* pink4 */
- { 221, 160, 221, 6130 }, /* plum */
- { 255, 187, 255, 6135 }, /* plum1 */
- { 238, 174, 238, 6141 }, /* plum2 */
- { 205, 150, 205, 6147 }, /* plum3 */
- { 139, 102, 139, 6153 }, /* plum4 */
- { 176, 224, 230, 6159 }, /* powder blue */
- { 176, 224, 230, 6171 }, /* PowderBlue */
- { 160, 32, 240, 6182 }, /* purple */
- { 155, 48, 255, 6189 }, /* purple1 */
- { 145, 44, 238, 6197 }, /* purple2 */
- { 125, 38, 205, 6205 }, /* purple3 */
- { 85, 26, 139, 6213 }, /* purple4 */
- { 255, 0, 0, 6221 }, /* red */
- { 255, 0, 0, 6225 }, /* red1 */
- { 238, 0, 0, 6230 }, /* red2 */
- { 205, 0, 0, 6235 }, /* red3 */
- { 139, 0, 0, 6240 }, /* red4 */
- { 188, 143, 143, 6245 }, /* rosy brown */
- { 188, 143, 143, 6256 }, /* RosyBrown */
- { 255, 193, 193, 6266 }, /* RosyBrown1 */
- { 238, 180, 180, 6277 }, /* RosyBrown2 */
- { 205, 155, 155, 6288 }, /* RosyBrown3 */
- { 139, 105, 105, 6299 }, /* RosyBrown4 */
- { 65, 105, 225, 6310 }, /* royal blue */
- { 65, 105, 225, 6321 }, /* RoyalBlue */
- { 72, 118, 255, 6331 }, /* RoyalBlue1 */
- { 67, 110, 238, 6342 }, /* RoyalBlue2 */
- { 58, 95, 205, 6353 }, /* RoyalBlue3 */
- { 39, 64, 139, 6364 }, /* RoyalBlue4 */
- { 139, 69, 19, 6375 }, /* saddle brown */
- { 139, 69, 19, 6388 }, /* SaddleBrown */
- { 250, 128, 114, 6400 }, /* salmon */
- { 255, 140, 105, 6407 }, /* salmon1 */
- { 238, 130, 98, 6415 }, /* salmon2 */
- { 205, 112, 84, 6423 }, /* salmon3 */
- { 139, 76, 57, 6431 }, /* salmon4 */
- { 244, 164, 96, 6439 }, /* sandy brown */
- { 244, 164, 96, 6451 }, /* SandyBrown */
- { 46, 139, 87, 6462 }, /* sea green */
- { 46, 139, 87, 6472 }, /* SeaGreen */
- { 84, 255, 159, 6481 }, /* SeaGreen1 */
- { 78, 238, 148, 6491 }, /* SeaGreen2 */
- { 67, 205, 128, 6501 }, /* SeaGreen3 */
- { 46, 139, 87, 6511 }, /* SeaGreen4 */
- { 255, 245, 238, 6521 }, /* seashell */
- { 255, 245, 238, 6530 }, /* seashell1 */
- { 238, 229, 222, 6540 }, /* seashell2 */
- { 205, 197, 191, 6550 }, /* seashell3 */
- { 139, 134, 130, 6560 }, /* seashell4 */
- { 160, 82, 45, 6570 }, /* sienna */
- { 255, 130, 71, 6577 }, /* sienna1 */
- { 238, 121, 66, 6585 }, /* sienna2 */
- { 205, 104, 57, 6593 }, /* sienna3 */
- { 139, 71, 38, 6601 }, /* sienna4 */
- { 135, 206, 235, 6609 }, /* sky blue */
- { 135, 206, 235, 6618 }, /* SkyBlue */
- { 135, 206, 255, 6626 }, /* SkyBlue1 */
- { 126, 192, 238, 6635 }, /* SkyBlue2 */
- { 108, 166, 205, 6644 }, /* SkyBlue3 */
- { 74, 112, 139, 6653 }, /* SkyBlue4 */
- { 106, 90, 205, 6662 }, /* slate blue */
- { 112, 128, 144, 6673 }, /* slate gray */
- { 112, 128, 144, 6684 }, /* slate grey */
- { 106, 90, 205, 6695 }, /* SlateBlue */
- { 131, 111, 255, 6705 }, /* SlateBlue1 */
- { 122, 103, 238, 6716 }, /* SlateBlue2 */
- { 105, 89, 205, 6727 }, /* SlateBlue3 */
- { 71, 60, 139, 6738 }, /* SlateBlue4 */
- { 112, 128, 144, 6749 }, /* SlateGray */
- { 198, 226, 255, 6759 }, /* SlateGray1 */
- { 185, 211, 238, 6770 }, /* SlateGray2 */
- { 159, 182, 205, 6781 }, /* SlateGray3 */
- { 108, 123, 139, 6792 }, /* SlateGray4 */
- { 112, 128, 144, 6803 }, /* SlateGrey */
- { 255, 250, 250, 6813 }, /* snow */
- { 255, 250, 250, 6818 }, /* snow1 */
- { 238, 233, 233, 6824 }, /* snow2 */
- { 205, 201, 201, 6830 }, /* snow3 */
- { 139, 137, 137, 6836 }, /* snow4 */
- { 0, 255, 127, 6842 }, /* spring green */
- { 0, 255, 127, 6855 }, /* SpringGreen */
- { 0, 255, 127, 6867 }, /* SpringGreen1 */
- { 0, 238, 118, 6880 }, /* SpringGreen2 */
- { 0, 205, 102, 6893 }, /* SpringGreen3 */
- { 0, 139, 69, 6906 }, /* SpringGreen4 */
- { 70, 130, 180, 6919 }, /* steel blue */
- { 70, 130, 180, 6930 }, /* SteelBlue */
- { 99, 184, 255, 6940 }, /* SteelBlue1 */
- { 92, 172, 238, 6951 }, /* SteelBlue2 */
- { 79, 148, 205, 6962 }, /* SteelBlue3 */
- { 54, 100, 139, 6973 }, /* SteelBlue4 */
- { 210, 180, 140, 6984 }, /* tan */
- { 255, 165, 79, 6988 }, /* tan1 */
- { 238, 154, 73, 6993 }, /* tan2 */
- { 205, 133, 63, 6998 }, /* tan3 */
- { 139, 90, 43, 7003 }, /* tan4 */
- { 216, 191, 216, 7008 }, /* thistle */
- { 255, 225, 255, 7016 }, /* thistle1 */
- { 238, 210, 238, 7025 }, /* thistle2 */
- { 205, 181, 205, 7034 }, /* thistle3 */
- { 139, 123, 139, 7043 }, /* thistle4 */
- { 255, 99, 71, 7052 }, /* tomato */
- { 255, 99, 71, 7059 }, /* tomato1 */
- { 238, 92, 66, 7067 }, /* tomato2 */
- { 205, 79, 57, 7075 }, /* tomato3 */
- { 139, 54, 38, 7083 }, /* tomato4 */
- { 64, 224, 208, 7091 }, /* turquoise */
- { 0, 245, 255, 7101 }, /* turquoise1 */
- { 0, 229, 238, 7112 }, /* turquoise2 */
- { 0, 197, 205, 7123 }, /* turquoise3 */
- { 0, 134, 139, 7134 }, /* turquoise4 */
- { 238, 130, 238, 7145 }, /* violet */
- { 208, 32, 144, 7152 }, /* violet red */
- { 208, 32, 144, 7163 }, /* VioletRed */
- { 255, 62, 150, 7173 }, /* VioletRed1 */
- { 238, 58, 140, 7184 }, /* VioletRed2 */
- { 205, 50, 120, 7195 }, /* VioletRed3 */
- { 139, 34, 82, 7206 }, /* VioletRed4 */
- { 245, 222, 179, 7217 }, /* wheat */
- { 255, 231, 186, 7223 }, /* wheat1 */
- { 238, 216, 174, 7230 }, /* wheat2 */
- { 205, 186, 150, 7237 }, /* wheat3 */
- { 139, 126, 102, 7244 }, /* wheat4 */
- { 255, 255, 255, 7251 }, /* white */
- { 245, 245, 245, 7257 }, /* white smoke */
- { 245, 245, 245, 7269 }, /* WhiteSmoke */
- { 255, 255, 0, 7280 }, /* yellow */
- { 154, 205, 50, 7287 }, /* yellow green */
- { 255, 255, 0, 7300 }, /* yellow1 */
- { 238, 238, 0, 7308 }, /* yellow2 */
- { 205, 205, 0, 7316 }, /* yellow3 */
- { 139, 139, 0, 7324 }, /* yellow4 */
- { 154, 205, 50, 7332 }, /* YellowGreen */
-};
diff --git a/xorg-server/os/osdep.h b/xorg-server/os/osdep.h
index b6894c146..e719f9a70 100644
--- a/xorg-server/os/osdep.h
+++ b/xorg-server/os/osdep.h
@@ -58,8 +58,6 @@ SOFTWARE.
#include <X11/Xdmcp.h>
-#ifndef sgi /* SGI defines OPEN_MAX in a useless way */
-#ifndef X_NOT_POSIX
#ifdef _POSIX_SOURCE
#include <limits.h>
#else
@@ -67,18 +65,7 @@ SOFTWARE.
#include <limits.h>
#undef _POSIX_SOURCE
#endif
-#else /* X_NOT_POSIX */
-#ifdef WIN32
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-#endif
-#endif /* X_NOT_POSIX */
-#endif
-#ifdef __QNX__
-#define NOFILES_MAX 256
-#endif
#ifndef OPEN_MAX
#ifdef SVR4
#define OPEN_MAX 256
@@ -115,7 +102,7 @@ SOFTWARE.
#define MAXSELECT (sizeof(fd_set) * NBBY)
#ifndef HAS_GETDTABLESIZE
-#if !defined(hpux) && !defined(SVR4) && !defined(SYSV)
+#if !defined(SVR4) && !defined(SYSV)
#define HAS_GETDTABLESIZE
#endif
#endif
@@ -184,7 +171,7 @@ typedef struct _osComm {
extern int FlushClient(
ClientPtr /*who*/,
OsCommPtr /*oc*/,
- char* /*extraBuf*/,
+ const void * /*extraBuf*/,
int /*extraCount*/
);
diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c
index 1bc8624dc..74e2457f2 100644
--- a/xorg-server/os/osinit.c
+++ b/xorg-server/os/osinit.c
@@ -55,9 +55,7 @@ SOFTWARE.
#include "osdep.h"
#include <X11/Xos.h>
-#ifdef SMART_SCHEDULE
#include "dixstruct.h"
-#endif
#ifndef PATH_MAX
#ifdef MAXPATHLEN
@@ -67,11 +65,11 @@ SOFTWARE.
#endif
#endif
-#if defined(Lynx) || defined(__SCO__)
+#if defined(__SCO__)
#include <sys/wait.h>
#endif
-#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32)
#include <sys/resource.h>
#endif
@@ -90,8 +88,6 @@ int limitStackSpace = -1;
int limitNoFile = -1;
#endif
-Bool OsDelayInitColors = FALSE;
-
void
OsInit(void)
{
@@ -143,15 +139,8 @@ OsInit(void)
#endif
}
-#ifndef X_NOT_POSIX
if (getpgrp () == 0)
setpgid (0, 0);
-#else
-#if !defined(SYSV) && !defined(WIN32)
- if (getpgrp (0) == 0)
- setpgrp (0, getpid ());
-#endif
-#endif
#ifdef RLIMIT_DATA
if (limitDataSpace >= 0)
@@ -198,36 +187,26 @@ OsInit(void)
}
}
#endif
-#ifdef SERVER_LOCK
LockServer();
-#endif
been_here = TRUE;
}
TimerInit();
-#ifdef DDXOSINIT
OsVendorInit();
-#endif
/*
* No log file by default. OsVendorInit() should call LogInit() with the
* log file name if logging to a file is desired.
*/
LogInit(NULL, NULL);
-#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable)
if (!SmartScheduleInit ())
SmartScheduleDisable = TRUE;
-#endif
- OsInitAllocator();
- if (!OsDelayInitColors) OsInitColors();
}
void
OsCleanup(Bool terminating)
{
-#ifdef SERVER_LOCK
if (terminating)
{
UnlockServer();
}
-#endif
}
diff --git a/xorg-server/os/rpcauth.c b/xorg-server/os/rpcauth.c
index 3451ac18b..1a27c5882 100644
--- a/xorg-server/os/rpcauth.c
+++ b/xorg-server/os/rpcauth.c
@@ -42,6 +42,7 @@ from The Open Group.
#include <X11/Xauth.h>
#include "misc.h"
#include "os.h"
+#include "osdep.h"
#include "dixstruct.h"
#include <rpc/rpc.h>
@@ -51,16 +52,6 @@ from The Open Group.
extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
#endif
-#if defined(DGUX)
-#include <time.h>
-#include <rpc/auth_des.h>
-#endif /* DGUX */
-
-#ifdef ultrix
-#include <time.h>
-#include <rpc/auth_des.h>
-#endif
-
static enum auth_stat why;
static char *
diff --git a/xorg-server/os/strcasecmp.c b/xorg-server/os/strcasecmp.c
new file mode 100644
index 000000000..ca1051dc1
--- /dev/null
+++ b/xorg-server/os/strcasecmp.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1987, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <ctype.h>
+#include "dix.h"
+
+#ifdef NEED_STRCASECMP
+int
+xstrcasecmp(const char *str1, const char *str2)
+{
+ const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
+
+ while (tolower(*us1) == tolower(*us2)) {
+ if (*us1++ == '\0')
+ return (0);
+ us2++;
+ }
+
+ return (tolower(*us1) - tolower(*us2));
+}
+#endif
+
+#ifdef NEED_STRNCASECMP
+int
+xstrncasecmp(const char *s1, const char *s2, size_t n)
+{
+ if (n != 0) {
+ const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2;
+
+ do {
+ if (tolower(*us1) != tolower(*us2++))
+ return (tolower(*us1) - tolower(*--us2));
+ if (*us1++ == '\0')
+ break;
+ } while (--n != 0);
+ }
+
+ return 0;
+}
+#endif
diff --git a/xorg-server/os/strcasestr.c b/xorg-server/os/strcasestr.c
new file mode 100644
index 000000000..b3d45495c
--- /dev/null
+++ b/xorg-server/os/strcasestr.c
@@ -0,0 +1,64 @@
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <ctype.h>
+#include <string.h>
+#include "dix.h"
+
+/*
+ * Find the first occurrence of find in s, ignore case.
+ */
+#ifdef NEED_STRCASESTR
+char *
+xstrcasestr(const char *s, const char *find)
+{
+ char c, sc;
+ size_t len;
+
+ if ((c = *find++) != 0) {
+ c = tolower((unsigned char)c);
+ len = strlen(find);
+ do {
+ do {
+ if ((sc = *s++) == 0)
+ return (NULL);
+ } while ((char)tolower((unsigned char)sc) != c);
+ } while (strncasecmp(s, find, len) != 0);
+ s--;
+ }
+ return ((char *)s);
+}
+#endif
diff --git a/xorg-server/os/strlcat.c b/xorg-server/os/strlcat.c
index b57fcc563..91ceabb1c 100644
--- a/xorg-server/os/strlcat.c
+++ b/xorg-server/os/strlcat.c
@@ -21,6 +21,7 @@
#include <sys/types.h>
#include <string.h>
+#include "os.h"
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
diff --git a/xorg-server/os/strlcpy.c b/xorg-server/os/strlcpy.c
index 989d0385e..aa9d042e0 100644
--- a/xorg-server/os/strlcpy.c
+++ b/xorg-server/os/strlcpy.c
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <string.h>
+#include "os.h"
/*
* Copy src to string dst of size siz. At most siz-1 characters
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index f58c76366..b1009494b 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -83,7 +83,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <signal.h>
#undef _POSIX_C_SOURCE
#else
-#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
+#if defined(_POSIX_SOURCE)
#include <signal.h>
#else
#define _POSIX_SOURCE
@@ -94,18 +94,13 @@ OR PERFORMANCE OF THIS SOFTWARE.
#ifndef WIN32
#include <sys/wait.h>
#endif
-#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32)
#include <sys/resource.h>
#endif
#include <sys/stat.h>
#include <ctype.h> /* for isspace */
#include <stdarg.h>
-#if defined(DGUX)
-#include <sys/resource.h>
-#include <netdb.h>
-#endif
-
#include <stdlib.h> /* for malloc() */
#if defined(TCPCONN) || defined(STREAMSCONN)
@@ -116,9 +111,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "opaque.h"
-#ifdef SMART_SCHEDULE
#include "dixstruct.h"
-#endif
#ifdef XKB
#include <xkbsrv.h>
@@ -128,14 +121,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "picture.h"
#endif
-#ifdef XPRINT
-#include "DiPrint.h"
-#endif
-
_X_EXPORT Bool noTestExtensions;
-#ifdef BIGREQS
-_X_EXPORT Bool noBigReqExtension = FALSE;
-#endif
#ifdef COMPOSITE
_X_EXPORT Bool noCompositeExtension = FALSE;
#endif
@@ -149,12 +135,6 @@ _X_EXPORT Bool noDbeExtension = FALSE;
#ifdef DPMSExtension
_X_EXPORT Bool noDPMSExtension = FALSE;
#endif
-#ifdef EVI
-_X_EXPORT Bool noEVIExtension = FALSE;
-#endif
-#ifdef FONTCACHE
-_X_EXPORT Bool noFontCacheExtension = FALSE;
-#endif
#ifdef GLXEXT
_X_EXPORT Bool noGlxExtension = FALSE;
_X_EXPORT Bool noGlxVisualInit = FALSE;
@@ -165,9 +145,6 @@ _X_EXPORT Bool noScreenSaverExtension = FALSE;
#ifdef MITSHM
_X_EXPORT Bool noMITShmExtension = FALSE;
#endif
-#ifdef MITMISC
-_X_EXPORT Bool noMITMiscExtension = FALSE;
-#endif
#ifdef MULTIBUFFER
_X_EXPORT Bool noMultibufferExtension = FALSE;
#endif
@@ -177,32 +154,12 @@ _X_EXPORT Bool noRRExtension = FALSE;
#ifdef RENDER
_X_EXPORT Bool noRenderExtension = FALSE;
#endif
-#ifdef SHAPE
-_X_EXPORT Bool noShapeExtension = FALSE;
-#endif
#ifdef XCSECURITY
_X_EXPORT Bool noSecurityExtension = FALSE;
#endif
-#ifdef XSYNC
-_X_EXPORT Bool noSyncExtension = FALSE;
-#endif
-#ifdef TOGCUP
-_X_EXPORT Bool noXcupExtension = FALSE;
-#endif
#ifdef RES
_X_EXPORT Bool noResExtension = FALSE;
#endif
-#ifdef XAPPGROUP
-_X_EXPORT Bool noXagExtension = FALSE;
-#endif
-#ifdef XCMISC
-_X_EXPORT Bool noXCMiscExtension = FALSE;
-#endif
-#ifdef XEVIE
-/* Xevie is disabled by default for now until the
- * interface is stable */
-_X_EXPORT Bool noXevieExtension = TRUE;
-#endif
#ifdef XF86BIGFONT
_X_EXPORT Bool noXFree86BigfontExtension = FALSE;
#endif
@@ -212,9 +169,6 @@ _X_EXPORT Bool noXFree86DGAExtension = FALSE;
#ifdef XF86DRI
_X_EXPORT Bool noXFree86DRIExtension = FALSE;
#endif
-#ifdef XF86MISC
-_X_EXPORT Bool noXFree86MiscExtension = FALSE;
-#endif
#ifdef XF86VIDMODE
_X_EXPORT Bool noXFree86VidModeExtension = FALSE;
#endif
@@ -226,14 +180,8 @@ _X_EXPORT Bool noXFixesExtension = FALSE;
/* Xinerama is disabled by default unless enabled via +xinerama */
_X_EXPORT Bool noPanoramiXExtension = TRUE;
#endif
-#ifdef XINPUT
-_X_EXPORT Bool noXInputExtension = FALSE;
-#endif
-#ifdef XIDLE
-_X_EXPORT Bool noXIdleExtension = FALSE;
-#endif
#ifdef XSELINUX
-_X_EXPORT Bool noSELinuxExtension = TRUE;
+_X_EXPORT Bool noSELinuxExtension = FALSE;
_X_EXPORT int selinuxEnforcingState = SELINUX_MODE_DEFAULT;
#endif
#ifdef XV
@@ -243,6 +191,8 @@ _X_EXPORT Bool noXvExtension = FALSE;
_X_EXPORT Bool noDRI2Extension = FALSE;
#endif
+_X_EXPORT Bool noGEExtension = FALSE;
+
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
@@ -256,23 +206,10 @@ Bool PanoramiXExtensionDisabledHack = FALSE;
int auditTrailLevel = 1;
-_X_EXPORT Bool Must_have_memory = FALSE;
-
-#ifdef AIXV3
-int SyncOn = 0;
-extern int SelectWaitTime;
-#endif
-
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif
-#ifdef MEMBUG
-#define MEM_FAIL_SCALE 100000
-long Memory_fail = 0;
-#include <stdlib.h> /* for random() */
-#endif
-
static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
OsSigHandlerPtr
@@ -280,9 +217,6 @@ OsSignal(sig, handler)
int sig;
OsSigHandlerPtr handler;
{
-#ifdef X_NOT_POSIX
- return signal(sig, handler);
-#else
struct sigaction act, oact;
sigemptyset(&act.sa_mask);
@@ -293,10 +227,8 @@ OsSignal(sig, handler)
if (sigaction(sig, &act, &oact))
perror("sigaction");
return oact.sa_handler;
-#endif
}
-
-#ifdef SERVER_LOCK
+
/*
* Explicit support for a server lock file like the ones used for UUCP.
* For architectures with virtual terminals that can run more than one
@@ -308,17 +240,8 @@ OsSignal(sig, handler)
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
-#if defined(DGUX)
-#include <limits.h>
-#include <sys/param.h>
-#endif
-
#ifndef PATH_MAX
-#ifndef Lynx
#include <sys/param.h>
-#else
-#include <param.h>
-#endif
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
@@ -392,11 +315,7 @@ LockServer(void)
FatalError("Could not create lock file in %s\n", tmp);
(void) sprintf(pid_str, "%10ld\n", (long)getpid());
(void) write(lfd, pid_str, 11);
-#ifndef USE_CHMOD
- (void) fchmod(lfd, 0444);
-#else
(void) chmod(tmp, 0444);
-#endif
(void) close(lfd);
/*
@@ -478,7 +397,6 @@ UnlockServer(void)
(void) unlink(LockFile);
}
}
-#endif /* SERVER_LOCK */
/* Force connections to close on SIGHUP from init */
@@ -490,13 +408,6 @@ AutoResetServer (int sig)
dispatchException |= DE_RESET;
isItTimeToYield = TRUE;
-#ifdef GPROF
- chdir ("/tmp");
- exit (0);
-#endif
-#if defined(SYSV) && defined(X_NOT_POSIX)
- OsSignal (SIGHUP, AutoResetServer);
-#endif
errno = olderrno;
}
@@ -510,10 +421,6 @@ GiveUp(int sig)
dispatchException |= DE_TERMINATE;
isItTimeToYield = TRUE;
-#if defined(SYSV) && defined(X_NOT_POSIX)
- if (sig)
- OsSignal(sig, SIG_IGN);
-#endif
errno = olderrno;
}
@@ -566,13 +473,9 @@ AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
void UseMsg(void)
{
-#if !defined(AIXrt) && !defined(AIX386)
ErrorF("use: X [:<display>] [option]\n");
ErrorF("-a # mouse acceleration (pixels)\n");
ErrorF("-ac disable access control restrictions\n");
-#ifdef MEMBUG
- ErrorF("-alloc int chance alloc should fail\n");
-#endif
ErrorF("-audit int set audit trail level\n");
ErrorF("-auth file select authorization file\n");
ErrorF("-br create root window with black background\n");
@@ -581,9 +484,6 @@ void UseMsg(void)
ErrorF("-c turns off key-click\n");
ErrorF("c # key-click volume (0-100)\n");
ErrorF("-cc int default color visual class\n");
-#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS
- ErrorF("-config file read options from file\n");
-#endif
ErrorF("-core generate core dump on fatal error\n");
ErrorF("-dpi int screen resolution in dots per inch\n");
#ifdef DPMSExtension
@@ -624,11 +524,8 @@ void UseMsg(void)
#ifdef RENDER
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
#endif
+ ErrorF("-retro start with classic stipple and cursor\n");
ErrorF("-s # screen-saver timeout (minutes)\n");
-#ifdef XPRINT
- PrinterUseMsg();
-#endif
- ErrorF("-su disable any save under support\n");
ErrorF("-t # mouse threshold (pixels)\n");
ErrorF("-terminate terminate at server reset\n");
ErrorF("-to # connection time out\n");
@@ -644,16 +541,13 @@ void UseMsg(void)
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
#endif
-#ifdef SMART_SCHEDULE
ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
ErrorF("-schedInterval int Set scheduler interval in msec\n");
-#endif
ErrorF("+extension name Enable extension\n");
ErrorF("-extension name Disable extension\n");
#ifdef XDMCP
XdmcpUseMsg();
#endif
-#endif /* !AIXrt && ! AIX386 */
#ifdef XKB
XkbUseMsg();
#endif
@@ -679,17 +573,6 @@ VerifyDisplayName(const char *d)
}
/*
- * This function is responsible for doing initalisation of any global
- * variables at an very early point of server startup (even before
- * |ProcessCommandLine()|.
- */
-void InitGlobals(void)
-{
- ddxInitGlobals();
-}
-
-
-/*
* This function parses the command line. Handles device-independent fields
* and allows ddx to handle additional fields. It is not allowed to modify
* argc or any of the strings pointed to by argv.
@@ -736,15 +619,6 @@ ProcessCommandLine(int argc, char *argv[])
{
defeatAccessControl = TRUE;
}
-#ifdef MEMBUG
- else if ( strcmp( argv[i], "-alloc") == 0)
- {
- if(++i < argc)
- Memory_fail = atoi(argv[i]);
- else
- UseMsg();
- }
-#endif
else if ( strcmp( argv[i], "-audit") == 0)
{
if(++i < argc)
@@ -759,8 +633,7 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
- else if ( strcmp( argv[i], "-br") == 0)
- blackRoot = TRUE;
+ else if ( strcmp( argv[i], "-br") == 0) ; /* default */
else if ( strcmp( argv[i], "+bs") == 0)
enableBackingStore = TRUE;
else if ( strcmp( argv[i], "-bs") == 0)
@@ -946,6 +819,8 @@ ProcessCommandLine(int argc, char *argv[])
defaultKeyboardControl.autoRepeat = TRUE;
else if ( strcmp( argv[i], "-r") == 0)
defaultKeyboardControl.autoRepeat = FALSE;
+ else if ( strcmp( argv[i], "-retro") == 0)
+ party_like_its_1989 = TRUE;
else if ( strcmp( argv[i], "-s") == 0)
{
if(++i < argc)
@@ -954,8 +829,6 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
- else if ( strcmp( argv[i], "-su") == 0)
- disableSaveUnders = TRUE;
else if ( strcmp( argv[i], "-t") == 0)
{
if(++i < argc)
@@ -1039,26 +912,6 @@ ProcessCommandLine(int argc, char *argv[])
i = skip - 1;
}
#endif
-#ifdef XPRINT
- else if ((skip = PrinterOptions(argc, argv, i)) != i)
- {
- i = skip - 1;
- }
-#endif
-#ifdef AIXV3
- else if ( strcmp( argv[i], "-timeout") == 0)
- {
- if(++i < argc)
- SelectWaitTime = atoi(argv[i]);
- else
- UseMsg();
- }
- else if ( strcmp( argv[i], "-sync") == 0)
- {
- SyncOn++;
- }
-#endif
-#ifdef SMART_SCHEDULE
else if ( strcmp( argv[i], "-dumbSched") == 0)
{
SmartScheduleDisable = TRUE;
@@ -1082,7 +935,6 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
-#endif
#ifdef RENDER
else if ( strcmp( argv[i], "-render" ) == 0)
{
@@ -1128,118 +980,6 @@ ProcessCommandLine(int argc, char *argv[])
}
}
-#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS
-static void
-InsertFileIntoCommandLine(
- int *resargc, char ***resargv,
- int prefix_argc, char **prefix_argv,
- char *filename,
- int suffix_argc, char **suffix_argv)
-{
- struct stat st;
- FILE *f;
- char *p;
- char *q;
- int insert_argc;
- char *buf;
- int len;
- int i;
-
- f = fopen(filename, "r");
- if (!f)
- FatalError("Can't open option file %s\n", filename);
-
- fstat(fileno(f), &st);
-
- buf = (char *) xalloc((unsigned) st.st_size + 1);
- if (!buf)
- FatalError("Out of Memory\n");
-
- len = fread(buf, 1, (unsigned) st.st_size, f);
-
- fclose(f);
-
- if (len < 0)
- FatalError("Error reading option file %s\n", filename);
-
- buf[len] = '\0';
-
- p = buf;
- q = buf;
- insert_argc = 0;
-
- while (*p)
- {
- while (isspace(*p))
- p++;
- if (!*p)
- break;
- if (*p == '#')
- {
- while (*p && *p != '\n')
- p++;
- } else
- {
- while (*p && !isspace(*p))
- *q++ = *p++;
- /* Since p and q might still be pointing at the same place, we */
- /* need to step p over the whitespace now before we add the null. */
- if (*p)
- p++;
- *q++ = '\0';
- insert_argc++;
- }
- }
-
- buf = (char *) xrealloc(buf, q - buf);
- if (!buf)
- FatalError("Out of memory reallocing option buf\n");
-
- *resargc = prefix_argc + insert_argc + suffix_argc;
- *resargv = (char **) xalloc((*resargc + 1) * sizeof(char *));
- if (!*resargv)
- FatalError("Out of Memory\n");
-
- memcpy(*resargv, prefix_argv, prefix_argc * sizeof(char *));
-
- p = buf;
- for (i = 0; i < insert_argc; i++)
- {
- (*resargv)[prefix_argc + i] = p;
- p += strlen(p) + 1;
- }
-
- memcpy(*resargv + prefix_argc + insert_argc,
- suffix_argv, suffix_argc * sizeof(char *));
-
- (*resargv)[*resargc] = NULL;
-} /* end InsertFileIntoCommandLine */
-
-
-void
-ExpandCommandLine(int *pargc, char ***pargv)
-{
- int i;
-
-#if !defined(WIN32) && !defined(__CYGWIN__)
- if (getuid() != geteuid())
- return;
-#endif
-
- for (i = 1; i < *pargc; i++)
- {
- if ( (0 == strcmp((*pargv)[i], "-config")) && (i < (*pargc - 1)) )
- {
- InsertFileIntoCommandLine(pargc, pargv,
- i, *pargv,
- (*pargv)[i+1], /* filename */
- *pargc - i - 2, *pargv + i + 2);
- i--;
- }
- }
-} /* end ExpandCommandLine */
-#endif
-
/* Implement a simple-minded font authorization scheme. The authorization
name is "hp-hostname-1", the contents are simply the host name. */
int
@@ -1307,65 +1047,40 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client)
#endif /* TCPCONN */
}
-/* XALLOC -- X's internal memory allocator. Why does it return unsigned
- * long * instead of the more common char *? Well, if you read K&R you'll
- * see they say that alloc must return a pointer "suitable for conversion"
- * to whatever type you really want. In a full-blown generic allocator
- * there's no way to solve the alignment problems without potentially
- * wasting lots of space. But we have a more limited problem. We know
- * we're only ever returning pointers to structures which will have to
- * be long word aligned. So we are making a stronger guarantee. It might
- * have made sense to make Xalloc return char * to conform with people's
- * expectations of malloc, but this makes lint happier.
- */
-
#ifndef INTERNAL_MALLOC
_X_EXPORT void *
Xalloc(unsigned long amount)
{
- register pointer ptr;
-
+ void *ptr;
+
if ((long)amount <= 0) {
- return (unsigned long *)NULL;
+ return NULL;
}
/* aligned extra on long word boundary */
amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1);
-#ifdef MEMBUG
- if (!Must_have_memory && Memory_fail &&
- ((random() % MEM_FAIL_SCALE) < Memory_fail))
- return (unsigned long *)NULL;
-#endif
- if ((ptr = (pointer)malloc(amount))) {
- return (unsigned long *)ptr;
- }
- if (Must_have_memory)
- FatalError("Out of memory");
- return (unsigned long *)NULL;
+ ptr = malloc(amount);
+ return ptr;
}
/*****************
* XNFalloc
- * "no failure" realloc, alternate interface to Xalloc w/o Must_have_memory
+ * "no failure" realloc
*****************/
_X_EXPORT void *
XNFalloc(unsigned long amount)
{
- register pointer ptr;
+ void *ptr;
if ((long)amount <= 0)
- {
- return (unsigned long *)NULL;
- }
+ return NULL;
/* aligned extra on long word boundary */
amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1);
- ptr = (pointer)malloc(amount);
+ ptr = malloc(amount);
if (!ptr)
- {
FatalError("Out of memory");
- }
- return ((unsigned long *)ptr);
+ return ptr;
}
/*****************
@@ -1375,11 +1090,11 @@ XNFalloc(unsigned long amount)
_X_EXPORT void *
Xcalloc(unsigned long amount)
{
- unsigned long *ret;
+ void *ret;
ret = Xalloc (amount);
if (ret)
- bzero ((char *) ret, (int) amount);
+ bzero (ret, (int) amount);
return ret;
}
@@ -1390,11 +1105,11 @@ Xcalloc(unsigned long amount)
_X_EXPORT void *
XNFcalloc(unsigned long amount)
{
- unsigned long *ret;
+ void *ret;
ret = Xalloc (amount);
if (ret)
- bzero ((char *) ret, (int) amount);
+ bzero (ret, (int) amount);
else if ((long)amount > 0)
FatalError("Out of memory");
return ret;
@@ -1407,43 +1122,35 @@ XNFcalloc(unsigned long amount)
_X_EXPORT void *
Xrealloc(pointer ptr, unsigned long amount)
{
-#ifdef MEMBUG
- if (!Must_have_memory && Memory_fail &&
- ((random() % MEM_FAIL_SCALE) < Memory_fail))
- return (unsigned long *)NULL;
-#endif
if ((long)amount <= 0)
{
if (ptr && !amount)
free(ptr);
- return (unsigned long *)NULL;
+ return NULL;
}
amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1);
if (ptr)
- ptr = (pointer)realloc((char *)ptr, amount);
+ ptr = realloc(ptr, amount);
else
- ptr = (pointer)malloc(amount);
- if (ptr)
- return (unsigned long *)ptr;
- if (Must_have_memory)
- FatalError("Out of memory");
- return (unsigned long *)NULL;
+ ptr = malloc(amount);
+
+ return ptr;
}
/*****************
* XNFrealloc
- * "no failure" realloc, alternate interface to Xrealloc w/o Must_have_memory
+ * "no failure" realloc
*****************/
_X_EXPORT void *
XNFrealloc(pointer ptr, unsigned long amount)
{
- if (( ptr = (pointer)Xrealloc( ptr, amount ) ) == NULL)
+ if ((ptr = Xrealloc(ptr, amount)) == NULL)
{
if ((long)amount > 0)
FatalError( "Out of memory" );
}
- return ((unsigned long *)ptr);
+ return ptr;
}
/*****************
@@ -1455,21 +1162,7 @@ _X_EXPORT void
Xfree(pointer ptr)
{
if (ptr)
- free((char *)ptr);
-}
-
-void
-OsInitAllocator (void)
-{
-#ifdef MEMBUG
- static int been_here;
-
- /* Check the memory system after each generation */
- if (been_here)
- CheckMemory ();
- else
- been_here = 1;
-#endif
+ free(ptr);
}
#endif /* !INTERNAL_MALLOC */
@@ -1482,7 +1175,7 @@ Xstrdup(const char *s)
if (s == NULL)
return NULL;
- sd = (char *)Xalloc(strlen(s) + 1);
+ sd = Xalloc(strlen(s) + 1);
if (sd != NULL)
strcpy(sd, s);
return sd;
@@ -1497,12 +1190,11 @@ XNFstrdup(const char *s)
if (s == NULL)
return NULL;
- sd = (char *)XNFalloc(strlen(s) + 1);
+ sd = XNFalloc(strlen(s) + 1);
strcpy(sd, s);
return sd;
}
-#ifdef SMART_SCHEDULE
#ifdef SIGVTALRM
#define SMART_SCHEDULE_POSSIBLE
@@ -1578,7 +1270,6 @@ SmartScheduleInit (void)
return FALSE;
#endif
}
-#endif
#ifdef SIG_BLOCK
static sigset_t PreviousSignalMask;
@@ -1702,7 +1393,7 @@ static struct pid {
int pid;
} *pidlist;
-void (*old_alarm)(int) = NULL; /* XXX horrible awful hack */
+OsSigHandlerPtr old_alarm = NULL; /* XXX horrible awful hack */
pointer
Popen(char *command, char *type)
@@ -1726,7 +1417,7 @@ Popen(char *command, char *type)
}
/* Ignore the smart scheduler while this is going on */
- old_alarm = signal(SIGALRM, SIG_IGN);
+ old_alarm = OsSignal(SIGALRM, SIG_IGN);
if (old_alarm == SIG_ERR) {
perror("signal");
return NULL;
@@ -1737,7 +1428,7 @@ Popen(char *command, char *type)
close(pdes[0]);
close(pdes[1]);
xfree(cur);
- if (signal(SIGALRM, old_alarm) == SIG_ERR)
+ if (OsSignal(SIGALRM, old_alarm) == SIG_ERR)
perror("signal");
return NULL;
case 0: /* child */
@@ -1914,7 +1605,7 @@ Pclose(pointer iop)
/* allow EINTR again */
OsReleaseSignals ();
- if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) {
+ if (old_alarm && OsSignal(SIGALRM, old_alarm) == SIG_ERR) {
perror("signal");
return -1;
}
@@ -2015,9 +1706,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
enum BadCode bad = NotBad;
int i = 0, j;
char *a, *e = NULL;
-#if defined(__QNX__) && !defined(__QNXNTO__)
- char cmd_name[64];
-#endif
#if CHECK_EUID
if (geteuid() == 0 && getuid() != geteuid())
diff --git a/xorg-server/os/xdmauth.c b/xorg-server/os/xdmauth.c
index d143ddefc..8cbcd581f 100644
--- a/xorg-server/os/xdmauth.c
+++ b/xorg-server/os/xdmauth.c
@@ -69,7 +69,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
{
XdmAuthKeyPtr incoming;
- XdmcpUnwrap (incomingData->data, &privateKey,
+ XdmcpUnwrap (incomingData->data, (unsigned char *)&privateKey,
incomingData->data,incomingData->length);
if (packet_type == ACCEPT) {
if (incomingData->length != 8)
@@ -89,7 +89,8 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
outgoingData->data = 0;
if (packet_type == REQUEST) {
if (XdmcpAllocARRAY8 (outgoingData, 8))
- XdmcpWrap (&rho, &privateKey, outgoingData->data, 8);
+ XdmcpWrap ((unsigned char *)&rho, (unsigned char *)&privateKey,
+ outgoingData->data, 8);
}
return TRUE;
}
@@ -99,7 +100,8 @@ XdmAuthenticationAddAuth (int name_len, char *name,
int data_len, char *data)
{
Bool ret;
- XdmcpUnwrap (data, (unsigned char *)&privateKey, data, data_len);
+ XdmcpUnwrap ((unsigned char *)data, (unsigned char *)&privateKey,
+ (unsigned char *)data, data_len);
authFromXDMCP = TRUE;
ret = AddAuthorization (name_len, name, data_len, data);
authFromXDMCP = FALSE;
@@ -152,7 +154,7 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
}
XdmcpGenerateKey (&rho);
XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen,
- (unsigned char *)&rho,
+ (char *)&rho,
sizeof (rho),
(ValidatorFunc)XdmAuthenticationValidator,
(GeneratorFunc)XdmAuthenticationGenerator,
@@ -387,7 +389,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie,
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
- XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
+ XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length);
if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason)) != NULL)
{
client->next = xdmClients;
@@ -432,7 +434,7 @@ XdmToID (unsigned short cookie_length, char *cookie)
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
- XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
+ XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length);
if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL)
{
xfree (client);
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c
index 310f33bc0..736cd3e11 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -24,12 +24,8 @@
#include <X11/Xos.h>
#if !defined(WIN32)
-#ifndef Lynx
#include <sys/param.h>
#include <sys/socket.h>
-#else
-#include <socket.h>
-#endif
#include <netinet/in.h>
#include <netdb.h>
#endif
@@ -44,11 +40,7 @@
#include "input.h"
#include "dixstruct.h"
#include "opaque.h"
-
-#if defined(DGUX)
-#include <net/net_ioctl.h>
-#include <sys/ioctl.h>
-#endif
+#include "site.h"
#ifdef STREAMSCONN
#include <tiuser.h>
@@ -68,7 +60,7 @@
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
-extern char *defaultDisplayClass;
+static char *defaultDisplayClass = COMPILEDDISPLAYCLASS;
static int xdmcpSocket, sessionSocket;
static xdmcp_states state;