Generate interrupt key (according to terminal settings)
when user presses DEL.
This commit is contained in:
parent
ae89363c30
commit
38897b2053
4 changed files with 30 additions and 3 deletions
|
|
@ -117,3 +117,12 @@ setecho(int fd, int newe)
|
|||
}
|
||||
return old;
|
||||
}
|
||||
|
||||
int
|
||||
getintr(int fd)
|
||||
{
|
||||
if(tcgetattr(fd, &ttmode) < 0)
|
||||
return 0x7F;
|
||||
return ttmode.c_cc[VINTR];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue