add parser loop

This commit is contained in:
Matthias-Christian Ott 2008-06-08 21:17:02 +02:00
parent 19a38b1fd3
commit 62872197f8

13
std.c
View File

@ -312,5 +312,18 @@ main(int argc, char *argv[]) {
eprint("usage: st [-v]\n");
getpty();
shell();
fptm = fdopen(ptm, "r+");
if(!fptm)
eprintn("cannot open slave pty");
for(;;) {
c = getc(fptm);
switch(c) {
case '\033':
parseesc();
break;
default:
putchar(c);
}
}
return 0;
}