Changeset cddcc4a3 in mainline for uspace/srv/hid/console/console.c
- Timestamp:
- 2012-08-14T18:16:39Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 669f5cae
- Parents:
- 76d92db1 (diff), 4802dd7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
r76d92db1 rcddcc4a3 617 617 618 618 size_t pos = 0; 619 619 620 620 /* 621 621 * Read input from keyboard and copy it to the buffer. … … 628 628 buf[pos] = cons->char_remains[0]; 629 629 pos++; 630 630 631 /* Unshift the array. */ 631 for (size_t i = 1; i < cons->char_remains_len; i++) {632 for (size_t i = 1; i < cons->char_remains_len; i++) 632 633 cons->char_remains[i - 1] = cons->char_remains[i]; 633 }634 634 635 cons->char_remains_len--; 635 636 } 637 636 638 /* Still not enough? Then get another key from the queue. */ 637 639 if (pos < size) { 638 640 link_t *link = prodcons_consume(&cons->input_pc); 639 641 kbd_event_t *event = list_get_instance(link, kbd_event_t, link); 640 642 641 643 /* Accept key presses of printable chars only. */ 642 644 if ((event->type == KEY_PRESS) && (event->c != 0)) { … … 645 647 cons->char_remains_len = str_size(cons->char_remains); 646 648 } 647 649 648 650 free(event); 649 651 }
Note:
See TracChangeset
for help on using the changeset viewer.