/branches/dd/uspace/srv/fb/serial_console.c |
---|
388,6 → 388,10 |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, scr_width, scr_height); |
continue; |
case FB_GET_COLOR_CAP: |
ipc_answer_1(callid, EOK, color ? FB_CCAP_INDEXED : |
FB_CCAP_STYLE); |
continue; |
case FB_CLEAR: |
serial_clrscr(); |
retval = 0; |
/branches/dd/uspace/srv/fb/fb.c |
---|
56,6 → 56,7 |
#include <async.h> |
#include <fibril.h> |
#include <bool.h> |
#include <stdio.h> |
#include "font-8x16.h" |
#include "fb.h" |
450,7 → 451,8 |
for (row = 0; row < vport->rows; row++) { |
x = vport->x; |
for (col = 0; col < vport->cols; col++) { |
if ((row + lines >= 0) && (row + lines < vport->rows)) { |
if (((int) row + lines >= 0) && |
((int) row + lines < (int) vport->rows)) { |
xbp = &vport->backbuf[BB_POS(vport, col, row + lines)]; |
bbp = &vport->backbuf[BB_POS(vport, col, row)]; |
1066,10 → 1068,11 |
if (IPC_GET_ARG1(*call) == shm_id) { |
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
shm_size = IPC_GET_ARG2(*call); |
if (!ipc_answer_1(callid, EOK, (sysarg_t) dest)) |
shm = dest; |
else |
if (ipc_answer_1(callid, EOK, (sysarg_t) dest)) { |
shm_id = 0; |
return false; |
} |
shm = dest; |
if (shm[0] != 'P') |
return false; |
1644,6 → 1647,9 |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, vport->cols, vport->rows); |
continue; |
case FB_GET_COLOR_CAP: |
ipc_answer_1(callid, EOK, FB_CCAP_RGB); |
continue; |
case FB_SCROLL: |
scroll = IPC_GET_ARG1(call); |
if ((scroll > (int) vport->rows) || (scroll < (-(int) vport->rows))) { |
/branches/dd/uspace/srv/fb/ppm.c |
---|
89,7 → 89,7 |
{ |
unsigned int width, height; |
unsigned int maxcolor; |
int i; |
unsigned int i; |
unsigned int color; |
unsigned int coef; |
/branches/dd/uspace/srv/fb/ega.c |
---|
87,7 → 87,7 |
static void clrscr(void) |
{ |
int i; |
unsigned i; |
for (i = 0; i < scr_width * scr_height; i++) { |
scr_addr[i * 2] = ' '; |
129,7 → 129,8 |
static void scroll(int rows) |
{ |
int i; |
unsigned i; |
if (rows > 0) { |
memmove(scr_addr, ((char *) scr_addr) + rows * scr_width * 2, |
scr_width * scr_height * 2 - rows * scr_width * 2); |
318,6 → 319,9 |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, scr_width, scr_height); |
continue; |
case FB_GET_COLOR_CAP: |
ipc_answer_1(callid, EOK, FB_CCAP_INDEXED); |
continue; |
case FB_CLEAR: |
clrscr(); |
retval = 0; |
345,7 → 349,7 |
break; |
case FB_SCROLL: |
i = IPC_GET_ARG1(call); |
if (i > scr_height || i < -((int) scr_height)) { |
if (i > (int) scr_height || i < -((int) scr_height)) { |
retval = EINVAL; |
break; |
} |