aboutsummaryrefslogtreecommitdiff
path: root/noao/imred/ccdred/src/setinteract.x
blob: 05bc0f71a68abe86a407ba5352659398d5825a6b (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
include	<pkg/xtanswer.h>

# SET_INTERACTIVE -- Set the interactive flag.  Query the user if necessary.
#
# This procedure initializes the interactive flag if there is no query.
# If there is a query it is issued by XT_ANSWER.   The four valued
# interactive flag is returned.

procedure set_interactive (query, interactive)

char	query[ARB]		# Query prompt
int	interactive		# Fit overscan interactively?  (returned)

int	interact		# Saves last value of interactive flag
bool	clgetb()

begin
	# If the query is null then initialize from the CL otherwise
	# query the user.  This response is four valued to allow the user
	# to turn off the query when processing multiple images.

	if (query[1] == EOS) {
	    if (clgetb ("interactive"))
	        interact = YES
	    else
	        interact = ALWAYSNO
	} else
	    call xt_answer (query, interact)

	interactive = interact
end