summaryrefslogtreecommitdiff
path: root/xlib.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2006-10-29 08:07:51 +0000
committerRich Felker <dalias@aerifal.cx>2006-10-29 08:07:51 +0000
commit89fd3b76518cf3004053331c580a349afaaf2dab (patch)
tree61897409524c883266942c744ca58df69eb3970b /xlib.c
parentb97a486c34c343ab18bf16aef507478992af0625 (diff)
major internal changes in representation of character cells.
we now use 12 bytes per cell instead of 10. however, this allows us to support 256-color mode (not yet implemented but the framework is in place) and to mix scripts when using combining characters. while the latter sounds ridiculous at first, being able to visibly see a combining letter attached to a [, ", or ' is extremely useful in scripting and regular expressions with some languages. some code is left slightly messy, but overall it's much cleaner now since struct uucell is now properly encapsulated.
Diffstat (limited to 'xlib.c')
-rw-r--r--xlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlib.c b/xlib.c
index 99c7573..4dce890 100644
--- a/xlib.c
+++ b/xlib.c
@@ -361,8 +361,8 @@ void uudisp_predraw_cell(struct uudisp *d, int idx, int x, int color)
commit_cells(d, idx);
p->x1 = x;
p->color = color;
- XSetForeground(p->display, p->gc, p->colors[color&15]);
- XSetBackground(p->display, p->gc, p->colors[color>>4]);
+ XSetForeground(p->display, p->gc, p->colors[color&255]);
+ XSetBackground(p->display, p->gc, p->colors[color>>8]);
}
p->x2 = x;