qemu-irix/ui
OGAWA Hirofumi 4083733db5 ui/curses: Fix color attribute of monitor for curses
Current text_console_update() writes totally broken color attributes
to console_write_ch(). The format now is writing,

[WRONG]
	bold << 21 | fg << 12 | bg << 8 | char
	fg == 3bits curses color number
	bg == 3bits curses color number

I can't see this format is where come from. Anyway, this doesn't work
at all.

What curses expects is actually (and vga.c is using),

[RIGHT]
	bold << 21 | bg << 11 | fg << 8 | char
	fg == 3bits vga color number
	bg == 3bits vga color number

And curses set COLOR_PAIR() up to match this format, and curses's
chtype. I.e,

	bold | color_pair | char
	color_pair == (bg << 3 | fg)

To fix, this simply uses VGA color number everywhere except curses.c
internal. Then, convert it to above [RIGHT] format to write by
console_write_ch(). And as bonus, this reduces to expose curses define
to other parts (removes COLOR_* from console.c).

[Tested the first line is displayed as white on blue back for monitor
in curses console]

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Message-id: 87r3j95407.fsf@mail.parknet.co.jp
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-01-08 12:20:07 +01:00
..
shader
Makefile.objs gtk/opengl: add opengl context and scanout support (GtkGLArea) 2015-10-08 10:34:53 +02:00
cocoa.m qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
console-gl.c shaders: initialize vertexes once 2015-10-08 10:31:35 +02:00
console.c ui/curses: Fix color attribute of monitor for curses 2016-01-08 12:20:07 +01:00
curses.c ui/curses: Fix color attribute of monitor for curses 2016-01-08 12:20:07 +01:00
curses_keys.h ui/curses: Fix pageup/pagedown on -curses 2015-11-03 10:12:46 +01:00
cursor.c
cursor_hidden.xpm
cursor_left_ptr.xpm
egl-context.c opengl: add egl-context.[ch] helpers 2015-10-08 10:34:53 +02:00
egl-helpers.c
gtk-egl.c gtk/opengl: add opengl context and scanout support (egl) 2015-10-08 10:34:53 +02:00
gtk-gl-area.c gtk/opengl: add opengl context and scanout support (GtkGLArea) 2015-10-08 10:34:53 +02:00
gtk.c qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
input-keymap.c qapi: Don't let implicit enum MAX member collide 2015-12-17 08:21:28 +01:00
input-legacy.c qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
input.c qapi: Don't let implicit enum MAX member collide 2015-12-17 08:21:28 +01:00
keymaps.c ui: Use g_new() & friends where that makes obvious sense 2015-11-06 15:42:38 +03:00
keymaps.h
qemu-pixman.c
qemu-x509.h
sdl.c qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
sdl2-2d.c sdl2: stop flickering 2015-10-08 10:31:35 +02:00
sdl2-gl.c
sdl2-input.c
sdl2-keymap.h
sdl2.c qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
sdl_keysym.h
sdl_zoom.c
sdl_zoom.h
sdl_zoom_template.h
shader.c shaders: initialize vertexes once 2015-10-08 10:31:35 +02:00
spice-core.c qapi: Unbox base members 2015-11-02 08:30:26 +01:00
spice-display.c spice: surface switch fast path requires same format too. 2015-09-21 09:52:07 +02:00
spice-input.c qapi: Change munging of CamelCase enum values 2015-12-17 08:21:28 +01:00
vgafont.h
vnc-auth-sasl.c ui: convert VNC server to use QIOChannelSocket 2015-12-18 15:02:11 +00:00
vnc-auth-sasl.h
vnc-auth-vencrypt.c ui: convert VNC server to use QIOChannelTLS 2015-12-18 15:02:11 +00:00
vnc-auth-vencrypt.h
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle-template.c
vnc-enc-zrle.c
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c ui: convert VNC server to use QIOChannelSocket 2015-12-18 15:02:11 +00:00
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-ws.c ui: convert VNC server to use QIOChannelWebsock 2015-12-18 15:02:11 +00:00
vnc-ws.h ui: convert VNC server to use QIOChannelWebsock 2015-12-18 15:02:11 +00:00
vnc.c ui: convert VNC server to use QIOChannelWebsock 2015-12-18 15:02:11 +00:00
vnc.h ui: convert VNC server to use QIOChannelWebsock 2015-12-18 15:02:11 +00:00
vnc_keysym.h
x_keymap.c
x_keymap.h