diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/fio/fstdfile.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/fstdfile.x')
-rw-r--r-- | sys/fio/fstdfile.x | 37 |
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 |