Generate interrupt key (according to terminal settings)

when user presses DEL.
This commit is contained in:
rsc 2005-08-11 16:43:37 +00:00
parent ae89363c30
commit 38897b2053
4 changed files with 30 additions and 3 deletions

View file

@ -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];
}