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/tty/ttystati.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/tty/ttystati.x')
-rw-r--r-- | sys/tty/ttystati.x | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/tty/ttystati.x b/sys/tty/ttystati.x new file mode 100644 index 00000000..52578fba --- /dev/null +++ b/sys/tty/ttystati.x @@ -0,0 +1,37 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <syserr.h> +include <chars.h> +include <ttyset.h> +include "tty.h" + +# TTYSTATI -- Fetch a TTY parameter. + +int procedure ttystati (tty, parameter) + +pointer tty +int parameter +char parnum[3] +int value, junk, itoc() + +begin + switch (parameter) { + case TTY_PADCHAR: + value = T_PADCHAR(tty) + case TTY_TABS: + value = T_HTOK(tty) + case TTY_SOTYPE: + value = T_SOTYPE(tty) + case TTY_BAUD: + value = T_BAUD(tty) + case TTY_NLINES: + value = T_NLINES(tty) + case TTY_NCOLS: + value = T_NCOLS(tty) + default: + junk = itoc (parameter, parnum, 3) + call syserrs (SYS_TTYSTAT, parnum) + } + + return (value) +end |