#include #include #include //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; tell_user_sz("Highway, Portland Command Shell, started.\n" "Type \"exit\" to quit.\n"); yield_task(); 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"); } }