aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/iis/src/clear.x
blob: 60cf69eb277e1ac64c4efe47002ee30162c071b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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