diff options
author | Matthias-Christian Ott <ott@enolink.de> | 2008-06-08 21:17:02 +0200 |
---|---|---|
committer | Matthias-Christian Ott <ott@enolink.de> | 2008-06-08 21:17:02 +0200 |
commit | 62872197f8b6bb49804eb8e3c900d4248a39e21e (patch) | |
tree | 8ab42193c88a056a0f086ca47672c02d2e189b50 /std.c | |
parent | 19a38b1fd38fc2f3f288f7769e89d055e5a49ad6 (diff) | |
download | st-62872197f8b6bb49804eb8e3c900d4248a39e21e.tar.gz st-62872197f8b6bb49804eb8e3c900d4248a39e21e.tar.bz2 |
add parser loop
Diffstat (limited to 'std.c')
-rw-r--r-- | std.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; } |