blob: ccf74373457518d79554ee180a04563fca71c9d8 (
plain)
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
49
50
51
52
53
54
55
|
############################################################################
#
# File: mirroror.icn
#
# Subject: Program to mirror images given on command line
#
# Author: Ralph E. Griswold
#
# Date: February 2, 1999
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# To get from one image to another, type "n"; to quit, type "q". "s"
# produces a snapshot and "w" writes the name of the file.
#
############################################################################
#
# Requires: Version 9 graphics
#
############################################################################
#
# Links: interact, mirror, wopen
#
############################################################################
link interact
link mirror
link wopen
procedure main(args)
local name, win
every name := !args do {
WOpen("image=" || name, "canvas=hidden") | {
write(&errout, "*** cannot open ", image(name))
next
}
win := mirror(&window)
WAttrib(win, "canvas=normal", "label=" || name)
repeat case Event(win) of {
"n": break
"s": snapshot(win)
"q": exit()
"w": write(name) # write out file name
}
WClose(&window)
WClose(win)
&window := &null
}
end
|