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 | dc01596e6d7b81d52b805a3e8c16e47228325540 (patch) | |
tree | 8ab42193c88a056a0f086ca47672c02d2e189b50 /std.c | |
parent | 5d055fdc7cb441162f4ff5b67d0cbf6c58439d10 (diff) | |
download | st-dc01596e6d7b81d52b805a3e8c16e47228325540.tar.gz st-dc01596e6d7b81d52b805a3e8c16e47228325540.zip |
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[]) { | |||
312 | eprint("usage: st [-v]\n"); | 312 | eprint("usage: st [-v]\n"); |
313 | getpty(); | 313 | getpty(); |
314 | shell(); | 314 | shell(); |
315 | fptm = fdopen(ptm, "r+"); | ||
316 | if(!fptm) | ||
317 | eprintn("cannot open slave pty"); | ||
318 | for(;;) { | ||
319 | c = getc(fptm); | ||
320 | switch(c) { | ||
321 | case '\033': | ||
322 | parseesc(); | ||
323 | break; | ||
324 | default: | ||
325 | putchar(c); | ||
326 | } | ||
327 | } | ||
315 | return 0; | 328 | return 0; |
316 | } | 329 | } |