aboutsummaryrefslogtreecommitdiff
path: root/sys/mtio/mtfile.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/mtio/mtfile.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/mtio/mtfile.x')
-rw-r--r--sys/mtio/mtfile.x24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/mtio/mtfile.x b/sys/mtio/mtfile.x
new file mode 100644
index 00000000..c07a550b
--- /dev/null
+++ b/sys/mtio/mtfile.x
@@ -0,0 +1,24 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+define SZ_NODENAME 9
+
+# MTFILE -- Test a filename to see if it is the name of a magtape file.
+# A magtape file is characterized by the filename prefix "mt" (ingnoring
+# the nodename prefix if any).
+
+int procedure mtfile (fname)
+
+char fname[ARB] #I filename to be tested
+
+int ip, junk
+char nodename[SZ_NODENAME]
+int ki_extnode()
+
+begin
+ ip = ki_extnode (fname, nodename, SZ_NODENAME, junk) + 1
+
+ if (fname[ip] == 'm' && fname[ip+1] == 't')
+ return (YES)
+ else
+ return (NO)
+end