freebsd-dev/sys
Bruce Evans 2610c9f2b2 Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color
codes.  This will be used to fix bright colors.

Improve teken_256to8().  Use a lookup table instead of calculations.  The
calculations were inaccurate since they used indexes into the xterm-256
6x6x6 color map instead of actual xterm colors.  Also, change the threshold
for converting to a primary color: require the primary's component to be
2 or more higher instead of just higher.  This affects about 1/5 of the
table entries and gives uniformly distributed colors in the 6x6x6 submap
except for greys (35 entries each for red, green, blue, cyan, brown and
magenta, instead of approx. only 15 each for the mixed colors).  Even
more mixed colors would be better for matching colors, but uniform
distribution is best for preserving contrast.

For teken_256to16(), bright colors are just the ones with luminosity >=
60%.  These are actually light colors (more white instead of more
saturation), while xterm bright colors except for white itself are
actually saturated with no white, so have luminosity only 50%.

These functions are layering violations.  teken cannot do correct
conversions since it shouldn't know the color maps of anything except
xterm.  Translating through xterm-16 colors loses information.  This
gives bugs like xterm-256 near-brown -> xterm-16 red -> VGA red.
2017-03-16 16:40:54 +00:00
..
amd64 Hide the AMD MONITORX/MWAITX capability. 2017-03-16 03:21:42 +00:00
arm Fix arm stack frame walking support: 2017-03-14 16:06:57 +00:00
arm64 Load the new sp_el0 with interrupts disabled in fork_trampoline. If an 2017-02-15 14:56:47 +00:00
boot loader: remove open_disk cache 2017-03-16 12:04:43 +00:00
bsm
cam Increase device openings to tagged maximum. 2017-03-11 18:46:46 +00:00
cddl Fix a backwards comparison in the code to dump a DTrace debug buffer. 2017-03-13 18:43:00 +00:00
compat Define some more LinuxKPI task related macros. 2017-03-16 12:33:34 +00:00
conf Remove i915drm and radeondrm from NOTES and conf. 2017-03-12 00:52:16 +00:00
contrib Copy needed include files from EDK2. This is a minimal set gleened 2017-03-08 02:47:59 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev The previous fix didn't ifdef out enough for sparc64 to actually work. 2017-03-16 07:40:33 +00:00
fs remove procfs ctl interface 2017-03-05 03:05:24 +00:00
gdb
geom After r315112 I broke the tests with eli, instead to pass 0, I should pass 2017-03-13 13:56:01 +00:00
gnu Update our device tree files to a Linux 4.10 2017-03-07 13:56:49 +00:00
i386 Remove i915drm and radeondrm from NOTES and conf. 2017-03-12 00:52:16 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern Don't clear p_ptevents on normal SIGKILL delivery 2017-03-16 13:03:31 +00:00
kgssapi
libkern Discard first 3072 bytes of RC4 keystream, this is a bandaid 2017-03-14 06:00:44 +00:00
mips Add cavium octeon 'bootoctlinux' boot argument support 2017-03-16 00:49:59 +00:00
modules revert r314862, use of GCC_MS_EXTENSIONS in qlxgbe 2017-03-11 15:16:55 +00:00
net Change casting to a uintptr_t to be compatible with non-x86 architectures. 2017-03-14 22:25:07 +00:00
net80211 [net80211] begin fleshing out per-VAP WME configurations. 2017-03-13 16:44:06 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet Add some ntohl() love to r315277 2017-03-14 20:57:54 +00:00
netinet6 The patch provides the same socket option as Linux IP_ORIGDSTADDR. 2017-03-06 04:01:58 +00:00
netipsec Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
netnatm
netpfil Use memset with structure size. 2017-03-14 07:57:33 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm
ofed Add basic support for VIMAGE to the LinuxKPI and ibcore. 2017-03-16 09:59:35 +00:00
opencrypto
powerpc Fix booting with >4GB RAM on PowerMac G5 hardware 2017-03-07 22:11:57 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
security
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sys Add missing pieces of r315280 2017-03-14 22:02:02 +00:00
teken Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color 2017-03-16 16:40:54 +00:00
tests
tools [fdt] Make DTBs generated by make_dtb.sh overlay-ready 2017-03-10 22:45:07 +00:00
ufs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vm The adj_free and max_free values of new_entry will be calculated and 2017-03-16 05:44:16 +00:00
x86 x86/srat: fix parsing of APIC IDs > MAX_APIC_ID 2017-03-16 09:33:36 +00:00
xdr
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00