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/gio/cursor/gtrredraw.x | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sys/gio/cursor/gtrredraw.x (limited to 'sys/gio/cursor/gtrredraw.x') diff --git a/sys/gio/cursor/gtrredraw.x b/sys/gio/cursor/gtrredraw.x new file mode 100644 index 00000000..ca2191b3 --- /dev/null +++ b/sys/gio/cursor/gtrredraw.x @@ -0,0 +1,48 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include "gtr.h" + +# GTR_REDRAW -- Redraw the screen from the metacode spooled in the frame +# buffer. + +procedure gtr_redraw (stream) + +int stream # graphics stream to be redrawn + +pointer tr, ip_save, op_save +pointer gtr_init() +errchk gtr_init + +begin + tr = gtr_init (stream) + + if (TR_SPOOLDATA(tr) == YES && TR_OP(tr) > TR_FRAMEBUF(tr)) { + # Rewind the input pointer into the frame buffer. + TR_IP(tr) = TR_FRAMEBUF(tr) + + # Redraw frame buffer. + call gki_clear (stream) + call giotr (stream) + + # Redraw scratch buffer (axes). Set i/o pointers to the scratch + # buffer and draw its contents. Turn off interrupts to prevent + # an interrupt from leaving the pointers pointing to the wrong + # buffer. + + if (TR_OPSB(tr) > TR_SCRATCHBUF(tr)) { + call intr_disable() + ip_save = TR_IP(tr); TR_IP(tr) = TR_SCRATCHBUF(tr) + op_save = TR_OP(tr); TR_OP(tr) = TR_OPSB(tr) + + call giotr (stream) + + TR_IP(tr) = ip_save + TR_OP(tr) = op_save + call intr_enable() + } + + # Flush graphics output. + call gki_flush (stream) + } +end -- cgit