Commit 9fa5293b authored by Eddie Kohler's avatar Eddie Kohler

sh: Ensure different lines are processed separately.

parent 93c30fa2
......@@ -12,6 +12,7 @@ void process_main() {
sys_kdisplay(KDISPLAY_NONE);
while (1) {
// print prompt, read line
ssize_t n = sys_write(1, "sh$ ", 4);
assert(n == 4);
......@@ -32,7 +33,8 @@ void process_main() {
while (s != end || word != words) {
// read a word
while (isspace((unsigned char) *s)) {
while (isspace((unsigned char) *s)
&& *s != '\n') {
++s;
}
char* wordstart = s;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment