aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/src/clear.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/images/tv/iis/src/clear.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/iis/src/clear.x')
-rw-r--r--pkg/images/tv/iis/src/clear.x48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkg/images/tv/iis/src/clear.x b/pkg/images/tv/iis/src/clear.x
new file mode 100644
index 00000000..60cf69eb
--- /dev/null
+++ b/pkg/images/tv/iis/src/clear.x
@@ -0,0 +1,48 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <ctotok.h>
+include <ctype.h>
+include "../lib/ids.h"
+
+# CLEAR -- clear certain frames in the display
+
+procedure clear()
+
+char token[SZ_LINE]
+int tok
+short frames[IDS_MAXIMPL+1]
+
+define nexttok 10
+
+include "cv.com"
+
+begin
+ call gargtok (tok, token, SZ_LINE)
+ call strlwr (token)
+
+ while ( (tok == TOK_IDENTIFIER) || (tok == TOK_NUMBER) ) {
+ if (tok == TOK_IDENTIFIER) {
+ switch (token[1]) {
+ case 'a', 'g':
+ # all colors
+ call cvclearg (short(IDS_EOD), short (IDS_EOD))
+ if (token[1] == 'g')
+ goto nexttok
+ frames[1] = IDS_EOD
+
+ case 'f':
+ call cv_frame (token[2], frames)
+ }
+ } else
+ call cv_frame (token[1], frames)
+
+ call cvcleari (frames)
+ if (token[1] == 'a')
+ return
+
+ # get next token
+nexttok
+ call gargtok (tok, token, SZ_LINE)
+ call strlwr (token)
+ }
+end