v06i073: Scantool -- Read from a scanner, Part03/03

Rich Burridge richb at Aus
Thu Apr 12 19:13:46 AEST 1990


Submitted-by: richb at Aus (Rich Burridge)
Posting-number: Volume 6, Issue 73
Archive-name: xscan/part03

------CUT HERE------Part3of3------CUT HERE------

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix at uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
#		"End of archive 3 (of 3)."
# Contents:  scantool/CHANGES scantool/Imakefile scantool/README
#   scantool/black.codes scantool/button.invert.icon
#   scantool/button.normal.icon scantool/exclaim.icon
#   scantool/frame.cursor scantool/help.cursor scantool/images.h
#   scantool/main.cursor scantool/patchlevel.h scantool/scan.1
#   scantool/scan.h scantool/scantool.h scantool/scantool.help
#   scantool/scantool.icon scantool/scantool_extern.h
#   scantool/switch.invert.cursor scantool/white.codes
# Wrapped by argv at turnpike on Thu Apr 12 02:08:25 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'scantool/CHANGES' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/CHANGES'\"
else
echo shar: Extracting \"'scantool/CHANGES'\" \(2171 characters\)
sed "s/^X//" >'scantool/CHANGES' <<'END_OF_FILE'
XScantool change history.
X------------------------
X
Xv1.4 - patchlevel 0. - 2nd April 1990.
X
X       * First freely available version.
X
X       * Includes new XView graphics driver.
X
X       * Scanning process is now a separate program.
X
Xv1.4 - patchlevel 1. - 3rd April 1990.
X
X       * Added a SIGKILL signal handler to the scan program, so that an
X         ETX character can be sent to the scanner to terminate correctly.
X
X       * Added a destroy handler to the scantool program, so that if we
X         were scanning, then the child scan process can be properly killed.
X
X       * Scantool buttons now correctly invert.
X
X       * WIN_STOP events are now correctly handled with the SunView version.
X
X       * The switches have been changed to be check boxes and not panel
X         choice items.
X
Xv1.4 - patchlevel 2 - 4th April 1990.        (Apply with patch -N).
X
X       * The definitions for the bold and normal fonts were the wrong way
X         around in the XView graphics driver.
X
X       * The rasterop function for all the cursors has been set to the
X         default.
X
X       * The infinite testing loop in scan.c has been removed.
X
X       * The use of the Stop (L1) function key has been replaced with a
X         special Cancel button. WIN_STOP events don't appear to be handled
X         correctly under XView.
X
X       * The checkbox switches were not being ropped to the canvas correctly
X         with the XView version.
X
X       * The input focus was not being set to the scantool canvas when the
X         mouse entered it with the XView version.
X
X       * The width of the fonts used under SunView and XView are different,
X         so the definition FONT_WIDTH has been removed and replaced with a
X         variable font_width.
X
X       * The line "cursor" used in the Set picture name routine is now
X         positioned using get_strwidth instead of being hard-wired.
X
X       * Cursors can now be correctly set with the XView version.
X
Xv1.4 - patchlevel 3 - 10th April 1990.
X
X       * Fixed up the XView version for creating a new scanning frame.
X
X       * Changed the rasterop function for ropgc from GXor to GXcopy.
X         Button inversion now works correctly.
END_OF_FILE
if test 2171 -ne `wc -c <'scantool/CHANGES'`; then
    echo shar: \"'scantool/CHANGES'\" unpacked with wrong size!
fi
# end of 'scantool/CHANGES'
fi
if test -f 'scantool/Imakefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/Imakefile'\"
else
echo shar: Extracting \"'scantool/Imakefile'\" \(1059 characters\)
sed "s/^X//" >'scantool/Imakefile' <<'END_OF_FILE'
X#
X#  @(#)Imakefile 1.2 90/04/12
X#
X#  Copyright (c) Rich Burridge - Sun Microsystems Australia.
X#                                Al rights reservered.
X#
X#  Permission is given to distribute these sources, as long as the
X#  copyright messages are not removed, and no monies are exchanged.
X#
X#  No responsibility is taken for any errors inherent either in the comments
X#  or the code of this program, but if reported to me then an attempt will
X#  be made to fix them.
X
XLIBRARY_DEST = /home/openwin/usr/lib
XHEADER_DEST = /home/openwin/usr/include
X
XPROGRAMS = scantool scan
XHELPNAME = -DHELPNAME=\"$(LIBDIR)/scantool.help\"
X
XDEFINES = $(HELPNAME) $(SELTYPE) $(SIGRET)
X
XINCLUDES = -I$(HEADER_DEST) $(DEFINES)
XDEPLIBS =
XLOCAL_LIBRARIES =  $(LIBRARY_DEST)/libxview.a $(LIBRARY_DEST)/libolgx.a \
X		   $(LIBRARY_DEST)/libX11.a -lpixrect
X
XSRCS = scantool.c graphics.c misc.c xview.c
XOBJS = scantool.o graphics.o misc.o xview.o
X
XSRCS2 = scan.c scan_compress.c
XOBJS2 = scan.o scan_compress.o
X
XComplexProgramTarget(scantool)
XSingleProgramTarget(scan, $(OBJS2), /**/, /**/)
END_OF_FILE
if test 1059 -ne `wc -c <'scantool/Imakefile'`; then
    echo shar: \"'scantool/Imakefile'\" unpacked with wrong size!
fi
# end of 'scantool/Imakefile'
fi
if test -f 'scantool/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/README'\"
else
echo shar: Extracting \"'scantool/README'\" \(2832 characters\)
sed "s/^X//" >'scantool/README' <<'END_OF_FILE'
X
XThis is version 1.4 of the scantool program. It can interface to a Microtek
XMS300A scanner, scan the document, and turn the image into a Sun rasterfile,
Xwhich can be read by dtp programs such as Frame Maker.
X
XPermission is given to distribute these sources, as long as the copyright
Xnotices are not removed, and no monies are exchanged.
X
XFixes and improvements in version 1.4 include:
X
X  +Fixed the exhaustion of file descriptors problem.
X  +All values from the Grain and Resolution menus are now selectable.
X  +All scans now produce valid scanning frames.
X  +Compressed scans now fully work.
X  +Format of the rasterfiles has been changed from RT_OLD to RT_STANDARD.
X  +Show option has been added.
X  +The RETURN key is now also valid for the confirm popup.
X  +Window resizing is prevented.
X  +Graphics code has been isolated and program has been generally tidyed up.
X  +Support for SunOS v3.x and SunOS v4.x
X  +The scanning operation has been separated out into a second program.
X  +Inclusion of an XView graphics driver.
X
XThe software is now divided into two programs; scantool a frontend window
Xbased program for setting the scanning options, and scan, the program that
Xwill actually perform the scan. It should also be possible to run this
Xscan program on it's own, but there are several command line options to
Xsetup, so it's probably easier through scantool.
X
X**IMPORTANT NOTE**
X
XI no longer have access to a Microtek MS300A scanner. If you find problems
Xin this area, then you are on your own. I will be very happy to incorporate
Xany fixes you make, so other people can enjoy them as well.
X
XInstallation.
X-------------
X
XFirstly you should look at the beginning of the Makefile to see if you need
Xto tweak any of the initial definitions there. If you are generating a SunView
Xversion under SunOS v4.0.x, then this is unlikely.
X
XNext you either select "make sunview" or "make xview", to generate the
Xversion you require. This should be followed by a "make install" and a
X"make clean".
X
XThe program currently assumes the scanner is attached to the Sun's A or B
XRS232 port. A serial cable will be needed to run between the scanner and the
XSun. I have used the following setup in the past:
X
X         MS-300A                           SUN
X      ------------                     ----------
X    Pin No.    Name      Direction     Pin No.    Name
X   ---------  ------  --------------  ---------  ------
X       2       TXD    Scanner to Sun      3       RXD
X       3       RXD    Sun to scanner      2       TXD
X       7       GND        ---             7       GND
X
XSuggestions for furthur improvement would be most welcome, plus bugs,
Xcomments and flames.
X
XRich Burridge,          DOMAIN: richb at Aus.Sun.COM
XPHONE: +61 2 413 2666   ACSNET: richb at sunaus.sun.oz
X                        UUCP:   {uunet,mcvax,ukc}!munnari!sunaus.oz!richb
END_OF_FILE
if test 2832 -ne `wc -c <'scantool/README'`; then
    echo shar: \"'scantool/README'\" unpacked with wrong size!
fi
# end of 'scantool/README'
fi
if test -f 'scantool/black.codes' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/black.codes'\"
else
echo shar: Extracting \"'scantool/black.codes'\" \(2184 characters\)
sed "s/^X//" >'scantool/black.codes' <<'END_OF_FILE'
X    0     0000110111
X    1            010
X    2             11
X    3             10
X    4            011
X    5           0011
X    6           0010
X    7          00011
X    8         000101
X    9         000100
X   10        0000100
X   11        0000101
X   12        0000111
X   13       00000100
X   14       00000111
X   15      000011000
X   16     0000010111
X   17     0000011000
X   18     0000001000
X   19    00001100111
X   20    00001101000
X   21    00001101100
X   22    00000110111
X   23    00000101000
X   24    00000010111
X   25    00000011000
X   26   000011001010
X   27   000011001011
X   28   000011001100
X   29   000011001101
X   30   000001101000
X   31   000001101001
X   32   000001101010
X   33   000001101011
X   34   000011010010
X   35   000011010011
X   36   000011010100
X   37   000011010101
X   38   000011010110
X   39   000011010111
X   40   000001101100
X   41   000001101101
X   42   000011011010
X   43   000011011011
X   44   000001010100
X   45   000001010101
X   46   000001010110
X   47   000001010111
X   48   000001100100
X   49   000001100101
X   50   000001010010
X   51   000001010011
X   52   000000100100
X   53   000000110111
X   54   000000111000
X   55   000000100111
X   56   000000101000
X   57   000001011000
X   58   000001011001
X   59   000000101011
X   60   000000101100
X   61   000001011010
X   62   000001100110
X   63   000001100111
X   64     0000001111
X  128   000011001000
X  192   000011001001
X  256   000001011011
X  320   000000110011
X  384   000000110100
X  448   000000110101
X  512  0000001101100
X  576  0000001101101
X  640  0000001001010
X  704  0000001001011
X  768  0000001001100
X  832  0000001001101
X  896  0000001110010
X  960  0000001110011
X 1024  0000001110100
X 1088  0000001110101
X 1152  0000001110110
X 1216  0000001110111
X 1280  0000001010010
X 1344  0000001010011
X 1408  0000001010100
X 1472  0000001010101
X 1536  0000001011010
X 1600  0000001011011
X 1664  0000001100100
X 1728  0000001100101
X 1792    00000001000
X 1856    00000001100
X 1920    00000001101
X 1984   000000010010
X 2048   000000010011
X 2112   000000010100
X 2176   000000010101
X 2240   000000010110
X 2304   000000010111
X 2368   000000011100
X 2432   000000011101
X 2496   000000011110
X   -1   000000000001
END_OF_FILE
if test 2184 -ne `wc -c <'scantool/black.codes'`; then
    echo shar: \"'scantool/black.codes'\" unpacked with wrong size!
fi
# end of 'scantool/black.codes'
fi
if test -f 'scantool/button.invert.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/button.invert.icon'\"
else
echo shar: Extracting \"'scantool/button.invert.icon'\" \(1933 characters\)
sed "s/^X//" >'scantool/button.invert.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x03FF,0xFFFF,0xFFFF,0xFFC0,0x0C00,0x0000,0x0000,0x0030,
X	0x1000,0x0000,0x0000,0x0008,0x23FF,0xFFFF,0xFFFF,0xFFC4,
X	0x47FF,0xFFFF,0xFFFF,0xFFE2,0x4FFF,0xFFFF,0xFFFF,0xFFF2,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFF3,
X	0x9FFF,0xFFFF,0xFFFF,0xFFF3,0x9FFF,0xFFFF,0xFFFF,0xFFE7,
X	0x4FFF,0xFFFF,0xFFFF,0xFFE6,0x47FF,0xFFFF,0xFFFF,0xFFCE,
X	0x2000,0x0000,0x0000,0x001C,0x1000,0x0000,0x0000,0x0038,
X	0x0FFF,0xFFFF,0xFFFF,0xFFF0,0x03FF,0xFFFF,0xFFFF,0xFFC0,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
END_OF_FILE
if test 1933 -ne `wc -c <'scantool/button.invert.icon'`; then
    echo shar: \"'scantool/button.invert.icon'\" unpacked with wrong size!
fi
# end of 'scantool/button.invert.icon'
fi
if test -f 'scantool/button.normal.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/button.normal.icon'\"
else
echo shar: Extracting \"'scantool/button.normal.icon'\" \(1933 characters\)
sed "s/^X//" >'scantool/button.normal.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x03FF,0xFFFF,0xFFFF,0xFFC0,0x0C00,0x0000,0x0000,0x0030,
X	0x1000,0x0000,0x0000,0x0008,0x2000,0x0000,0x0000,0x0004,
X	0x4000,0x0000,0x0000,0x0002,0x4000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0003,
X	0x8000,0x0000,0x0000,0x0003,0x8000,0x0000,0x0000,0x0007,
X	0x4000,0x0000,0x0000,0x0006,0x4000,0x0000,0x0000,0x000E,
X	0x2000,0x0000,0x0000,0x001C,0x1000,0x0000,0x0000,0x0038,
X	0x0FFF,0xFFFF,0xFFFF,0xFFF0,0x03FF,0xFFFF,0xFFFF,0xFFC0,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
END_OF_FILE
if test 1933 -ne `wc -c <'scantool/button.normal.icon'`; then
    echo shar: \"'scantool/button.normal.icon'\" unpacked with wrong size!
fi
# end of 'scantool/button.normal.icon'
fi
if test -f 'scantool/exclaim.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/exclaim.icon'\"
else
echo shar: Extracting \"'scantool/exclaim.icon'\" \(1933 characters\)
sed "s/^X//" >'scantool/exclaim.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0xFFFF,0xFFF0,0x0000,0x0000,0x8000,0x0010,0x0000,0x0000,
X	0x8000,0x0010,0x0000,0x0000,0x801F,0xF810,0x0000,0x0000,
X	0x8020,0x0410,0x0000,0x0000,0x8040,0x0210,0x0000,0x0000,
X	0x8080,0x0110,0x0000,0x0000,0x8100,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8100,0x0090,0x0000,0x0000,
X	0x8103,0x0090,0x0000,0x0000,0x8103,0x0090,0x0000,0x0000,
X	0x8300,0x0090,0x0000,0x0000,0xFE00,0x0110,0x0000,0x0000,
X	0x9000,0x0210,0x0000,0x0000,0x9FFF,0xFC10,0x0000,0x0000,
X	0x8000,0x0010,0x0000,0x0000,0x8000,0x0010,0x0000,0x0000,
X	0x8000,0x0010,0x0000,0x0000,0xFFFF,0xFFF0,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
END_OF_FILE
if test 1933 -ne `wc -c <'scantool/exclaim.icon'`; then
    echo shar: \"'scantool/exclaim.icon'\" unpacked with wrong size!
fi
# end of 'scantool/exclaim.icon'
fi
if test -f 'scantool/frame.cursor' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/frame.cursor'\"
else
echo shar: Extracting \"'scantool/frame.cursor'\" \(193 characters\)
sed "s/^X//" >'scantool/frame.cursor' <<'END_OF_FILE'
X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
X */
X	0x0100,0x0100,0x0100,0x1390,0x0C60,0x0820,0x1010,0xF01E,
X	0x1010,0x0820,0x0C60,0x1390,0x0100,0x0100,0x0100,0x0000
END_OF_FILE
if test 193 -ne `wc -c <'scantool/frame.cursor'`; then
    echo shar: \"'scantool/frame.cursor'\" unpacked with wrong size!
fi
# end of 'scantool/frame.cursor'
fi
if test -f 'scantool/help.cursor' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/help.cursor'\"
else
echo shar: Extracting \"'scantool/help.cursor'\" \(193 characters\)
sed "s/^X//" >'scantool/help.cursor' <<'END_OF_FILE'
X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
X */
X	0xFFFF,0x8001,0xBFFD,0xA005,0xA385,0xA445,0xA445,0xA085,
X	0xA105,0xA105,0xA005,0xA105,0xA005,0xBFFD,0x8001,0xFFFF
END_OF_FILE
if test 193 -ne `wc -c <'scantool/help.cursor'`; then
    echo shar: \"'scantool/help.cursor'\" unpacked with wrong size!
fi
# end of 'scantool/help.cursor'
fi
if test -f 'scantool/images.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/images.h'\"
else
echo shar: Extracting \"'scantool/images.h'\" \(1552 characters\)
sed "s/^X//" >'scantool/images.h' <<'END_OF_FILE'
X
X/*  @(#)images.h 1.2 90/04/02
X *
X *  Various images used by the different versions of scantool.
X *
X *  Copyright (c) Rich Burridge - Sun Microsystems.
X *                                All rights reserved.
X *
X *  Permission is given to distribute these sources, as long as the
X *  introductory messages are not removed, and no monies are exchanged.
X *
X *  No responsibility is taken for any errors or inaccuracies inherent
X *  either to the comments or the code of this program, but if reported
X *  to me, then an attempt will be made to fix them.
X */
X
Xunsigned short grey_image[16] =
X                 {
X                   0xAAAA, 0x5555, 0xAAAA, 0x5555,
X                   0xAAAA, 0x5555, 0xAAAA, 0x5555,
X                   0xAAAA, 0x5555, 0xAAAA, 0x5555,
X                   0xAAAA, 0x5555, 0xAAAA, 0x5555
X                 } ;
X
Xunsigned short icon_image[] = {
X#include "scantool.icon"
X} ;
X
Xunsigned short button_invert_image[] = {
X#include "button.invert.icon"
X} ;
X
Xunsigned short button_normal_image[] = {
X#include "button.normal.icon"
X} ;
X
Xunsigned short switch_invert_image[] = {
X#include "switch.invert.cursor"
X} ;
X
Xunsigned short switch_normal_image[] = {
X#include "switch.normal.cursor"
X} ;
X
Xunsigned short exclaim_image[] = {
X#include "exclaim.icon"
X} ;
X
Xunsigned short main_cursor_array[16] = {
X#include "main.cursor"
X} ;
X
Xunsigned short hour_cursor_array[16] = {
X#include <images/hglass.cursor>
X} ;
X 
Xunsigned short help_cursor_array[16] = {
X#include "help.cursor"
X} ;
X 
Xunsigned short frame_cursor_array[16] = {
X#include "frame.cursor"
X} ;
END_OF_FILE
if test 1552 -ne `wc -c <'scantool/images.h'`; then
    echo shar: \"'scantool/images.h'\" unpacked with wrong size!
fi
# end of 'scantool/images.h'
fi
if test -f 'scantool/main.cursor' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/main.cursor'\"
else
echo shar: Extracting \"'scantool/main.cursor'\" \(193 characters\)
sed "s/^X//" >'scantool/main.cursor' <<'END_OF_FILE'
X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
X */
X	0x8000,0xC000,0xE000,0xF000,0xF800,0xFC00,0xFE00,0xF000,
X	0xD800,0x9800,0x0C00,0x0C00,0x0600,0x0600,0x0300,0x0300
END_OF_FILE
if test 193 -ne `wc -c <'scantool/main.cursor'`; then
    echo shar: \"'scantool/main.cursor'\" unpacked with wrong size!
fi
# end of 'scantool/main.cursor'
fi
if test -f 'scantool/patchlevel.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/patchlevel.h'\"
else
echo shar: Extracting \"'scantool/patchlevel.h'\" \(563 characters\)
sed "s/^X//" >'scantool/patchlevel.h' <<'END_OF_FILE'
X
X/*  @(#)patchlevel.h 1.4 90/04/10
X *
X *  Current patchlevel for this version of scantool.
X *
X *  Copyright (c) Rich Burridge.
X *                Sun Microsystems, Australia - All rights reserved.
X *
X *  Permission is given to distribute these sources, as long as the
X *  copyright messages are not removed, and no monies are exchanged.
X *
X *  No responsibility is taken for any errors or inaccuracies inherent
X *  either to the comments or the code of this program, but if
X *  reported to me, then an attempt will be made to fix them.
X */
X
X#define  PATCHLEVEL  3
END_OF_FILE
if test 563 -ne `wc -c <'scantool/patchlevel.h'`; then
    echo shar: \"'scantool/patchlevel.h'\" unpacked with wrong size!
fi
# end of 'scantool/patchlevel.h'
fi
if test -f 'scantool/scan.1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scan.1'\"
else
echo shar: Extracting \"'scantool/scan.1'\" \(3375 characters\)
sed "s/^X//" >'scantool/scan.1' <<'END_OF_FILE'
X.\" @(#)scan.1 1.3 90/04/03
X.TH SCAN 1L "2 April 1990"
X.SH NAME
Xscan \- a batch type program to scan images using a Microtek MS300A scanner.
X.SH SYNOPSIS
X.B "scan
X[
X.B -b
X.I brightness
X]
X[
X.B -c
X.I contrast
X]
X[
X.B -d
X.I "data transfer mode"
X]
X[
X.B -f
X.I x1 y1 x2 y2
X]
X[
X.B -g
X.I grain
X]
X[
X.B -m
X.I mode
X]
X[
X.B -p
X.I picname
X]
X[
X.B -r
X.I resolution
X]
X[
X.B -s
X.I speed
X]
X[
X.B -t
X.I ttyport
X]
X[
X.B -v
X]
X.SH DESCRIPTION
X.I Scan
Xis the program called by
X.I scantool
Xto allow a user to scan a document using a Microtek MS300A scanner, and
Xturn the resulting image into a Sun rasterfile. This program could actually
Xbe run on it's own, or through a frontend shell script, but there are a
Xplethora of command line options that need to be passed to the program, so
Xit is probably easier to run it automatically using
X.I scantool.
X.LP
X.I Scan
Xcan exit with a variety of different status values, a non zero value indicating
Xan error of some kind. There error values are:
X.TP
X.B "1"
XCannot open the tty port.
X.TP
X.B "2"
XCannot open the temporary image file.
X.TP
X.B "3"
XCannot open raster header file.
X.TP
X.B "4"
XScanner not responding aborting this scan.
X.TP
X.B "5"
XInvalid command line argument.
X.TP
X.B "100 + 0xnn"
XScanning error 0xnn was received from the scanner. This scan is aborted.
X.TP
X.B "200 + n"
XThe
X.I scan
Xprogram received signal
X.I n
X.SH OPTIONS
X.TP
X.BI \-b " brightness"
XBrightness value. There are 14 brightness values to choose from, ranging from
X1 (-24% darker) to 14 (+28% lighter).
X.TP
X.BI \-c " contrast"
XContrast value. There are 14 contrast values to choose from, ranging from
X1 (-24% lower) to 14 (+28% higher).
X.TP
X.BI \-d " data transfer method"
XData transfer method. This is the form in which data is transfer between
Xthe scanner and the Sun. Currently this option can take two value; 0 is
Xuncompressed and 1 (the default) is compressed.
X.TP
X.BI \-f " x1 y1 x2 y2"
XScanning frame. The frame is the area to be scanned. This option needs the
Xtwo coordinate pairs; the top left of the scanning frame, and the bottom
Xright. These values are expressed in 1/8" increments.
X.TP
X.BI \-g " grain"
XGrain value. There are twelve levels of grain to choose from, ranging from
X0 (grain size: 8x8, grey levels: 33) to 11 (grain size: 2x2, grey levels 5).
X.TP
X.BI \-m " mode"
XThe scanner can operate in two modes; line art mode (value 0; the default) and
Xhalftone mode (value 1).
X.TP
X.BI \-p " picname"
XOutput picture name. This is the name of the file which will contain the
Xscaned image in Sun rasterfile output format. By default, the name of the
Xfile in NoName.rf.
X.TP
X.BI \-r " resolution"
XResolution value. There are 16 resolution values to choose from, ranging from
X0 (300 dpi, scale full size) to 15 (75 dpi, scale 25%).
X.TP
X.BI \-s " speed"
XSpeed of the serial connection between the scanner and the Sun. A value of
X0 is 960 baud. A value of 1 (the default) is 1920 baud.
X.TP
X.BI \-t " tty port"
XThis is the tty port to use. By default this is the Sun's A port (value 0).
XIt is also possibly to use the Sun's B port (value 1).
X.TP
X.B \-v
XVersion number of this release of the
X.I scan
Xprogram. The third number is the current patch level.
X.SH FILES
X.TP
X/usr/local/lib/scantool/black.codes
X.TP
X/usr/local/lib/scantool/white.codes
X.SH AUTHOR
XRich Burridge,        Domain: richb at Aus.Sun.COM
X.nf
XPHONE: +61 2 413 2666   Path: {uunet,mcvax,ukc}!munnari!sunaus.oz!richb
X.fi
END_OF_FILE
if test 3375 -ne `wc -c <'scantool/scan.1'`; then
    echo shar: \"'scantool/scan.1'\" unpacked with wrong size!
fi
# end of 'scantool/scan.1'
fi
if test -f 'scantool/scan.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scan.h'\"
else
echo shar: Extracting \"'scantool/scan.h'\" \(3183 characters\)
sed "s/^X//" >'scantool/scan.h' <<'END_OF_FILE'
X
X/*  @(#)scan.h 1.3 90/04/03
X *
X *  Definitions used by scan.
X *
X *  Copyright (c) Rich Burridge.
X *                Sun Microsystems, Australia - All rights reserved.
X *
X *  Permission is given to distribute these sources, as long as the
X *  copyright messages are not removed, and no monies are exchanged.
X *
X *  No responsibility is taken for any errors or inaccuracies inherent
X *  either to the comments or the code of this program, but if
X *  reported to me, then an attempt will be made to fix them.
X */
X
X#define  CLOSE       (void) close      /* To make lint happy. */
X#define  FCLOSE      (void) fclose
X#define  FPRINTF     (void) fprintf
X#define  FWRITE      (void) fwrite
X#define  GTTY        (void) gtty
X#define  IOCTL       (void) ioctl
X#define  PUTC        (void) putc
X#define  READ        (void) read
X#define  SELECT      (void) select
X#define  SIGNAL      (void) signal
X#define  SSCANF      (void) sscanf
X#define  SPRINTF     (void) sprintf
X#define  STRCPY      (void) strcpy
X#define  STRNCPY     (void) strncpy
X#define  STTY        (void) stty
X#define  SYSTEM      (void) system
X#define  UNLINK      (void) unlink
X#define  WRITE       (void) write
X
Xchar *malloc(), *mktemp(), *sprintf() ;
X
X#define  BUFSIZE        512     /* RS232 data buffer size. */
X#define  ETX            3       /* End of scanning code for scanner. */
X#define  INC            argc-- ; argv++ ;
X#define  MAXLINE        80      /* Length of character strings. */
X#define  MAXREAD        100     /* Maximum amount of outstanding data. */
X#define  MAXRETRIES     5       /* Number of attempts to send packet. */
X#define  MAXTIME        2       /* RS232 read timeout in seconds. */
X#define  SOR            '\\'    /* Start of record character. */
X#define  XOFF           19      /* Stop sending data. */
X#define  XON            17      /* Start sending data again. */
X#define  X1             0       /* Coordinate values within framevals. */
X#define  Y1             1
X#define  X2             2
X#define  Y2             3
X
X/* RS232 read automation states. */
X#define  RSSOR       0            /* Start of packet. */
X#define  RSRTYPE     1            /* Record type. */
X#define  RSCOUNT     2            /* Data count. */
X#define  RSDATA      3            /* Packet data. */
X#define  RSCKSUM     4            /* Packet checksum. */
X
X/* States for packet acknowledgement. */
X#define  NOANSWER    '-'        /* No acknowledgement received. */
X#define  ACK         6          /* Positive acknowledgement. */
X#define  NAK         21         /* Negative acknowledgement. */
X
X/* Abbreviations for box switch values. */
X#define  MODE           switches[0]
X#define  DATA_TRANSFER  switches[1]
X#define  SERIAL_PORT    switches[2]
X#define  BAUD_RATE      switches[3]
X
X/* Color definitions used with uncompressing. */
X#define  WHITE          4
X#define  BLACK          2
X
X#ifndef  SIGRET
X#define  SIGRET         void
X#endif /* SIGRET */
X
X#ifndef LINT_CAST
X#ifdef lint
X#define LINT_CAST(arg)  (arg ? 0 : 0)
X#else
X#define LINT_CAST(arg)  (arg)
X#endif lint
X#endif LINT_CAST
X
Xstruct code                     /* Huffman code record. */
X         {
X           struct code *next[2] ;
X           int value[2] ;
X         } ;
END_OF_FILE
if test 3183 -ne `wc -c <'scantool/scan.h'`; then
    echo shar: \"'scantool/scan.h'\" unpacked with wrong size!
fi
# end of 'scantool/scan.h'
fi
if test -f 'scantool/scantool.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scantool.h'\"
else
echo shar: Extracting \"'scantool/scantool.h'\" \(5001 characters\)
sed "s/^X//" >'scantool/scantool.h' <<'END_OF_FILE'
X
X/*  @(#)scantool.h 1.4 90/04/04
X *
X *  Definitions used by scantool.
X *
X *  Copyright (c) Rich Burridge.
X *                Sun Microsystems, Australia - All rights reserved.
X *
X *  Permission is given to distribute these sources, as long as the
X *  copyright messages are not removed, and no monies are exchanged.
X *
X *  No responsibility is taken for any errors or inaccuracies inherent
X *  either to the comments or the code of this program, but if
X *  reported to me, then an attempt will be made to fix them.
X */
X
X#define  CLOSE       (void) close      /* To make lint happy. */
X#define  EXECL       (void) execl
X#define  FGETS       (void) fgets
X#define  FPRINTF     (void) fprintf
X#define  KILL        (void) kill
X#define  READ        (void) read
X#define  SPRINTF     (void) sprintf
X#define  STRCPY      (void) strcpy
X#define  STRNCAT     (void) strncat
X#define  STRNCPY     (void) strncpy
X
Xchar *sprintf() ;
X
X#define  BUTTON_HEIGHT  28        /* Height of a command button in pixels. */
X#define  BUTTON_WIDTH   64        /* Width of a command button in pixels. */
X#define  EQUAL          !strcmp   /* For character comparisons. */
X#define  FONT_HEIGHT    14        /* Dimensions of the character fonts used. */
X#define  FRAMEGAP       LINEGAP / 2       /* Scanning frame interval. */
X
X#ifndef  HELPNAME
X#define  HELPNAME       "scantool.help"   /* Name of scantool help file. */
X#endif /*HELPNAME*/
X
X#define  INC            argc-- ; argv++ ;
X#define  LINEGAP        10      /* Gap between lines in scanning frame. */
X#define  MAXCURSORS     4       /* Maximum number of cursors used. */
X#define  MAXFONTS       2       /* Maximum number of fonts used. */
X#define  MAXIMAGES      5       /* Maximum number of graphics images. */
X#define  MAXLINE        80      /* Length of character strings. */
X#define  MAXMENUS       6       /* Maximum number of popup menus. */
X#define  MAXOPS         6       /* Number of pseudo rasterop functions. */
X#define  MBAR_HEIGHT    20      /* Height of the top menu bar. */
X#define  MBAR_WIDTH     100     /* Width of a portion of the top menu bar. */
X#define  OFF            0       /* Used to define toggle switch positions. */
X#define  ON             1
X#define  SCAN_FRAME_X   26      /* Initial start position of scanning frame. */
X#define  SCAN_FRAME_Y   47
X#define  SCAN_HEIGHT    506     /* Height of the scantool window. */
X#define  SCAN_WIDTH     600     /* Width of the scantool window. */
X#define  SWITCH_HEIGHT  90      /* Height of a toggle box switch. */
X
X#define  X1             0       /* Coordinate values within framevals. */
X#define  Y1             1
X#define  X2             2
X#define  Y2             3
X
X#define  OK             1       /* Text button states. */
X#define  CANCEL         0
X
X#define  BACKSPACE      8       /* Used for filename construction. */
X#define  DEL            127
X#define  LINEFEED       13
X#define  RETURN         10
X
X/* Pseudo events generated by scantool. */
X#define  LEFT_DOWN         0    /* Left mouse button was depressed. */
X#define  LEFT_UP           1    /* Left mouse button was debounced. */
X#define  MIDDLE_DOWN       2    /* Middle mouse button was depressed. */
X#define  MIDDLE_UP         3    /* Middle mouse button was debounced. */
X#define  RIGHT_DOWN        4    /* Right mouse button was depressed. */
X#define  RIGHT_UP          5    /* Right mouse button was debounced. */
X#define  KEYBOARD          6    /* A keyboard key has been pressed. */
X#define  REPAINT           7    /* Scantool canvas needs repainting. */
X#define  MOUSE_MOVE        8    /* The mouse is being moved. */
X#define  MOUSE_DRAG        9    /* The mouse is being dragged. */
X#define  IGNORE            10   /* Not interested in this event. */
X
X/* Abbreviations for box switch values. */
X#define  MODE              switches[0]
X#define  DATA_TRANSFER     switches[1]
X#define  SERIAL_PORT       switches[2]
X#define  BAUD_RATE         switches[3]
X
X#define  SET_PICTURE      1     /* Values for the Set menu commands. */
X#define  SET_DEFAULTS     2
X#define  SET_CLEAR_FRAME  3
X#define  SET_NEW_FRAME    4
X#define  SET_CURRENT      5
X
X/* Cursor types used by scantool. */
Xenum cur_type { FRAME_CUR, HELP_CUR, HOUR_CUR, MAIN_CUR } ;
X
X/* States that the drawing canvas can be in. */
Xenum draw_type { DO_NOTHING, DO_PICNAME, DO_MESSAGE, DO_HELP, DO_SETTINGS } ;
X
Xenum font_type { BFONT, NFONT } ;          /* Fonts used by scantool. */
X
X/* Various images types used by scantool. */
Xenum image_type { B_NORMAL, B_INVERT, S_NORMAL, S_INVERT,
X                  M_NORMAL, M_INVERT, EXCLAIM_IMAGE } ;
X
X/* Menus used by scantool. */
Xenum menu_type { BRIGHTNESS_M, CONTRAST_M, GRAIN_M, HELP_M,
X                 RESOLUTION_M, SET_M, WINDOW_M } ;
X
X/* Pseudo rasterop functions. */
Xenum op_type { GSET, GCLR, GXOR, GSRC, GOR, GNOT } ;
X
Xenum sten_type { STEN_OFF, STEN_ON, STEN_INV } ;   /* Text stencil types. */
X
X#ifndef LINT_CAST
X#ifdef lint
X#define LINT_CAST(arg)  (arg ? 0 : 0)
X#else
X#define LINT_CAST(arg)  (arg)
X#endif lint
X#endif LINT_CAST
END_OF_FILE
if test 5001 -ne `wc -c <'scantool/scantool.h'`; then
    echo shar: \"'scantool/scantool.h'\" unpacked with wrong size!
fi
# end of 'scantool/scantool.h'
fi
if test -f 'scantool/scantool.help' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scantool.help'\"
else
echo shar: Extracting \"'scantool/scantool.help'\" \(5356 characters\)
sed "s/^X//" >'scantool/scantool.help' <<'END_OF_FILE'
X%brightness%
X                   BRIGHTNESS.
X
X  There are 14 Brightness levels to choose from. The
Xeffect of this control depends on whether the image
Xis scanned in Line Art or Halftone mode.
X
X  In Line Art mode, the higher the Brightness setting
Xthe darker a spot must be in order for the scanner to
Xconsider it "black". Lower settings can therefore be
Xused to get a sharper image if the original is too
Xlight or blurry, while higher settings can be used to
Xprevent slightly shaded areas from coming out black
Xin the scanned image.
X
X  In Halftone mode, the Brightness setting affects
Xshading in all areas of the scanned image, both dark
Xand light. The higher the value selected, the lighter
Xthe overall image; the lower the setting, the darker
Ximage.
X%%
X
X%compress%
X                 COMPRESS.
X
X  In order to reduce the amount of time needed to
Xtransmit a scanned image to the Sun computer, the
XMS-300A can compress image data using a one-
Xdimensional coding scheme based on CCITT
XRecommendation T.4 (modified Huffman code).
X%%
X
X%contrast%
X                    CONTRAST.
X
X  The Contrast control also has 14 different settings.
XThe effect of this control in Line Art mode is identical
Xto that of the Brightness control. In Halftone mode, a
Xhigher Contrast setting causes all but the darkest areas
Xof the original document to come out lighter in the
Xscanned image. Too high a setting can result in "glare
Xspots" of pure white; too low a setting can make the
Ximage almost uniformly gray.
X%%
X
X%frame%
X               SET SCANNING FRAME.
X
X  The frame is the area to be scanned. Scan Tool allows
Xyou to scan an area as small as 1/8" x 1/8", or as large
Xas 8.5" x 11". Using the Set Scanning Frame function in
Xthe Set menu, you can adjust the size and location of
Xthe frame in order to scan any part of the document that
Xyou feed into the scanner.
X%%
X
X%grain%
X                        GRAIN.
X
X  All the grains in any one halftone image are the same
Xsize (see the Mode help). It is desirable, however, to
Xuse different grain sizes for different kinds of images.
XThe Grain control makes it possible to do this. Six
Xdifferent grain sizes are available: 2, 3, 4, 5, 6, and
X8 dots square.
X
X  When smaller grain sizes (i.e. higher settings) are
Xused, fine details in the original document are captured
Xmore clearly, but the smaller number of dot positions in
Xthe grains limits the scanner's "palette" of gray levels.
XA Grain setting of 11, for instance produces grains that
Xare 2 dots high by 2 dots wide. With only 4 dot positions
Xto fill, only 5 distinct gray levels are possible, from
Xall white to all black.
X%%
X
X%mode%
X                       MODE.
X
X  The scanner can handle input from the image sensor in
Xtwo modes: Line Art mode and Halftone mode. Line Art
Xmode produces an all black-and-white image, while
XHalftone mode results in an image that appears to contain
Xvarying shades of gray.
X
X  In Line Art mode, the amount of light falling on the
Xsensor is compared against a "threshold" determined by
Xthe Brightness and Contrast controls. Whenever it falls
Xbelow the threshold, a black dot is sent to the Sun; when
Xit exceeds the threshold a white dot is sent. This mode
Xis normally used for material in which everything is
Xeither black or white.
X
X  Halftone mode is used to detect and reproduce finer
Xdifferences in shading. In this mode the dots sent to
Xthe Sun are organised into squares, or "grains", of
Xuniform size. By varying the ratio of black and white
Xdots in the grains, different degrees of shading, or
X"gray levels", are achieved.
X%%
X
X%picture%
X                  PICTURE NAME.
X
X  This is the name of the file on the Sun that the
Xscanned picture will be saved in. The default is a
Xfile called "Noname.rf".
X%%
X
X%port%
X                         PORT.
X
X  This is the RS232 port that is used to connect to
Xthe scanner. Connect the MS300-A to the Sun as shown
Xbelow:
X
X         MS-300A                           SUN
X      ------------                     ----------
X    Pin No.    Name      Direction     Pin No.    Name
X   ---------  ------  --------------  ---------  ------
X       2       TXD    Scanner to Sun      3       RXD
X       3       RXD    Sun to scanner      2       TXD
X       7       GND        ---             7       GND
X%%
X
X%resolution%
X                    RESOLUTION.
X
X  The Resolution control determines the degree of
Xreduction of the scanned image relative to the original.
XSince the dots that make up the scanned image cannot be
Xreduced in size, reduction is achieved by deleting dots
Xat selected intervals when transmitting the image to
Xthe Sun, resulting in an effective resolution of less
Xthan the scanner's maximum of 300 dots per inch.
X
X  There are 16 possible Resolution settings, providing
Xscaling operations from 25% to 100%.
X%%
X
X%scan%
X                     SCAN.
X
X  When you click the Scan button, scantool checks
Xto see if the scanner is on line, i.e. powered up,
Xproperly connected and ready to receive commands.
X
X  If everything checks out OK, the current settings
Xwill be transmitted to the scanner, and the rollers
Xwill begin to turn. Actual scanning will begin after
Xa document is detected by the paper sensor, which is
Xlocated in the middle of the feed slot just below
Xthe top rollers.
X%%
X
X%speed%
X                     SPEED.
X
X  Two speed settings between the scanner and the
XSun are available, either 9600 or 19200 baud.
X%%
END_OF_FILE
if test 5356 -ne `wc -c <'scantool/scantool.help'`; then
    echo shar: \"'scantool/scantool.help'\" unpacked with wrong size!
fi
# end of 'scantool/scantool.help'
fi
if test -f 'scantool/scantool.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scantool.icon'\"
else
echo shar: Extracting \"'scantool/scantool.icon'\" \(1933 characters\)
sed "s/^X//" >'scantool/scantool.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x83E0,0x0000,0x0000,0x0001,0x8630,0x0000,0x0000,0x0001,
X	0x8630,0x0000,0x0000,0x0001,0x8301,0xF0F0,0xBC00,0x0001,
X	0x81C3,0x1998,0xE600,0x0001,0x8063,0x0018,0xC600,0x0001,
X	0x8033,0x00F8,0xC600,0x0001,0x8633,0x0198,0xC600,0x0001,
X	0x8633,0x1998,0xC600,0x0001,0x83E1,0xF0FC,0xC600,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8FFF,0xFFFF,0xFFFF,0xFFF1,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8FFF,0xFFFF,0xFFFF,0xFFF1,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8FFF,0xFFFF,0xFFFF,0xFFF1,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8FFF,0xFFFF,0xFFFF,0xFFF1,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8FFF,0xFFFF,0xFFFF,0xFFF1,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8FF0,0x0000,0x7800,0x0001,0x8180,0x0000,0x1800,0x0001,
X	0x8180,0x0000,0x1800,0x0001,0x8181,0xF0F8,0x1800,0x0001,
X	0x8183,0x198C,0x1800,0x0001,0x8183,0x198C,0x1800,0x0001,
X	0x8183,0x198C,0x1800,0x0001,0x8183,0x198C,0x1800,0x0001,
X	0x8183,0x198C,0x1800,0x0001,0x8181,0xF0F8,0x1800,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
X	0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
END_OF_FILE
if test 1933 -ne `wc -c <'scantool/scantool.icon'`; then
    echo shar: \"'scantool/scantool.icon'\" unpacked with wrong size!
fi
# end of 'scantool/scantool.icon'
fi
if test -f 'scantool/scantool_extern.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/scantool_extern.h'\"
else
echo shar: Extracting \"'scantool/scantool_extern.h'\" \(2593 characters\)
sed "s/^X//" >'scantool/scantool_extern.h' <<'END_OF_FILE'
X
X/*  @(#)scantool_extern.h 1.4 90/04/04
X *
X *  External variables used by the scantool routines.
X *
X *  Copyright (c) Rich Burridge.
X *                Sun Microsystems, Australia - All rights reserved.
X *
X *  Permission is given to distribute these sources, as long as the
X *  copyright messages are not removed, and no monies are exchanged.
X *
X *  No responsibility is taken for any errors or inaccuracies inherent
X *  either to the comments or the code of this program, but if
X *  reported to me, then an attempt will be made to fix them.
X */
X
Xextern char *br_strs[] ;       /* Brightness menu item strings. */
Xextern char *con_strs[] ;      /* Contrast menu item strings. */
Xextern char *gr_strs[] ;       /* Grain menu item strings. */
Xextern char helpname[] ;       /* Current help file to display. */
Xextern char *help_strs[] ;     /* Help menu item strings. */
Xextern char last_message[] ;   /* Last make_displayed message. */
Xextern char old_picname[] ;    /* Previous picture name. */
Xextern char output[] ;         /* Panel_set string to be output. */
Xextern char picname[] ;        /* Name of file for raster image. */
Xextern char progname[] ;       /* This programs name. */
Xextern char *res_strs[] ;      /* Resolution menu item strings. */
Xextern char *set_strs[] ;      /* Set menu item strings. */
X
Xextern int brightness ;   /* Brightness value. */
Xextern int butx ;         /* Top left X position of popup button. */
Xextern int buty ;         /* Top left Y position of popup button. */
Xextern int contrast ;     /* Contrast value. */
Xextern int cur_ch ;       /* Last keyboard character pressed. */
Xextern int curx ;         /* Current X position of the mouse. */
Xextern int cury ;         /* Current Y position of the mouse. */
Xextern int font_width ;   /* Width of a single character. */
Xextern int framevals[] ;  /* Initial frame in 1/8th inch intervals. */
Xextern int grain ;        /* Grain value. */
Xextern int nohelp ;       /* Indicates if a help file was found. */
Xextern int ops[] ;        /* Pseudo rasterop functions. */
Xextern int pid ;          /* Process id of the child scan process. */
Xextern int resolution ;   /* Resolution value. */
Xextern int scanning ;     /* Set if we are in the middle of a scan. */
Xextern int showing ;      /* Set if we are in the middle of a show. */
Xextern int switches[] ;
Xextern int type ;         /* Current pseudo event type. */
Xextern int width ;        /* Width in pixels of scantool window. */
X
Xextern FILE *hfd ;        /* File descriptor for help file. */
X
Xextern enum draw_type drawstate ;  /* Current redraw action. */
X
END_OF_FILE
if test 2593 -ne `wc -c <'scantool/scantool_extern.h'`; then
    echo shar: \"'scantool/scantool_extern.h'\" unpacked with wrong size!
fi
# end of 'scantool/scantool_extern.h'
fi
if test -f 'scantool/switch.invert.cursor' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/switch.invert.cursor'\"
else
echo shar: Extracting \"'scantool/switch.invert.cursor'\" \(193 characters\)
sed "s/^X//" >'scantool/switch.invert.cursor' <<'END_OF_FILE'
X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
X */
X	0x0000,0x0000,0x0000,0x0002,0x0007,0x000E,0xFFFC,0x8038,
X	0x8070,0x80E0,0xB1E0,0xBBA0,0x9F20,0x8E20,0x8420,0xFFE0
END_OF_FILE
if test 193 -ne `wc -c <'scantool/switch.invert.cursor'`; then
    echo shar: \"'scantool/switch.invert.cursor'\" unpacked with wrong size!
fi
# end of 'scantool/switch.invert.cursor'
fi
if test -f 'scantool/white.codes' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'scantool/white.codes'\"
else
echo shar: Extracting \"'scantool/white.codes'\" \(2080 characters\)
sed "s/^X//" >'scantool/white.codes' <<'END_OF_FILE'
X    0      00110101
X    1        000111
X    2          0111
X    3          1000
X    4          1011
X    5          1100
X    6          1110
X    7          1111
X    8         10011
X    9         10100
X   10         00111
X   11         01000
X   12        001000
X   13        000011
X   14        110100
X   15        110101
X   16        101010
X   17        101011
X   18       0100111
X   19       0001100
X   20       0001000
X   21       0010111
X   22       0000011
X   23       0000100
X   24       0101000
X   25       0101011
X   26       0010011
X   27       0100100
X   28       0011000
X   29      00000010
X   30      00000011
X   31      00011010
X   32      00011011
X   33      00010010
X   34      00010011
X   35      00010100
X   36      00010101
X   37      00010110
X   38      00010111
X   39      00101000
X   40      00101001
X   41      00101010
X   42      00101011
X   43      00101100
X   44      00101101
X   45      00000100
X   46      00000101
X   47      00001010
X   48      00001011
X   49      01010010
X   50      01010011
X   51      01010100
X   52      01010101
X   53      00100100
X   54      00100101
X   55      01011000
X   56      01011001
X   57      01011010
X   58      01011011
X   59      01001010
X   60      01001011
X   61      00110010
X   62      00110011
X   63      00110100
X   64         11011
X  128         10010
X  192        010111
X  256       0110111
X  320      00110110
X  384      00110111
X  448      01100100
X  512      01100101
X  576      01101000
X  640      01100111
X  704     011001100
X  768     011001101
X  832     011010010
X  896     011010011
X  960     011010100
X 1024     011010101
X 1088     011010110
X 1152     011010111
X 1216     011011000
X 1280     011011001
X 1344     011011010
X 1408     011011011
X 1472     010011000
X 1536     010011001
X 1600     010011010
X 1664        011000
X 1728     010011011
X 1792   00000001000
X 1856   00000001100
X 1920   00000001101
X 1984  000000010010
X 2048  000000010011
X 2112  000000010100
X 2176  000000010101
X 2240  000000010110
X 2304  000000010111
X 2368  000000011100
X 2432  000000011101
X 2496  000000011110
X   -1  000000000001
END_OF_FILE
if test 2080 -ne `wc -c <'scantool/white.codes'`; then
    echo shar: \"'scantool/white.codes'\" unpacked with wrong size!
fi
# end of 'scantool/white.codes'
fi
echo shar: End of archive 3 \(of 3\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 3 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
dan
-----------------------------------------------------------
		    O'Reilly && Associates
		argv at sun.com / argv at ora.com
	   632 Petaluma Ave, Sebastopol, CA 95472 
     800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
    Opinions expressed reflect those of the author only.



More information about the Comp.sources.x mailing list