Changeset 171f9a1 in mainline for uspace/srv
- Timestamp:
- 2009-04-03T20:39:33Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cb01e1e
- Parents:
- 7a2c479
- Location:
- uspace/srv
- Files:
-
- 2 edited
-
console/console.c (modified) (2 diffs)
-
fb/fb.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/console/console.c
r7a2c479 r171f9a1 49 49 #include <sys/mman.h> 50 50 #include <stdio.h> 51 #include <string.h> 51 52 #include <sysinfo.h> 52 53 #include <event.h> … … 466 467 { 467 468 ipc_callid_t callid; 468 size_t len; 469 size_t i; 470 471 if (!ipc_data_write_receive(&callid, &len)) { 469 size_t size; 470 wchar_t ch; 471 size_t off; 472 473 if (!ipc_data_write_receive(&callid, &size)) { 472 474 ipc_answer_0(callid, EINVAL); 473 475 ipc_answer_0(rid, EINVAL); 474 476 } 475 477 476 if (len > CWRITE_BUF_SIZE) 477 len = CWRITE_BUF_SIZE; 478 479 (void) ipc_data_write_finalize(callid, cwrite_buf, len); 480 481 for (i = 0; i < len; i++) { 482 write_char(consnum, cwrite_buf[i]); 478 if (size > CWRITE_BUF_SIZE) 479 size = CWRITE_BUF_SIZE; 480 481 (void) ipc_data_write_finalize(callid, cwrite_buf, size); 482 483 off = 0; 484 while (off < size) { 485 ch = str_decode(cwrite_buf, &off, size); 486 write_char(consnum, ch); 483 487 } 484 488 485 489 gcons_notify_char(consnum); 486 ipc_answer_1(rid, EOK, len);490 ipc_answer_1(rid, EOK, size); 487 491 } 488 492 -
uspace/srv/fb/fb.c
r7a2c479 r171f9a1 69 69 #define DEFAULT_FGCOLOR 0x000000 70 70 71 #define GLYPH_UNAVAIL '?' 72 71 73 #define MAX_ANIM_LEN 8 72 74 #define MAX_ANIMATIONS 4 … … 79 81 /** Function to draw a glyph. */ 80 82 typedef void (*dg_t)(unsigned int x, unsigned int y, bool cursor, 81 uint8_t *glyphs, uint 8_t glyph, uint32_t fg_color, uint32_t bg_color);83 uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color); 82 84 83 85 struct { … … 670 672 /* Check glyph range. */ 671 673 if (glyph >= FONT_GLYPHS) 672 return;674 glyph = GLYPH_UNAVAIL; 673 675 674 676 /* … … 734 736 /* Check glyph range. */ 735 737 if (glyph >= FONT_GLYPHS) 736 return;738 glyph = GLYPH_UNAVAIL; 737 739 738 740 /* Pre-render 1x the foreground and background color pixels. */
Note:
See TracChangeset
for help on using the changeset viewer.
