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 /pkg/images/tv/iis/iism70/iistball.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/iis/iism70/iistball.x')
-rw-r--r-- | pkg/images/tv/iis/iism70/iistball.x | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/iism70/iistball.x b/pkg/images/tv/iis/iism70/iistball.x new file mode 100644 index 00000000..ebcc6566 --- /dev/null +++ b/pkg/images/tv/iis/iism70/iistball.x @@ -0,0 +1,41 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <mach.h> +include "iis.h" +include "../lib/ids.h" + +# IISTBALL -- Read, Write tball status to turn tball on/off + +procedure iistball (rw, data) + +short rw # read or write +short data[ARB] # the data + +int command,len +short status +int and(), or() + +include "iis.com" + +begin + len = 1 + call iishdr (IREAD, len, CURSOR+COMMAND, 0, 0, 0, 0) + call iisio (status, len * SZB_CHAR) + if ( rw == IDS_WRITE) { + command = IWRITE+VRETRACE + switch (data[1]) { + case IDS_OFF: + status = and (int(status), 177771B) + + case IDS_ON: + status = or ( int(status), 6) + } + call iishdr (command, 1, CURSOR+COMMAND, 0, 0, 0, 0) + call iisio (status, 1 * SZB_CHAR) + } else { + if ( and ( int(status), 6) == 0 ) + data[2] = IDS_OFF + else + data[2] = IDS_ON + } +end |