aboutsummaryrefslogtreecommitdiff
path: root/sys/mtio/mtfile.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/mtio/mtfile.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
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