From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- 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