mirror of
https://github.com/alrayyes/st.git
synced 2024-11-25 20:36:23 +00:00
add parser loop
This commit is contained in:
parent
5d055fdc7c
commit
dc01596e6d
1 changed files with 13 additions and 0 deletions
13
std.c
13
std.c
|
@ -312,5 +312,18 @@ main(int argc, char *argv[]) {
|
||||||
eprint("usage: st [-v]\n");
|
eprint("usage: st [-v]\n");
|
||||||
getpty();
|
getpty();
|
||||||
shell();
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue