Changes in uspace/srv/hid/fb/serial_console.c [4f14e1f8:7e752b2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/serial_console.c
r4f14e1f8 r7e752b2 39 39 40 40 #include <stdio.h> 41 #include <ipc/ipc.h> 41 42 #include <async.h> 42 43 #include <ipc/fb.h> … … 54 55 #define MAX_CONTROL 20 55 56 56 static sysarg_t scr_width;57 static sysarg_t scr_height;57 static ipcarg_t scr_width; 58 static ipcarg_t scr_height; 58 59 static bool color = true; /**< True if producing color output. */ 59 60 static bool utf8 = false; /**< True if producing UTF8 output. */ 60 61 static putc_function_t putc_function; 61 62 62 static sysarg_t lastcol = 0;63 static sysarg_t lastrow = 0;63 static ipcarg_t lastcol = 0; 64 static ipcarg_t lastrow = 0; 64 65 static attrs_t cur_attr = { 65 66 .t = at_style, … … 129 130 } 130 131 131 void serial_goto(const sysarg_t col, const sysarg_t row)132 void serial_goto(const ipcarg_t col, const ipcarg_t row) 132 133 { 133 134 if ((col > scr_width) || (row > scr_height)) … … 251 252 252 253 /** Set scrolling region. */ 253 void serial_set_scroll_region( sysarg_t last_row)254 void serial_set_scroll_region(ipcarg_t last_row) 254 255 { 255 256 char control[MAX_CONTROL]; … … 268 269 } 269 270 270 void serial_console_init(putc_function_t putc_fn, sysarg_t w, sysarg_t h)271 void serial_console_init(putc_function_t putc_fn, ipcarg_t w, ipcarg_t h) 271 272 { 272 273 scr_width = w; … … 285 286 * 286 287 */ 287 static void draw_text_data(keyfield_t *data, sysarg_t x0, sysarg_t y0,288 sysarg_t width, sysarg_t height)288 static void draw_text_data(keyfield_t *data, ipcarg_t x0, ipcarg_t y0, 289 ipcarg_t width, ipcarg_t height) 289 290 { 290 291 attrs_t *a0 = &data[0].attrs; 291 292 serial_set_attrs(a0); 292 293 293 sysarg_t y;294 ipcarg_t y; 294 295 for (y = 0; y < height; y++) { 295 296 serial_goto(x0, y0 + y); 296 297 297 sysarg_t x;298 ipcarg_t x; 298 299 for (x = 0; x < width; x++) { 299 300 attrs_t *attr = &data[y * width + x].attrs; … … 318 319 319 320 if (client_connected) { 320 async_answer_0(iid, ELIMIT);321 ipc_answer_0(iid, ELIMIT); 321 322 return; 322 323 } 323 324 324 325 client_connected = 1; 325 async_answer_0(iid, EOK);326 ipc_answer_0(iid, EOK); 326 327 327 328 /* Clear the terminal, set scrolling region … … 336 337 337 338 wchar_t c; 338 sysarg_t col;339 sysarg_t row;340 sysarg_t w;341 sysarg_t h;339 ipcarg_t col; 340 ipcarg_t row; 341 ipcarg_t w; 342 ipcarg_t h; 342 343 ssize_t rows; 343 344 344 345 int retval; 345 346 346 switch (IPC_GET_ IMETHOD(call)) {347 switch (IPC_GET_METHOD(call)) { 347 348 case IPC_M_PHONE_HUNGUP: 348 349 client_connected = 0; 349 async_answer_0(callid, EOK);350 ipc_answer_0(callid, EOK); 350 351 351 352 /* Exit thread */ … … 406 407 break; 407 408 case FB_GET_CSIZE: 408 async_answer_2(callid, EOK, scr_width, scr_height);409 ipc_answer_2(callid, EOK, scr_width, scr_height); 409 410 continue; 410 411 case FB_GET_COLOR_CAP: 411 async_answer_1(callid, EOK, color ? FB_CCAP_INDEXED :412 ipc_answer_1(callid, EOK, color ? FB_CCAP_INDEXED : 412 413 FB_CCAP_STYLE); 413 414 continue; … … 441 442 442 443 if (rows >= 0) { 443 if (( sysarg_t) rows > scr_height) {444 if ((ipcarg_t) rows > scr_height) { 444 445 retval = EINVAL; 445 446 break; 446 447 } 447 448 } else { 448 if (( sysarg_t) (-rows) > scr_height) {449 if ((ipcarg_t) (-rows) > scr_height) { 449 450 retval = EINVAL; 450 451 break; … … 477 478 retval = ENOENT; 478 479 } 479 async_answer_0(callid, retval);480 ipc_answer_0(callid, retval); 480 481 } 481 482 }
Note:
See TracChangeset
for help on using the changeset viewer.