From 62872197f8b6bb49804eb8e3c900d4248a39e21e Mon Sep 17 00:00:00 2001 From: Matthias-Christian Ott Date: Sun, 8 Jun 2008 21:17:02 +0200 Subject: add parser loop --- std.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/std.c b/std.c index 0dae5c2..be3f41a 100644 --- 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; } -- cgit v1.2.3