/branches/dd/uspace/app/bdsh/cmds/modules/bdd/bdd.c |
---|
28,7 → 28,6 |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include "config.h" |
#include "util.h" |
#include "errors.h" |
/branches/dd/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c |
---|
37,7 → 37,6 |
#include <sys/stat.h> |
#include <getopt.h> |
#include <stdarg.h> |
#include <string.h> |
#include "config.h" |
#include "errors.h" |
/branches/dd/uspace/app/bdsh/cmds/modules/rm/rm.c |
---|
34,8 → 34,6 |
#include <fcntl.h> |
#include <dirent.h> |
#include <getopt.h> |
#include <mem.h> |
#include <string.h> |
#include "config.h" |
#include "errors.h" |
/branches/dd/uspace/app/bdsh/cmds/modules/kcon/kcon.c |
---|
30,8 → 30,7 |
#include <stdio.h> |
#include <stdlib.h> |
#include <io/console.h> |
#include <vfs/vfs.h> |
#include <console.h> |
#include "config.h" |
#include "util.h" |
#include "errors.h" |
66,7 → 65,7 |
return CMD_FAILURE; |
} |
console_kcon_enable(fphone(stdout)); |
console_kcon_enable(); |
return CMD_SUCCESS; |
} |
/branches/dd/uspace/app/bdsh/cmds/modules/pwd/pwd.c |
---|
30,7 → 30,6 |
#include <stdio.h> |
#include <stdlib.h> |
#include <mem.h> |
#include "config.h" |
#include "errors.h" |
/branches/dd/uspace/app/bdsh/input.c |
---|
32,10 → 32,10 |
#include <stdio.h> |
#include <stdlib.h> |
#include <string.h> |
#include <io/console.h> |
#include <io/keycode.h> |
#include <io/style.h> |
#include <vfs/vfs.h> |
#include <io/stream.h> |
#include <console.h> |
#include <kbd/kbd.h> |
#include <kbd/keycode.h> |
#include <errno.h> |
#include <bool.h> |
100,7 → 100,7 |
static void read_line(char *buffer, int n) |
{ |
console_event_t ev; |
kbd_event_t ev; |
size_t offs, otmp; |
wchar_t dec; |
107,12 → 107,11 |
offs = 0; |
while (true) { |
fflush(stdout); |
if (!console_get_event(fphone(stdin), &ev)) |
if (kbd_get_event(&ev) < 0) |
return; |
if (ev.type != KEY_PRESS) |
if (ev.type == KE_RELEASE) |
continue; |
if (ev.key == KC_ENTER || ev.key == KC_NENTER) |
break; |
if (ev.key == KC_BACKSPACE) { |
132,8 → 131,9 |
continue; |
} |
if (ev.c >= ' ') { |
//putchar(ev.c); |
if (chr_encode(ev.c, buffer, &offs, n - 1) == EOK) |
putchar(ev.c); |
console_putchar(ev.c); |
} |
} |
putchar('\n'); |
147,9 → 147,9 |
{ |
char line[INPUT_MAX]; |
console_set_style(fphone(stdout), STYLE_EMPHASIS); |
console_set_style(STYLE_EMPHASIS); |
printf("%s", usr->prompt); |
console_set_style(fphone(stdout), STYLE_NORMAL); |
console_set_style(STYLE_NORMAL); |
read_line(line, INPUT_MAX); |
/* Make sure we don't have rubbish or a C/R happy user */ |
/branches/dd/uspace/app/bdsh/exec.c |
---|
123,8 → 123,7 |
if (tid == 0) { |
cli_error(CL_EEXEC, "Cannot spawn `%s'.", cmd); |
return 1; |
} else { |
return 0; |
} |
task_wait(tid); |
return 0; |
} |