aboutsummaryrefslogtreecommitdiff
path: root/sys/fio/fstdfile.x
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fio/fstdfile.x')
-rw-r--r--sys/fio/fstdfile.x37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/fio/fstdfile.x b/sys/fio/fstdfile.x
new file mode 100644
index 00000000..b3f570a9
--- /dev/null
+++ b/sys/fio/fstdfile.x
@@ -0,0 +1,37 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# FSTDFILE -- Determine if the named file is a standard stream, and if so,
+# return its file descriptor.
+
+int procedure fstdfile (fname, ofd)
+
+char fname[ARB]
+int ofd
+bool streq()
+
+begin
+ ofd = NULL
+
+ if (fname[1] != 'S' || fname[2] != 'T') {
+ return (NO)
+ } else if (streq (fname, "STDIN")) {
+ ofd = STDIN
+ return (YES)
+ } else if (streq (fname, "STDOUT")) {
+ ofd = STDOUT
+ return (YES)
+ } else if (streq (fname, "STDERR")) {
+ ofd = STDERR
+ return (YES)
+ } else if (streq (fname, "STDGRAPH")) {
+ ofd = STDGRAPH
+ return (YES)
+ } else if (streq (fname, "STDIMAGE")) {
+ ofd = STDIMAGE
+ return (YES)
+ } else if (streq (fname, "STDPLOT")) {
+ ofd = STDPLOT
+ return (YES)
+ } else
+ return (NO)
+end