Index: console/screenbuffer.h
===================================================================
--- console/screenbuffer.h	(revision 3745847281dad91802accfe903dcf4e9a4d0319b)
+++ console/screenbuffer.h	(revision 6b5111ad769012c8ab4c999cf82dd33796da1707)
@@ -60,4 +60,9 @@
 }
 
+static inline int style_same(style_t s1, style_t s2)
+{
+	return s1.fg_color == s2.fg_color && s1.bg_color == s2.bg_color;
+}
+
 
 int screenbuffer_putchar(screenbuffer_t *scr, char c);
Index: fb/fb.c
===================================================================
--- fb/fb.c	(revision 3745847281dad91802accfe903dcf4e9a4d0319b)
+++ fb/fb.c	(revision 6b5111ad769012c8ab4c999cf82dd33796da1707)
@@ -77,5 +77,5 @@
 	unsigned int rows, cols;
 	/* Style for text printing */
-	int bgcolor, fgcolor;
+	style_t style;
 	/* Auto-cursor position */
 	int cursor_active, cur_col, cur_row;
@@ -192,5 +192,5 @@
 	unsigned int x;
 	for (x = 0; x < viewports[vp].width; x++)
-		putpixel(vp, x, y, viewports[vp].bgcolor);
+		putpixel(vp, x, y, viewports[vp].style.bg_color);
 }
 
@@ -240,5 +240,5 @@
 				screen.pixelbytes * viewports[vp].width);
 		/* Clear first row */
-		clear_line(0, viewports[vp].bgcolor);
+		clear_line(0, viewports[vp].style.bg_color);
 		for (y=1;y < rows*FONT_SCANLINES; y++)
 			memcpy(&screen.fbaddress[POINTPOS(viewports[vp].x,viewports[vp].y+y)],
@@ -254,26 +254,23 @@
 
 
-/** Draw one line of glyph at a given position */
-static void draw_glyph_line(int vp,unsigned int glline, unsigned int x, unsigned int y)
-{
-	unsigned int i;
-
-	for (i = 0; i < 8; i++)
-		if (glline & (1 << (7 - i))) {
-			putpixel(vp, x + i, y, viewports[vp].fgcolor);
-		} else
-			putpixel(vp, x + i, y, viewports[vp].bgcolor);
-}
-
 /***************************************************************/
 /* Character-console functions */
 
 /** Draw character at given position */
-static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy)
-{
+static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy, style_t style)
+{
+	int i;
 	unsigned int y;
-
-	for (y = 0; y < FONT_SCANLINES; y++)
-		draw_glyph_line(vp ,fb_font[glyph * FONT_SCANLINES + y], sx, sy + y);
+	unsigned int glline;
+
+	for (y = 0; y < FONT_SCANLINES; y++) {
+		glline = fb_font[glyph * FONT_SCANLINES + y];
+		for (i = 0; i < 8; i++) {
+			if (glline & (1 << (7 - i)))
+				putpixel(vp, sx + i, sy + y, style.fg_color);
+			else
+				putpixel(vp, sx + i, sy + y, style.bg_color);
+		}
+	}
 }
 
@@ -303,5 +300,5 @@
 			byte >>= x % 8;
 			if (byte & 1)
-				putpixel(vp ,startx + x, starty + y, viewports[vp].fgcolor);
+				putpixel(vp ,startx + x, starty + y, viewports[vp].style.fg_color);
 		}
 }
@@ -341,6 +338,6 @@
 	viewports[i].cols = width / COL_WIDTH;
 
-	viewports[i].bgcolor = DEFAULT_BGCOLOR;
-	viewports[i].fgcolor = DEFAULT_FGCOLOR;
+	viewports[i].style.bg_color = DEFAULT_BGCOLOR;
+	viewports[i].style.fg_color = DEFAULT_FGCOLOR;
 	
 	viewports[i].cur_col = 0;
@@ -438,5 +435,5 @@
  * @param col Screen position relative to viewport
  */
-static void draw_char(int vp, char c, unsigned int row, unsigned int col)
+static void draw_char(int vp, char c, unsigned int row, unsigned int col, style_t style)
 {
 	viewport_t *vport = &viewports[vp];
@@ -447,5 +444,5 @@
 		invert_char(vp, vport->cur_row, vport->cur_col);
 	
-	draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES);
+	draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES, style);
 
 	vport->cur_col = col;
@@ -470,7 +467,8 @@
 	clear_port(vp);
 	for (i=0; i < vport->cols * vport->rows; i++) {
-		if (data[i].character == ' ') /* TODO: && data[i].style==vport->style */
+		if (data[i].character == ' ' && style_same(data[i].style,vport->style))
 			continue;
-		draw_char(vp, data[i].character, i/vport->rows, i % vport->cols);
+		draw_char(vp, data[i].character, i/vport->rows, i % vport->cols,
+			  data[i].style);
 	}
 	cursor_print(vp);
@@ -545,5 +543,5 @@
 			ipc_answer_fast(callid,0,0,0);
 
-			draw_char(vp, c, row, col);
+			draw_char(vp, c, row, col, vport->style);
 			continue; /* msg already answered */
 		case FB_CLEAR:
@@ -621,6 +619,6 @@
 			break;
 		case FB_SET_STYLE:
-			vport->fgcolor = IPC_GET_ARG1(call);
-			vport->bgcolor = IPC_GET_ARG2(call);
+			vport->style.fg_color = IPC_GET_ARG1(call);
+			vport->style.bg_color = IPC_GET_ARG2(call);
 			retval = 0;
 			break;
Index: libc/generic/as.c
===================================================================
--- libc/generic/as.c	(revision 3745847281dad91802accfe903dcf4e9a4d0319b)
+++ libc/generic/as.c	(revision 6b5111ad769012c8ab4c999cf82dd33796da1707)
@@ -120,7 +120,4 @@
 }
 
-/* TODO: make this type defined somewhere else */
-typedef sysarg_t __address;
-
 /** Return pointer to some unmapped area, where fits new as_area
  *
