commit: dc01596e6d7b81d52b805a3e8c16e47228325540
parent: 5d055fdc7cb441162f4ff5b67d0cbf6c58439d10
Author: Matthias-Christian Ott <ott@enolink.de>
Date: Sun, 8 Jun 2008 21:17:02 +0200
add parser loop
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/std.c b/std.c
@@ -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;
}