diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
commit | 1e4a254674f668839e5de273916024c16814b045 (patch) | |
tree | 6774f4d4398a29c4aafb4120070975d864ffcde4 /src/user/highway/highway.c | |
parent | b8284137d4e0eec11c78bc14047243fce6a51373 (diff) | |
download | portland-os-1e4a254674f668839e5de273916024c16814b045.tar.gz |
(basic, not much tested) keyboard, better panic
Diffstat (limited to 'src/user/highway/highway.c')
-rw-r--r-- | src/user/highway/highway.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/user/highway/highway.c b/src/user/highway/highway.c new file mode 100644 index 0000000..effc131 --- /dev/null +++ b/src/user/highway/highway.c @@ -0,0 +1,21 @@ +#include <knob/user.h> +#include <knob/task.h> +#include <knob/block.h> + +//TODO: load a user environment file containing a PATH-like setting. +//TODO: have an active disk and/or directory + +void main() { + char path_buf[1024 + 4] = "BIN/"; + char *const line_buf = path_buf + 4; + while (1) { + tell_user_sz("> "); + ask_user_line_sz(line_buf, 1023); + if (blockequ(line_buf, "exit", 5)) + return; + if (try_run_command(path_buf)) + yield_task(); + else + tell_user_sz("An error occured trying to run that command.\n"); + } +}
\ No newline at end of file |