summaryrefslogtreecommitdiff
path: root/h2pl
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:06:25 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:06:25 +0000
commite929a76b14922a7077596a747fc1fcd1bdd6b9ea (patch)
tree59ab0360573a58aff126a2dfa1d9666ae0fdb2ce /h2pl
parent00bf170e31343ccc4fac7a63f6a3acf5e76c3616 (diff)
downloadperl-e929a76b14922a7077596a747fc1fcd1bdd6b9ea.tar.gz
perl 3.0 patch #26 patch #19, continued
See patch #19.
Diffstat (limited to 'h2pl')
-rw-r--r--h2pl/eg/sysexits.pl16
-rw-r--r--h2pl/tcbreak17
-rw-r--r--h2pl/tcbreak217
3 files changed, 50 insertions, 0 deletions
diff --git a/h2pl/eg/sysexits.pl b/h2pl/eg/sysexits.pl
new file mode 100644
index 0000000000..f4cb777ee9
--- /dev/null
+++ b/h2pl/eg/sysexits.pl
@@ -0,0 +1,16 @@
+$EX_OK = 0x0;
+$EX__BASE = 0x40;
+$EX_USAGE = 0x40;
+$EX_DATAERR = 0x41;
+$EX_NOINPUT = 0x42;
+$EX_NOUSER = 0x43;
+$EX_NOHOST = 0x44;
+$EX_UNAVAILABLE = 0x45;
+$EX_SOFTWARE = 0x46;
+$EX_OSERR = 0x47;
+$EX_OSFILE = 0x48;
+$EX_CANTCREAT = 0x49;
+$EX_IOERR = 0x4A;
+$EX_TEMPFAIL = 0x4B;
+$EX_PROTOCOL = 0x4C;
+$EX_NOPERM = 0x4D;
diff --git a/h2pl/tcbreak b/h2pl/tcbreak
new file mode 100644
index 0000000000..2677cc982b
--- /dev/null
+++ b/h2pl/tcbreak
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+require 'cbreak.pl';
+
+&cbreak;
+
+$| = 1;
+
+print "gimme a char: ";
+
+$c = getc;
+
+print "$c\n";
+
+printf "you gave me `%s', which is 0x%02x\n", $c, ord($c);
+
+&cooked;
diff --git a/h2pl/tcbreak2 b/h2pl/tcbreak2
new file mode 100644
index 0000000000..fcbf926516
--- /dev/null
+++ b/h2pl/tcbreak2
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+require 'cbreak2.pl';
+
+&cbreak;
+
+$| = 1;
+
+print "gimme a char: ";
+
+$c = getc;
+
+print "$c\n";
+
+printf "you gave me `%s', which is 0x%02x\n", $c, ord($c);
+
+&cooked;