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 --- pkg/images/tv/iis/iism70/iistball.x | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkg/images/tv/iis/iism70/iistball.x (limited to 'pkg/images/tv/iis/iism70/iistball.x') 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 +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 -- cgit