blob: b3f570a9d41844d3804611ab48f5643851974be0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|