Rev 4296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4296 | Rev 4420 | ||
---|---|---|---|
Line 243... | Line 243... | ||
243 | count_t position = 0; |
243 | count_t position = 0; |
244 | wchar_t *current = history[history_pos]; |
244 | wchar_t *current = history[history_pos]; |
245 | current[0] = 0; |
245 | current[0] = 0; |
246 | 246 | ||
247 | while (true) { |
247 | while (true) { |
248 | wchar_t ch = _getc(indev); |
248 | wchar_t ch = indev_pop_character(indev); |
249 | 249 | ||
250 | if (ch == '\n') { |
250 | if (ch == '\n') { |
251 | /* Enter */ |
251 | /* Enter */ |
252 | putchar(ch); |
252 | putchar(ch); |
253 | break; |
253 | break; |
Line 580... | Line 580... | ||
580 | char *buf; |
580 | char *buf; |
581 | switch (cmd->argv[i].type) { |
581 | switch (cmd->argv[i].type) { |
582 | case ARG_TYPE_STRING: |
582 | case ARG_TYPE_STRING: |
583 | buf = (char *) cmd->argv[i].buffer; |
583 | buf = (char *) cmd->argv[i].buffer; |
584 | str_ncpy(buf, cmd->argv[i].len, cmdline + start, |
584 | str_ncpy(buf, cmd->argv[i].len, cmdline + start, |
585 | (end - start) + 1); |
585 | end - start); |
586 | break; |
586 | break; |
587 | case ARG_TYPE_INT: |
587 | case ARG_TYPE_INT: |
588 | if (!parse_int_arg(cmdline + start, end - start, |
588 | if (!parse_int_arg(cmdline + start, end - start, |
589 | &cmd->argv[i].intval)) |
589 | &cmd->argv[i].intval)) |
590 | error = true; |
590 | error = true; |
Line 651... | Line 651... | ||
651 | 651 | ||
652 | if (msg) |
652 | if (msg) |
653 | printf("%s", msg); |
653 | printf("%s", msg); |
654 | 654 | ||
655 | if (kcon) |
655 | if (kcon) |
656 | _getc(stdin); |
656 | indev_pop_character(stdin); |
657 | else |
657 | else |
658 | printf("Type \"exit\" to leave the console.\n"); |
658 | printf("Type \"exit\" to leave the console.\n"); |
659 | 659 | ||
660 | while (true) { |
660 | while (true) { |
661 | wchar_t *tmp = clever_readline((char *) prompt, stdin); |
661 | wchar_t *tmp = clever_readline((char *) prompt, stdin); |