summaryrefslogtreecommitdiff
path: root/ipl/gprogs/ipicker.icn
blob: 4ba61ae06e89651384343ff842f307245c016ebc (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
############################################################################
#
#	File:     ipicker.icn
#
#	Subject:  Program to print name of selected images
#
#	Author:   Ralph E. Griswold
#
#	Date:     August 13, 1995
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#  This program displays images listed on the command line and waits for
#  user input typed into the wnodw.  If the input is the letter "y",
#  the name of the image file is written to standard output.  If the
#  input is "q", the program terminates.  Other input is ignored.
#
############################################################################
#
#  Requires:  Version 9 graphics
#
############################################################################
#
#  Links:  wopen
#
############################################################################

link wopen

procedure main(args)
   local name

   every name := !args do {
      WClose(\&window)
      WOpen("image=" || name) | {
         write(&errout, "Can't open image ", image(name))
         next
         }
      case WReads(, 1) of {
         "y":  write(name)
         "q":  exit()
         }
      }

end