Changeset c738d65 in mainline for uspace/console/screenbuffer.c
- Timestamp:
- 2007-01-15T22:11:24Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d7baee6
- Parents:
- d78d603
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/console/screenbuffer.c
rd78d603 rc738d65 37 37 #include <unistd.h> 38 38 39 /** Store one character to screenbuffer. Its position is determined by scr->position_x and scr->position_y. 39 /** Store one character to screenbuffer. Its position is determined by 40 * scr->position_x and scr->position_y. 41 * 40 42 * @param scr screenbuffer 41 43 * @param c stored character … … 59 61 screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, int size_x, int size_y) 60 62 { 61 if ((scr->buffer = (keyfield_t *)malloc(sizeof(keyfield_t) * size_x * size_y)) == NULL) { 63 scr->buffer = (keyfield_t *) malloc(sizeof(keyfield_t) * size_x * size_y); 64 if (!scr->buffer) { 62 65 return NULL; 63 66 } … … 100 103 101 104 for (i = 0; i < scr->size_x; i++) { 102 scr->buffer[i + line *scr->size_x].character = ' ';103 scr->buffer[i + line *scr->size_x].style = scr->style;105 scr->buffer[i + line * scr->size_x].character = ' '; 106 scr->buffer[i + line * scr->size_x].style = scr->style; 104 107 } 105 108 } … … 143 146 /** @} 144 147 */ 145
Note:
See TracChangeset
for help on using the changeset viewer.