summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/h2pl/cbreak2.pl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/h2pl/cbreak2.pl')
-rw-r--r--contrib/perl5/h2pl/cbreak2.pl33
1 files changed, 0 insertions, 33 deletions
diff --git a/contrib/perl5/h2pl/cbreak2.pl b/contrib/perl5/h2pl/cbreak2.pl
deleted file mode 100644
index 8ac55a3..0000000
--- a/contrib/perl5/h2pl/cbreak2.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-$sgttyb_t = 'C4 S';
-
-sub cbreak {
- &set_cbreak(1);
-}
-
-sub cooked {
- &set_cbreak(0);
-}
-
-sub set_cbreak {
- local($on) = @_;
-
- require 'sys/ioctl.pl';
-
- ioctl(STDIN,$TIOCGETP,$sgttyb)
- || die "Can't ioctl TIOCGETP: $!";
-
- @ary = unpack($sgttyb_t,$sgttyb);
- if ($on) {
- $ary[4] |= $CBREAK;
- $ary[4] &= ~$ECHO;
- } else {
- $ary[4] &= ~$CBREAK;
- $ary[4] |= $ECHO;
- }
- $sgttyb = pack($sgttyb_t,@ary);
- ioctl(STDIN,$TIOCSETP,$sgttyb)
- || die "Can't ioctl TIOCSETP: $!";
-
-}
-
-1;
OpenPOWER on IntegriCloud