Changeset 73878c1 in mainline
- Timestamp:
- 2009-06-03T19:30:19Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cbff4c2
- Parents:
- 36b8100a
- Location:
- uspace/app/bdsh
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/kcon/kcon.c
r36b8100a r73878c1 31 31 #include <stdio.h> 32 32 #include <stdlib.h> 33 #include < console.h>33 #include <io/console.h> 34 34 #include "config.h" 35 35 #include "util.h" … … 66 66 } 67 67 68 console_kcon_enable( );68 console_kcon_enable(fphone(stdout)); 69 69 70 70 return CMD_SUCCESS; -
uspace/app/bdsh/exec.c
r36b8100a r73878c1 124 124 cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd); 125 125 return 1; 126 } else {127 return 0;128 126 } 127 128 task_wait(tid); 129 return 0; 129 130 } -
uspace/app/bdsh/input.c
r36b8100a r73878c1 33 33 #include <stdlib.h> 34 34 #include <string.h> 35 #include <io/stream.h> 36 #include <console.h> 37 #include <kbd/kbd.h> 38 #include <kbd/keycode.h> 35 #include <io/console.h> 36 #include <io/keycode.h> 37 #include <io/style.h> 39 38 #include <errno.h> 40 39 #include <bool.h> … … 101 100 static void read_line(char *buffer, int n) 102 101 { 103 kbd_event_t ev;102 console_event_t ev; 104 103 size_t offs, otmp; 105 104 wchar_t dec; … … 108 107 while (true) { 109 108 fflush(stdout); 110 if ( kbd_get_event(&ev) < 0)109 if (!console_get_event(fphone(stdin), &ev)) 111 110 return; 112 if (ev.type == KE_RELEASE) 111 112 if (ev.type != KEY_PRESS) 113 113 continue; 114 114 115 115 if (ev.key == KC_ENTER || ev.key == KC_NENTER) 116 116 break; … … 132 132 } 133 133 if (ev.c >= ' ') { 134 //putchar(ev.c);135 134 if (chr_encode(ev.c, buffer, &offs, n - 1) == EOK) 136 console_putchar(ev.c);135 putchar(ev.c); 137 136 } 138 137 } … … 148 147 char line[INPUT_MAX]; 149 148 150 console_set_style( STYLE_EMPHASIS);149 console_set_style(fphone(stdout), STYLE_EMPHASIS); 151 150 printf("%s", usr->prompt); 152 console_set_style( STYLE_NORMAL);151 console_set_style(fphone(stdout), STYLE_NORMAL); 153 152 154 153 read_line(line, INPUT_MAX);
Note:
See TracChangeset
for help on using the changeset viewer.