diff options
Diffstat (limited to 'ipl/gprogs/mirroror.icn')
-rw-r--r-- | ipl/gprogs/mirroror.icn | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/ipl/gprogs/mirroror.icn b/ipl/gprogs/mirroror.icn new file mode 100644 index 0000000..ccf7437 --- /dev/null +++ b/ipl/gprogs/mirroror.icn @@ -0,0 +1,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 |