summaryrefslogtreecommitdiff
path: root/h2pl/getioctlsizes
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:01:53 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-08-08 17:01:53 +0000
commit154e51a4a1b0258759b5e901183403af515a35b9 (patch)
treede56925bf09e2d98ed44c60b3386d09cd675be3d /h2pl/getioctlsizes
parentff8e2863486f651339834bc9e3e0bd49d61ff4e1 (diff)
downloadperl-154e51a4a1b0258759b5e901183403af515a35b9.tar.gz
perl 3.0 patch #22 patch #19, continued
See patch #19.
Diffstat (limited to 'h2pl/getioctlsizes')
-rw-r--r--h2pl/getioctlsizes13
1 files changed, 13 insertions, 0 deletions
diff --git a/h2pl/getioctlsizes b/h2pl/getioctlsizes
new file mode 100644
index 0000000000..b7d4a0dfb5
--- /dev/null
+++ b/h2pl/getioctlsizes
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+open (IOCTLS,'/usr/include/sys/ioctl.h') || die "ioctl open failed";
+
+while (<IOCTLS>) {
+ if (/^\s*#\s*define\s+\w+\s+_IO(R|W|WR)\(\w+,\s*\w+,\s*([^)]+)/) {
+ $need{$2}++;
+ }
+}
+
+foreach $key ( sort keys %need ) {
+ print $key,"\n";
+}