From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/tty/ttystati.x | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sys/tty/ttystati.x (limited to 'sys/tty/ttystati.x') 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 +include +include +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 -- cgit