51,9 → 51,10 |
#include <ipc/services.h> |
#include <kernel/errno.h> |
#include <kernel/genarch/fb/visuals.h> |
#include <console/color.h> |
#include <console/style.h> |
#include <io/color.h> |
#include <io/style.h> |
#include <async.h> |
#include <fibril.h> |
#include <bool.h> |
|
#include "font-8x16.h" |
375,8 → 376,8 |
*/ |
static void vport_redraw(viewport_t *vport) |
{ |
unsigned int col; |
unsigned int row; |
unsigned int col; |
|
for (row = 0; row < vport->rows; row++) { |
for (col = 0; col < vport->cols; col++) { |
431,8 → 432,8 |
*/ |
static void vport_scroll(viewport_t *vport, int lines) |
{ |
unsigned int col; |
unsigned int row; |
unsigned int col; |
unsigned int x; |
unsigned int y; |
uint32_t glyph; |
449,7 → 450,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)]; |
|
1038,8 → 1040,8 |
* |
* @return false if the call was not handled byt this function, true otherwise |
* |
* Note: this function is not threads safe, you would have |
* to redefine static variables with __thread |
* Note: this function is not thread-safe, you would have |
* to redefine static variables with fibril_local. |
* |
*/ |
static bool shm_handle(ipc_callid_t callid, ipc_call_t *call, int vp) |
1564,7 → 1566,7 |
unsigned int i; |
int scroll; |
wchar_t ch; |
unsigned int row, col; |
unsigned int col, row; |
|
if ((vport->cursor_active) || (anims_enabled)) |
callid = async_get_call_timeout(&call, 250000); |
1601,8 → 1603,8 |
|
case FB_PUTCHAR: |
ch = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
col = IPC_GET_ARG3(call); |
col = IPC_GET_ARG2(call); |
row = IPC_GET_ARG3(call); |
|
if ((col >= vport->cols) || (row >= vport->rows)) { |
retval = EINVAL; |
1620,8 → 1622,8 |
retval = EOK; |
break; |
case FB_CURSOR_GOTO: |
row = IPC_GET_ARG1(call); |
col = IPC_GET_ARG2(call); |
col = IPC_GET_ARG1(call); |
row = IPC_GET_ARG2(call); |
|
if ((col >= vport->cols) || (row >= vport->rows)) { |
retval = EINVAL; |
1641,7 → 1643,7 |
retval = EOK; |
break; |
case FB_GET_CSIZE: |
ipc_answer_2(callid, EOK, vport->rows, vport->cols); |
ipc_answer_2(callid, EOK, vport->cols, vport->rows); |
continue; |
case FB_SCROLL: |
scroll = IPC_GET_ARG1(call); |