Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4211 → Rev 4226

/trunk/uspace/srv/console/console.c
48,6 → 48,7
#include <screenbuffer.h>
#include <sys/mman.h>
#include <stdio.h>
#include <string.h>
#include <sysinfo.h>
#include <event.h>
 
465,25 → 466,28
static void cons_write(int consnum, ipc_callid_t rid, ipc_call_t *request)
{
ipc_callid_t callid;
size_t len;
size_t i;
size_t size;
wchar_t ch;
size_t off;
 
if (!ipc_data_write_receive(&callid, &len)) {
if (!ipc_data_write_receive(&callid, &size)) {
ipc_answer_0(callid, EINVAL);
ipc_answer_0(rid, EINVAL);
}
 
if (len > CWRITE_BUF_SIZE)
len = CWRITE_BUF_SIZE;
if (size > CWRITE_BUF_SIZE)
size = CWRITE_BUF_SIZE;
 
(void) ipc_data_write_finalize(callid, cwrite_buf, len);
(void) ipc_data_write_finalize(callid, cwrite_buf, size);
 
for (i = 0; i < len; i++) {
write_char(consnum, cwrite_buf[i]);
off = 0;
while (off < size) {
ch = str_decode(cwrite_buf, &off, size);
write_char(consnum, ch);
}
 
gcons_notify_char(consnum);
ipc_answer_1(rid, EOK, len);
ipc_answer_1(rid, EOK, size);
}
 
/** Default thread for new connections */
/trunk/uspace/srv/fb/fb.c
68,6 → 68,8
#define DEFAULT_BGCOLOR 0xf0f0f0
#define DEFAULT_FGCOLOR 0x000000
 
#define GLYPH_UNAVAIL '?'
 
#define MAX_ANIM_LEN 8
#define MAX_ANIMATIONS 4
#define MAX_PIXMAPS 256 /**< Maximum number of saved pixmaps */
78,7 → 80,7
 
/** Function to draw a glyph. */
typedef void (*dg_t)(unsigned int x, unsigned int y, bool cursor,
uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color);
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color);
 
struct {
uint8_t *fb_addr;
669,7 → 671,7
 
/* Check glyph range. */
if (glyph >= FONT_GLYPHS)
return;
glyph = GLYPH_UNAVAIL;
 
/*
* Prepare a pair of words, one filled with foreground-color
733,7 → 735,7
 
/* Check glyph range. */
if (glyph >= FONT_GLYPHS)
return;
glyph = GLYPH_UNAVAIL;
 
/* Pre-render 1x the foreground and background color pixels. */
if (cursor) {