pkg://xearth-1.0-9.src.rpm:157570/xearth-1.0.tar.gz
info downloads
xearth-1.0/ 755 26503 144 0 6033034752 5702 xearth-1.0/Imakefile 444 26503 144 4704 6021155320 7573 XCOMM Imakefile for xearth
XCOMM RCS $Id: Imakefile,v 1.9 1995/08/30 21:40:29 tuna Exp $
XCOMM
XCOMM Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
XCOMM
XCOMM Parts of the source code (as marked) are:
XCOMM Copyright (C) 1989, 1990, 1991 by Jim Frost
XCOMM Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
XCOMM
XCOMM Permission to use, copy, modify and freely distribute xearth for
XCOMM non-commercial and not-for-profit purposes is hereby granted
XCOMM without fee, provided that both the above copyright notice and
XCOMM this permission notice appear in all copies and in supporting
XCOMM documentation.
XCOMM
XCOMM Unisys Corporation holds worldwide patent rights on the Lempel
XCOMM Zev Welch (LZW) compression technique employed in the CompuServe
XCOMM GIF image file format as well as in other formats. Unisys has
XCOMM made it clear, however, that it does not require licensing or
XCOMM fees to be paid for freely distributed, non-commercial
XCOMM applications (such as xearth) that employ LZW/GIF
XCOMM technology. Those wishing further information about licensing
XCOMM the LZW patent should contact Unisys directly at
XCOMM (lzw_info@unisys.com) or by writing to
XCOMM
XCOMM Unisys Corporation
XCOMM Welch Licensing Department
XCOMM M/S-C1SW19
XCOMM P.O. Box 500
XCOMM Blue Bell, PA 19424
XCOMM
XCOMM The author makes no representations about the suitability of
XCOMM this software for any purpose. It is provided "as is" without
XCOMM express or implied warranty.
XCOMM
XCOMM THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
XCOMM SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
XCOMM AND FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
XCOMM SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
XCOMM WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
XCOMM IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
XCOMM ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
XCOMM THIS SOFTWARE.
DEFINES =
SRCS = xearth.c dither.c extarr.c gif.c gifout.c mapdata.c \
markers.c ppm.c render.c resources.c scan.c sunpos.c \
x11.c
OBJS = xearth.o dither.o extarr.o gif.o gifout.o mapdata.o \
markers.o ppm.o render.o resources.o scan.o sunpos.o \
x11.o
DEPLIBS = $(DEPXTOOLLIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XTOOLLIB) $(XLIB)
SYS_LIBRARIES = -lm
ComplexProgramTarget(xearth)
xearth-1.0/Makefile.DIST 444 26503 144 5120 6031165406 10164 # simple Makefile for xearth
# RCS $Id: Makefile.DIST,v 1.10 1995/09/24 05:22:12 tuna Exp $
#
# Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
#
# Parts of the source code (as marked) are:
# Copyright (C) 1989, 1990, 1991 by Jim Frost
# Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
#
# Permission to use, copy, modify and freely distribute xearth for
# non-commercial and not-for-profit purposes is hereby granted without
# fee, provided that both the above copyright notice and this
# permission notice appear in all copies and in supporting
# documentation.
#
# Unisys Corporation holds worldwide patent rights on the Lempel Zev
# Welch (LZW) compression technique employed in the CompuServe GIF
# image file format as well as in other formats. Unisys has made it
# clear, however, that it does not require licensing or fees to be
# paid for freely distributed, non-commercial applications (such as
# xearth) that employ LZW/GIF technology. Those wishing further
# information about licensing the LZW patent should contact Unisys
# directly at (lzw_info@unisys.com) or by writing to
#
# Unisys Corporation
# Welch Licensing Department
# M/S-C1SW19
# P.O. Box 500
# Blue Bell, PA 19424
#
# The author makes no representations about the suitability of this
# software for any purpose. It is provided "as is" without express or
# implied warranty.
#
# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
# NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
DEFINES =
CC = gcc
CFLAGS = -O2 $(DEFINES)
LDFLAGS =
PROG = xearth
SRCS = xearth.c dither.c extarr.c gif.c gifout.c mapdata.c \
markers.c ppm.c render.c resources.c scan.c sunpos.c x11.c
OBJS = xearth.o dither.o extarr.o gif.o gifout.o mapdata.o \
markers.o ppm.o render.o resources.o scan.o sunpos.o x11.o
LIBS = -lXt -lX11 -lm
TARFILE = xearth.tar
DIST = Imakefile Makefile.DIST README INSTALL HISTORY BUILT-IN \
GAMMA-TEST gamma-test.gif xearth.man dither.c extarr.c \
extarr.h gif.c gifint.h giflib.h gifout.c kljcpyrt.h \
mapdata.c markers.c port.h ppm.c render.c resources.c \
scan.c sunpos.c x11.c xearth.c xearth.h
all: $(PROG)
$(PROG): $(OBJS)
$(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)
clean:
/bin/rm -f $(PROG) $(OBJS)
tarfile:
tar cvf $(TARFILE) $(DIST)
0 xearth-1.0/README 444 26503 144 14010 6033034637 6663 RCS $Id: README,v 1.20 1995/09/29 18:23:25 tuna Exp $
README file for xearth, version 1.0
Kirk Lauritz Johnson <tuna@cag.lcs.mit.edu>
29 September 1995
WHAT IS IT?
Xearth sets the X root window to an image of the Earth, as seen
from your favorite vantage point in space, correctly shaded for
the current position of the Sun. By default, xearth updates the
displayed image every five minutes; the time between updates can
be changed using either X resources or a command line
option. Xearth can also render directly into PPM and GIF files
instead of drawing in the root window; see the man page for
details.
See the HISTORY file for a list of changes since earlier versions
of xearth.
IMPORTANT!
This version of xearth (version 1.0) is an evolution of the only
version(s) of xearth that I ever released (versions 0.5, 0.9,
0.91, and 0.92). Unfortunately, after I released version 0.5, some
net.weenies chose to make some minor mods (and introduce bugs!)
and "release" a bogus version 0.6 without even notifying or
consulting with me; this may be the version of xearth that you are
currently using.
Some of the command line options supported in the bogus version
0.6 (e.g, those having to do with "geostatic") don't exist in this
version -- their functionality (and more!) is available through
other means. In addition, the meaning and syntax of some of the
xearth command line options have changed, so you should probably
give the new man page a good reading if things don't seem to be
working as you expect.
WHERE TO GET IT?
The latest-and-greatest version of xearth should be available via
anonymous ftp from cag.lcs.mit.edu:/pub/tuna (or, for those web
surfers out there, via a link from the xearth WWW home page
http://cag-www.lcs.mit.edu/~tuna/xearth/index.html).
NOTES
If you are trying to build xearth under SunOS 4.x using /bin/cc,
make sure to read the section of the INSTALL file entitled
"BUILDING UNDER SUNOS 4.x" regarding a compiler bug.
There are a number of improvements that I'd love to make, but I
really should be working on my thesis instead of hacking on this.
The map information used in xearth was derived from the "CIA World
Data Bank II map database," as taken from some "cbd" files that
were apparently originally generated by Brian Reid at DEC WRL.
Running in the background on a SPARCstation 5/70, xearth requires
five to seven CPU seconds each time it redraws an image in the
root window. With the default time-between-redraws of 300 seconds,
I simply don't notice the extra CPU load. Your mileage may vary,
of course, especially on slower machines.
The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated.
Thanks to Robert Berger for allowing me to include his nifty Gamma
Measurement Image and associated text in the xearth source
distribution.
Thanks to Jamie Zawinski for suggesting that I look at his
xscreensaver package for a good example of how to use the resource
and command line option parts of Xt; his code saved me piles of
lossage.
Thanks to Chris Metcalf for the -bigstars stuff, a pile of general
source code cleaning, and spell checking everything carefully.
Thanks to Chris Hayward, Chris Metcalf, Sherman Mui, Dan Rich, and
Leonard Zubkoff for giving the pre-release of version 1.0 a test
drive.
Kudos to Jef Poskanzer for his excellent PBMPLUS toolkit.
Finally, thanks to everybody that sent encouragement, suggestions,
and patches. Apologies to the many people whose good ideas didn't
make it into this release.
IDEAS FOR FUTURE WORK
Better error recovery (better than "assert()", anyway).
Add options/resources that specify colors other than the default
green, blue, red, white, and black.
Code for tracking real-life orbits ("-pos hubble").
Support for supersampling/antialiasing.
AUTHOR
Kirk Johnson <tuna@cag.lcs.mit.edu>
Patches, bug reports, and suggestions are welcome, although I
can't guarantee that I'll get around to doing anything about them
in a timely fashion.
LEGAL STUFF
Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
Parts of the source code (as marked) are:
Copyright (C) 1989, 1990, 1991 by Jim Frost
Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
Permission to use, copy, modify and freely distribute xearth for
non-commercial and not-for-profit purposes is hereby granted
without fee, provided that both the above copyright notice and
this permission notice appear in all copies and in supporting
documentation.
Unisys Corporation holds worldwide patent rights on the Lempel Zev
Welch (LZW) compression technique employed in the CompuServe GIF
image file format as well as in other formats. Unisys has made it
clear, however, that it does not require licensing or fees to be
paid for freely distributed, non-commercial applications (such as
xearth) that employ LZW/GIF technology. Those wishing further
information about licensing the LZW patent should contact Unisys
directly at (lzw_info@unisys.com) or by writing to
Unisys Corporation
Welch Licensing Department
M/S-C1SW19
P.O. Box 500
Blue Bell, PA 19424
The author makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express
or implied warranty.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
xearth-1.0/INSTALL 444 26503 144 17444 6033033422 7041 RCS $Id: INSTALL,v 1.10 1995/09/29 18:12:30 tuna Exp $
Installation notes for xearth, version 1.0
Kirk Lauritz Johnson <tuna@cag.lcs.mit.edu>
29 September 1995
NOTE: If you are trying to build xearth under SunOS 4.x using
/bin/cc, make sure to read the section entitled "BUILDING
UNDER SUNOS 4.x" (below) regarding a compiler bug.
BUILDING USING IMAKE
To build xearth using imake:
(1) Edit "Imakefile" to add any DEFINES necessary for building on
your platform (see the section entitled "DEFINES" below).
(2) Run "xmkmf" to build a makefile.
(3) Run "make all" to build an executable.
If "make" complains cryptically about lines in the makefile
that start with "XCOMM" (you'll probably have to eyeball the
offending lines in the makefile to determine this), something
went wrong with "xmkmf" (or "imake"). You should be able to
fix this using something along the lines of
egrep -v ^XCOMM < Makefile > junk ; mv junk Makefile
(to strip out all lines that start with XCOMM) and then
running "make" again.
If the linker complains about "random", "srandom", and/or
"setpriority" being undefined, you probably need to add
"-DNO_RANDOM" and/or "-DNO_SETPRIORITY" to the right hand side
of the "DEFINES =" line in the Imakefile and start over. (See
the section entitled "DEFINES" below.)
(4) Run "make install" and "make install.man" to install the
executable and man page in whatever places are appropriate for
your system.
BUILDING USING MAKE
To build xearth using make:
(1) Copy the distribution makefile "Makefile.DIST" to "Makefile".
(2) Edit the makefile if necessary; you may need to:
- add any DEFINES necessary for building on your platform (see
the section entitled "DEFINES" below)
- change the name of the C compiler (CC) from "gcc" to whatever
compiler you want to use when building
- change the compiler flags (CFLAGS) -- if your X include files
aren't found in the usual place (/usr/include), you may have
to add something along the lines of "-I<path-to-X-includes>"
to CFLAGS
- change the loader flags (LDFLAGS) -- if your X libraries
aren't found in the usual places (perhaps /lib and /usr/lib),
you may have to add something along the lines of
"-L<path-to-X-libraries>" to LDFLAGS
(3) Run "make all" to build an executable.
If the linker complains about "random", "srandom", and/or
"setpriority" being undefined, you probably need to add
"-DNO_RANDOM" and/or "-DNO_SETPRIORITY" to the right hand side
of the "DEFINES =" line in the Makefile and start over. (See
the section entitled "DEFINES" below.)
(4) Install the executable ("xearth") and man page ("xearth.man")
in whatever the appropriate places are for your environment.
DEFINES
The xearth source code includes #ifdef-ed workaround/replacement
code for systems that don't provide the random(), srandom(),
and/or setpriority() library functions.
For systems that don't provide random() and srandom(), #define the
NO_RANDOM symbol (this can be done by adding "-DNO_RANDOM" to the
right hand side of the "DEFINES =" line in the Makefile or
Imakefile). Doing so causes xearth to use the lrand48() and
srand48() functions instead of random() and srandom(). (If your
system doesn't have lrand48() and srand48() either, you'll have to
go into xearth.h and change the #defines for random() and
srandom() to something appropriate for your system.)
For systems that don't provide setpriority, #define the
NO_SETPRIORITY symbol (this can be done by adding
"-DNO_SETPRIORITY" to the right and side of the "DEFINES =" line
in the Makefile or Imakefile). Doing so causes xearth to use the
nice() function instead of setpriority().
If you try to compile xearth and the linker complains that
random(), srandom(), and/or setpriority() is undefined, try
defining NO_RANDOM and/or NO_SETPRIORITY, as appropriate, and
recompiling.
BUILDING UNDER SUNOS 4.x
I believe something in dither.c exercises an optimizer bug in
SunOS 4.1.3 /bin/cc. When I compile using -O or -O2, the dither
code either causes a segmentation violation or (worse) runs
without crashing but produces incorrect output. This code works
fine under all the other compilers I can get my hands on,
however. So, if possible, don't use SunOS 4.1.3 /bin/cc to compile
xearth, or, if you have no other compilers, don't use optimization
when compiling dither.c.
MISCELLANY
This version of Xearth has been tested on (at least) the following
platforms; the "DEFINES" column indicates any additional
definitions that were necessary when building (see above).
Processor Operating System DEFINES
--------- ---------------- ----------------------------
Alpha DEC OSF/1 V3.2 (none)
MIPS IRIX 5.3 (none)
MIPS IRIX64 6.0.1 (none)
MIPS Ultrix 4.4 (none)
Pentium NeXT Mach 3.3 (none)
SPARC SunOS 4.1.3 (none)
SPARC Solaris 2.4 -DNO_RANDOM -DNO_SETPRIORITY
i486 Linux 1.2 (none)
Some compilers take an inordinately long time to compile
mapdata.c, especially when running on systems without very much
physical memory (e.g., 16 MB or less).
MANIFEST
README miscellaneous info
INSTALL this file
HISTORY release history
BUILT-IN built-in marker data
Imakefile for use with "imake"
Makefile.DIST for use with "make"
xearth.man man page
GAMMA-TEST describes gamma-test.gif
gamma-test.gif gamma measurement image
dither.c source code
extarr.[ch]
gif.c
gifint.h
giflib.h
gifout.c
kljcpyrt.h
mapdata.c
markers.c
ppm.c
render.c
resources.c
scan.c
sunpos.c
x11.c
xearth.[ch]
----------------------------------------------------------------
Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
Parts of the source code (as marked) are:
Copyright (C) 1989, 1990, 1991 by Jim Frost
Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
Permission to use, copy, modify and freely distribute xearth for
non-commercial and not-for-profit purposes is hereby granted without
fee, provided that both the above copyright notice and this permission
notice appear in all copies and in supporting documentation.
Unisys Corporation holds worldwide patent rights on the Lempel Zev
Welch (LZW) compression technique employed in the CompuServe GIF image
file format as well as in other formats. Unisys has made it clear,
however, that it does not require licensing or fees to be paid for
freely distributed, non-commercial applications (such as xearth) that
employ LZW/GIF technology. Those wishing further information about
licensing the LZW patent should contact Unisys directly at
(lzw_info@unisys.com) or by writing to
Unisys Corporation
Welch Licensing Department
M/S-C1SW19
P.O. Box 500
Blue Bell, PA 19424
The author makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
xearth-1.0/HISTORY 444 26503 144 11041 6033033777 7074 RCS $Id: HISTORY,v 1.10 1995/09/29 18:16:30 tuna Exp $
Release history for xearth, version 1.0
Kirk Lauritz Johnson <tuna@cag.lcs.mit.edu>
29 September 1995
xearth version 1.0 (29 September 1995)
Many new features:
- new position specifier (random)
- Mercator projections (-proj)
- rotated views (-rot)
- shading discontinuity at terminator (-term)
- rendering X image only once (-once)
- user-specifiable marker information (-markerfile)
- user-specifiable marker alignment (align=xxx)
- user-specifiable label position (-labelpos)
- mix of single- and double-pixel stars (-bigstars)
- support for new display depths (12, 15, 16, and 24 bits)
- inclusion of Robert Berger's gamma test image
Plenty of general code tuning and cleaning.
New copyright notice to reflect Unisys Corporation's patent on the
LZW compression technique employed in the GIF file format.
xearth version 0.92 (1 June 1994)
Fixed the broken code that was attempting to handle the situation
when the requested font couldn't be loaded.
Added black border/outline to label text (as was already being done
for marker text).
Several small changes to keep lint happier.
xearth version 0.91 (25 May 1994)
Added code #ifdef-ed by NO_RANDOM and NO_SETPRIORITY to provide a
standard workaround for systems without random() and/or
setpriority().
First cut at support for monochrome mode and 1-bit framebuffers.
Monochrome mode is the default on 1-bit framebuffers; it can also be
enabled with the "-mono" command line flag or the ".mono" X
resource.
Provided built-in bzero() workalike to avoid problems with pre-X11R5
systems not having <X11/Xfuncs.h> and dealing with the ugly
machinations required to automatically determine the right thing to
do.
Fixed bug in man page; the description of the interpretation of
positive and negative values of longitude was incorrect.
Fixed and uncommented the code that tries to kill the resources of
any previous clients that had scribbled on the root window and left
an _XSETROOT_ID property. (Note that xearth still doesn't set an
_XSETROOT_ID property itself; see the big comment near line 380 of
x11.c for details.)
Minor performance tweaks and a few bug fixes in the dithering code.
Added complete text of copyright to all source and documentation
files (necessary for inclusion in the X11R6 contrib package).
xearth version 0.9 (14 May 1994)
Wholesale changes. Many new features, including:
- child process no longer forked by default
- support for fixed, sun-relative, and orbital viewing positions
- lines of longitude and latitude
- (random) star-filled backgrounds
- support for both command line options and X resources
- brightly-colored location markers
plus numerous other small changes and bug fixes.
xearth version 0.5 (23 July 1993)
Initial release
----------------------------------------------------------------
Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
Parts of the source code (as marked) are:
Copyright (C) 1989, 1990, 1991 by Jim Frost
Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
Permission to use, copy, modify and freely distribute xearth for
non-commercial and not-for-profit purposes is hereby granted without
fee, provided that both the above copyright notice and this permission
notice appear in all copies and in supporting documentation.
Unisys Corporation holds worldwide patent rights on the Lempel Zev
Welch (LZW) compression technique employed in the CompuServe GIF image
file format as well as in other formats. Unisys has made it clear,
however, that it does not require licensing or fees to be paid for
freely distributed, non-commercial applications (such as xearth) that
employ LZW/GIF technology. Those wishing further information about
licensing the LZW patent should contact Unisys directly at
(lzw_info@unisys.com) or by writing to
Unisys Corporation
Welch Licensing Department
M/S-C1SW19
P.O. Box 500
Blue Bell, PA 19424
The author makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
MIPS IRIX64 6.0.1 (none)
MIPS Ultrix 4.4 (none)
Pentium NeXT Mach 3.3 (none)
SPARC SunOS 4.1.3 (none)
SPARC Solaris 2.4 -DNO_RANDOM -DNO_SETPRIORITY
i486 Linux 1.2 (none)
Some compilers take an inordinately long time to compile
mapdata.c, especially when running on systems without very much
physical memory (e.g., 16 MB or less).
MANIFEST
README xearth-1.0/BUILT-IN 444 26503 144 13461 6031124513 7111 # This file contains the "built-in" marker data that is compiled into
# xearth. (My apologies for misspellings, omissions of your favorite
# location, or geographic inaccuracies. This is primarily just a pile
# of data that I had handy instead of an attempt to provide a sample
# that is "globally correct" in some sense.)
#
# RCS $Id: BUILT-IN,v 1.4 1995/09/24 00:41:45 tuna Exp $
#
# Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
#
# Parts of the source code (as marked) are:
# Copyright (C) 1989, 1990, 1991 by Jim Frost
# Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
#
# Permission to use, copy, modify and freely distribute xearth for
# non-commercial and not-for-profit purposes is hereby granted without
# fee, provided that both the above copyright notice and this
# permission notice appear in all copies and in supporting
# documentation.
#
# Unisys Corporation holds worldwide patent rights on the Lempel Zev
# Welch (LZW) compression technique employed in the CompuServe GIF
# image file format as well as in other formats. Unisys has made it
# clear, however, that it does not require licensing or fees to be
# paid for freely distributed, non-commercial applications (such as
# xearth) that employ LZW/GIF technology. Those wishing further
# information about licensing the LZW patent should contact Unisys
# directly at (lzw_info@unisys.com) or by writing to
#
# Unisys Corporation
# Welch Licensing Department
# M/S-C1SW19
# P.O. Box 500
# Blue Bell, PA 19424
#
# The author makes no representations about the suitability of this
# software for any purpose. It is provided "as is" without express or
# implied warranty.
#
# THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
# NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
61.17 -150.00 "Anchorage" # Alaska, USA
38.00 23.73 "Athens" # Greece
33.4 44.4 "Baghdad" # Iraq
13.73 100.50 "Bangkok" # Thailand
39.92 116.43 "Beijing" # China
52.53 13.42 "Berlin" # Germany
32.3 -64.7 "Bermuda" # Bermuda
42.33 -71.08 "Boston" # Massachusetts, USA
-15.8 -47.9 "Brasilia" # Brazil
-4.2 15.3 "Brazzaville" # Congo
-34.67 -58.50 "Buenos Aires" # Argentina
31.05 31.25 "Cairo" # Egypt
22.5 88.3 "Calcutta" # India
-33.93 18.47 "Cape Town" # South Africa
33.6 -7.6 "Casablanca" # Morocco (Rabat?)
41.83 -87.75 "Chicago" # Illinois, USA
32.78 -96.80 "Dallas" # Texas, USA
28.63 77.20 "New Delhi" # India
39.75 -105.00 "Denver" # Colorado, USA
24.23 55.28 "Dubai" # UAE (Abu Dhabi?)
-27.1 -109.4 "Easter Island" # Easter Island
-18.0 178.1 "Fiji" # Fiji
13.5 144.8 "Guam" # Guam
60.13 25.00 "Helsinki" # Finland
22.2 114.1 "Hong Kong" # Hong Kong
21.32 -157.83 "Honolulu" # Hawaii, USA
52.2 104.3 "Irkutsk" # Irkutsk, Russia
41.0 29.0 "Istanbul" # Turkey (Ankara?)
-6.13 106.75 "Jakarta" # Indonesia
31.8 35.2 "Jerusalem" # Israel
34.5 69.2 "Kabul" # Afghanistan
27.7 85.3 "Kathmandu" # Nepal
50.4 30.5 "Kiev" # Ukraine
3.13 101.70 "Kuala Lumpur" # Malaysia
6.45 3.47 "Lagos" # Nigeria
-12.10 -77.05 "Lima" # Peru
51.50 -0.17 "London" # United Kingdom
40.42 -3.72 "Madrid" # Spain
14.6 121.0 "Manila" # The Phillipines
21.5 39.8 "Mecca" # Saudi Arabia
19.4 -99.1 "Mexico City" # Mexico
25.8 -80.2 "Miami" # Florida, USA
6.2 -10.8 "Monrovia" # Liberia
45.5 -73.5 "Montreal" # Quebec, Canada
55.75 37.70 "Moscow" # Russia
-1.28 36.83 "Nairobi" # Kenya
59.93 10.75 "Oslo" # Norway
48.87 2.33 "Paris" # France
-32.0 115.9 "Perth" # Australia
45.5 -122.5 "Portland" # Oregon, USA
-0.2 -78.5 "Quito" # Ecuador
64.15 -21.97 "Reykjavik" # Iceland
-22.88 -43.28 "Rio de Janeiro" # Brazil
41.88 12.50 "Rome" # Italy
11.0 106.7 "Ho Chi Minh City" # Vietnam (Hanoi?)
37.75 -122.45 "San Francisco" # California, USA
9.98 -84.07 "San Jose" # Costa Rica
18.5 -66.1 "San Juan" # Puerto Rico
-33.5 -70.7 "Santiago" # Chile
1.2 103.9 "Singapore" # Singapore
42.67 23.30 "Sofia" # Bulgaria
59.33 18.08 "Stockholm" # Sweden
-33.92 151.17 "Sydney" # Australia
-17.6 -149.5 "Tahiti" # Tahiti
16.8 -3.0 "Timbuktu" # Mali (Bamako?)
35.67 139.75 "Tokyo" # Japan
43.70 -79.42 "Toronto" # Ontario, Canada
32.9 13.2 "Tripoli" # Libya
47.9 106.9 "Ulan Bator" # Mongolia
49.22 -123.10 "Vancouver" # B.C., Canada
48.22 16.37 "Vienna" # Austria
38.9 -77.0 "Washington" # United States
-41.28 174.78 "Wellington" # New Zealand
62.5 -114.3 "Yellowknife" # N.T., Canada
90.00 0.00 "North Pole" # North Pole
-90.00 0.00 "South Pole" # South Pole
# China
52.53 13.42 "Berlin" # Germany
32.3 -64.7 "Bermuda" # Bermuda
42.33 -71.08 "Boston" # Massachusetts, USA
-15.8 -47.9 "Brasilia" xearth-1.0/GAMMA-TEST 444 26503 144 1564 6021700277 7314 RCS $Id: GAMMA-TEST,v 1.2 1995/09/01 21:53:03 tuna Exp $
This information is taken nearly verbatim from Robert Berger's web
document
Why Do Images Appear Darker on Some Displays?
An Explanation of Monitor Gamma
(URL http://www.cs.cmu.edu/afs/cs.cmu.edu/user/rwb/www/gamma.html)
Those interested in further information about monitor gamma and gamma
correction should start by reading that document.
The gamma measurement image (gamma-test.gif) included in the xearth
source distribution allows you to directly estimate the gamma of your
display system. After loading the gamma-test.gif image for viewing
using your favorite image viewer (e.g., xv, xloadimage), stand about 6
feet away from your monitor and decide which column of the image comes
closest to having equal brightness in the top and bottom halves. The
number under this column is the gamma of your display system.
# Norway
48.87 2.33 "Paris" # France
-32.0 115.9 "Perth" # Australia
45.5 -122.5 "Portland" xearth-1.0/gamma-test.gif 444 26503 144 7154 6021700070 10510 GIF87a# vvvkkk___PPP@@@""" , # I8ͻ`(dihlp|:
m8Ypa~H5ZSu[V`/Ov:#_|N/̒bx
Svs|υӍדۚߡ㨮篵븊pȵ̊ؗڸy8rzC:wwL?!Q
DਃU[(C]#
Gŋ}i<ıc 9I=R&r˗29LM=pɸ3Z$'GO&UiXOAjtim֣`4즒iQ]b%f{l
=Vm44-c֪o`nhKZխ_{hʹe">X)7I#RjlA5^Dw@R?aDB5;ETUuv]P 8!K>$sIG`R!H!r37%sB)R!<t^f}a`
6;"uZqƩv_0Ţ d~v{$fEIJKYcu`mS4W-s]t{.ٙ `Iё%iϓE&pSgߛ)'trdoiTVI}]_N&<xڣFovb(안Bh耾*uhrb5iTs.j˞tKR]+אk$
aĊm8-lq'y!Ln`2`bʭ/ ƼΆ#4:ȳ> x+2',+|X<NT_Y<*j\0d_OCRɩSWS[M2GJ6svJ+7tcx}Jū.kՇ'LKpV~R*EEIZs®
n*Å_@T6n_~%S-O4ՊZ[ӄ2@eoP+';h)sjT8lIEsZ/uLjSl#W1[,?zWA|I_YAu-B}(.--@ ?=ۘj3lX
vÈpb%$hۢW/-;ʈ3lZ;ˇ6q\D)dzǠ2n=zECVs43<J-T*5sdG:DGԂF: nc.Lk?10RI4eP6=QКFB+ d-/B=l3&d jіԣ:-N~r77;鏛>7
L
2))'MuAM|pc2I6e9+j9jbNk#h*eoiI'Ўpt$K_f~_Gn!-۩zZ/=vos6QHϺqr(.jhj.UQQӄ {S_HiVVLzW5
y*
BYa?o+[Ӧ&ԛH;_Cyz<dV?=/\S+!?
%:j`.tk1]4Hm\Emw^zmwǛԅ|{^Ww[7/;^x
^w
i~` C۽0zg歆`:Ub
qkb
4[cS.Ec8C} yL~b*1c'^0[.
ްAo,4yq&re:~v3<h9N2LhEuVt=g'̖F2|>gIiFsZӞ>57d-xԟpjQO֩nu*ʿr\!nEٹvmj.;ͦmdYυvapCNt]mr'ۈ6wodU˺ָýY[רwyp[BpW྆8%.l^}
}WFEmmO&yM^nexG*OyW~/~b~o|78X'<Mә>W[I5<H_ҧ>]{վe閷s\<qX=p7g>ww|x{7xzv=dO>f?1tҟoc;%s\܀.<{挏ߟ7?/o{g짟y_}=_{?U|~w!{} h|8nٷ|Hx}7Xt~Wv~뇂z&X%('4Ȃ2x}'}t?:hG
קȄ>(G|gHb5~0)xhDž!(F1h#(z]883_g@ECUSH}xDȀ~x|v(xhXo^p`xtp肔(8mi؉sah{A8ȈRT8(e8kzx۸(؋X(Hxȍ֘9 鏙؎<}8In8IYǸyɐ Ɍْ
Iu/I1Ɇ+Y.ɒ3)ܷ8! BAg<$?9)M Ri9 {7ISi)U9~]9_Y(ِyDPɑkOɎNEoٓvtɖrY]]O&GgKSŘ~)j20Yyٙ9Yyٚ9YyoF4@4ٛ)k<6ƙi)doy}<,٩ŠH) `y)y)<Н 橛ٟ9II!%ɜIj*ڠIz 9j 視J)(#j j*,0*٢%y!:(Źf@ڣ*
hOʤGKJ-5JY*[/ڡXH
ɥIJBdڦgʦ1ʥ_]*<wysu:t0jS*}ZJX3ʢuyﵣ]
!ڪ:ZzZ ;pa~H5ZSu[V`/Ov:#_|N/̒bx
Svs|υӍדۚߡ㨮篵븊pȵ̊ؗڸy8rzC:wwL?!Q
DਃU[(C]#
Gŋ}i<ıc 9I=R&r˗29LM=pɸ3Z$'GO&UiXOAjtim֣`4즒iQ]b%f{l
=Vm44-c֪o`nhKZxearth-1.0/xearth.man 444 26503 144 66765 6033034637 10023 .TH xearth 1 "(not for general release)" "MIT LCS"
.\" RCS $Id: xearth.man,v 1.24 1995/09/29 18:23:25 tuna Exp $
.SH NAME
xearth - displays a shaded image of the Earth in the root window
.SH SYNOPSIS
.B xearth
.RB [ \-proj
.I proj_type
]
.RB [ \-pos
.I pos_spec
]
.RB [ \-rot
.I angle
]
.RB [ \-sunpos
.I sun_pos_spec
]
.RB [ \-mag
.I factor
]
.RB [ \-size
.I size_spec
]
.RB [ \-shift
.I shift_spec
]
.RB [ \-shade \fP|\fB \-noshade ]
.RB [ \-label \fP|\fB \-nolabel ]
.RB [ \-labelpos
.I geom
]
.RB [ \-markers \fP|\fB \-nomarkers ]
.RB [ \-markerfile
.I file
]
.RB [ \-showmarkers ]
.RB [ \-stars \fP|\fB \-nostars ]
.RB [ \-starfreq
.I frequency
]
.RB [ \-bigstars
.I percent
]
.RB [ \-grid \fP|\fB \-nogrid ]
.RB [ \-grid1
.I grid1
]
.RB [ \-grid2
.I grid2
]
.RB [ \-day
.I pct
]
.RB [ \-night
.I pct
]
.RB [ \-term
.I pct
]
.RB [ \-gamma
.I gamma_value
]
.RB [ \-wait
.I secs
]
.RB [ \-timewarp
.I timewarp_factor
]
.RB [ \-time
.I fixed_time
]
.RB [ \-onepix \fP|\fB \-twopix ]
.RB [ \-mono \fP|\fB \-nomono ]
.RB [ \-ncolors
.I num_colors
]
.RB [ \-font
.I font_name
]
.RB [ \-fork \fP|\fB \-nofork ]
.RB [ \-once \fP|\fB \-noonce ]
.RB [ \-nice
.I priority
]
.RB [ \-gif ]
.RB [ \-ppm ]
.RB [ \-display
.I dpyname
]
.RB [ \-version ]
.SH DESCRIPTION
.I Xearth
sets the X root window to an image of the Earth, as seen from your
favorite vantage point in space, correctly shaded for the current
position of the Sun. By default,
.I xearth
updates the displayed image every five minutes. The time between
updates can be changed with the \fB\-wait\fP option (see below);
updates can be disabled completely by using the \fB\-once\fP option
(see below).
.I Xearth
can also render directly into PPM and GIF files instead of drawing in
the root window; see the \fB\-ppm\fP and \fB\-gif\fP options (below).
This man page documents version 1.0 of
.I xearth.
.SH OPTIONS
.LP
\fIXearth\fP understands the following command line options
(corresponding X resources can be found in the following section):
.TP
.B \-proj \fIproj_type\fP
Specify the projection type \fIxearth\fP should use. Supported
projection types are \fImercator\fP and \fIorthographic\fP; these can
either be spelled out in full or abbreviated to \fImerc\fP or
\fIorth\fP, respectively. \fIXearth\fP uses an orthographic projection
by default.
.TP
.B \-pos \fIpos_spec\fP
Specify the position from which the Earth should be viewed. The
\fIpos_spec\fP (position specifier) consists of a keyword, possibly
followed by additional arguments. Valid keywords are: \fIfixed\fP,
\fIsunrel\fP, \fIorbit\fP, and \fIrandom\fP. (If you're having
problems getting \fIxearth\fP to accept a position specifier as a
command line argument, make sure and read the comments about position
specifier delimiters and using explicit quoting in the fifth paragraph
following this one.)
The position specifier keyword \fIfixed\fP should be followed by two
arguments, interpreted as numerical values indicating the latitude and
longitude (expressed in decimal degrees) of a viewing position that is
fixed with respect to the Earth's surface. Positive and negative
values of latitude correspond to positions north and south of the
equator, respectively. Positive and negative values of longitude
correspond to positions east and west of Greenwich, respectively.
The position specifier keyword \fIsunrel\fP should be followed by two
arguments, interpreted as numerical values indicating the offsets in
latitude and longitude (expressed in decimal degrees) of a viewing
position that is fixed with respect to the position of the
Sun. Positive and negative values of latitude and longitude are
interpreted as for the \fIfixed\fP keyword.
The position specifier keyword \fIorbit\fP should be followed by two
arguments, interpreted as numerical values indicating the period (in
hours) and orbital inclination (in decimal degrees) of a simple
circular orbit; the viewing position follows this orbit. Astute
readers will surely note that these parameters are not sufficient to
uniquely specify a single circular orbit. This problem is solved by
limiting the space of possible orbits to those positioned over 0
degrees latitude, 0 degrees longitude at time zero (the Un*x epoch,
see \fBtime(3)\fP).
The position specifier keyword \fIrandom\fP should not be followed by
any arguments. When this keyword is used, the viewing position is
selected at random each time an update occurs.
Components of a position specifier are delimited by either whitespace,
forward slashes (/), or commas. Note that using whitespace to separate
position specifier components when invoking \fIxearth\fP from a shell
may require explicit quoting to ensure the entire position specifier
is passed as a single argument. For example, if you want to use spaces
to delimit components and are using a "typical" shell, you'd need to
use something like:
.nf
-pos "fixed 42.33 -71.08"
.fi
or
.nf
-pos 'fixed 42.33 -71.08'
.fi
to make things work. If you'd rather not have to explicitly quote
things, you can use forward slashes or commas instead of spaces to
separate components, as shown below.
.nf
-pos fixed,42.33,-71.08
-pos fixed/42.33/-71.08
.fi
If a position specifier is not provided, \fIxearth\fP uses a default
position specifier of "sunrel 0 0" (such that the entire day side of
the Earth is always visible).
.TP
.B \-rot \fIangle\fP
Specify a rotated viewing position such that the north is not
"straight up" in the center of the rendered image. Positive values of
\fIangle\fP rotate the rendered image counterclockwise; negative
values rotate the rendered image clockwise. The default value of
\fIangle\fP is 0.
.TP
.B \-sunpos \fIsun_pos_spec\fP
Specify a fixed point on the Earth's surface where the Sun is always
directly overhead. The \fIsun_pos_spec\fP (Sun position specifier)
consists of two components, both numerical values; these components
are interpreted as the latitude and longitude (in decimal degrees) of
the point where the Sun is directly overhead.
The details provided for position specifiers (see above) about the
interpretation of positive and negative latitude and longitude values
and the characters used to delimit specifier components apply to Sun
position specifiers as well.
By default, \fIxearth\fP calculates the actual position of the Sun and
updates this position with the progression of time.
.TP
.B \-mag \fIfactor\fP
Specify the magnification of the displayed image. When the
orthographic projection is in use, the diameter of the rendered Earth
image is \fIfactor\fP times the shorter of the width and height of the
image (see the \fB\-size\fP option, below). For the mercator
projection, the width of the rendered image is \fIfactor\fP times the
width of the image (see the \fB\-size\fP option, below). The default
magnification factor is 1.
.TP
.B \-size \fIsize_spec\fP
Specify the size of the image to be rendered. The \fIsize_spec\fP
(size specifier) consists of two components, both positive integers;
these components are interpreted as the width and height (in pixels)
of the image.
The details provided for position specifiers (see above) about the
characters used to delimit specifier components apply to size
specifiers as well.
When rendering into the X root window, these values default to the
dimensions of the root window. When producing a PPM or GIF file
instead of drawing in the X root window (see the \fB\-ppm\fP and
\fB\-gif\fP options, below), both values default to 512.
.TP
.B \-shift \fIshift_spec\fP
Specify that the center of the rendered Earth image should be shifted
by some amount from the center of the image. The \fIshift_spec\fP
(shift specifier) consists of two components, both integers; these
components are interpreted as the offsets (in pixels) in the X and Y
directions.
The details provided for position specifiers (see above) about the
characters used to delimit specifier components apply to shift
specifiers as well.
By default, the center of the rendered Earth image is aligned with the
center of the image.
.TP
.B \-shade \fP|\fB \-noshade
Enable/disable shading. When shading is enabled, the surface of the
Earth is shaded according to the current position of the Sun (and the
values provided for the \fB\-day\fP, \fB\-night\fP, and \fB\-term\fP
options, below). When shading is disabled, use flat colors (green and
blue) to render land and water. Shading is enabled by default.
.TP
.B \-label \fP|\fB \-nolabel
Enable/disable labeling. If labeling is enabled and \fIxearth\fP is
rendering into the X root window, provide a label that indicates the
current date and time and current viewing and sun positions. The
position of the label can be controlled using the \fB\-labelpos\fP
option (see below). Labeling is disabled by default.
.TP
.B \-labelpos \fIgeom\fP
Specify where the label should be drawn. If labeling is enabled and
\fIxearth\fP is rendering into the X root window, \fIgeom\fP is
interpreted as the "position" part an X-style geometry specification
(\fIe.g.\fP, {+-}<\fIxoffset\fP>{+-}<\fIyoffset\fP>; positive and
negative values of \fIxoffset\fP denote offsets from the left and
right edges of the display, respectively; positive and negative values
of \fIyoffset\fP denote offsets from the top and bottom edges of the
display, respectively) indicating how the label should be positioned.
The label position defaults to "-5-5" (\fIi.e.\fP, five pixels inside
the lower right-hand corner of the display).
.TP
.B \-markers \fP|\fB \-nomarkers
Enable/disable markers. If markers are enabled and \fIxearth\fP is
rendering into the X root window, display small red circles and text
labels indicating the location of interesting places on the Earth's
surface. Markers are enabled by default.
.TP
.B \-markerfile \fIfile\fP
Specify a file from which user-defined marker data (locations and
names) should be read. Each line in the marker data file consists of
three required components: the latitude and longitude (expressed in
decimal degrees) followed by the text of the label that should be
used. Individual components are delimited by either whitespace,
forward slashes (/), or commas. Components that need to include
delimiter characters (\fIe.g.\fP, a multi-word label) should be
enclosed in double quotes. For example, a line in a typical marker
data file might look something like:
.nf
42.33 -71.08 "Boston, MA" # USA
.fi
Everything between a `#' character and the end of a line, inclusive,
is a considered to be a comment. Blank lines and lines containing only
comments are allowed.
In addition to the three required components, \fIxearth\fP supports
optional following "key=value" components. In this version of
\fIxearth\fP, the only supported "key" is "align", which can be used
to control where marker labels are drawn in relation to the marker
proper. Supported alignment values are "left", "right", "above", and
"below"; the default behavior (if no alignment is specified) is
"align=right".
The marker data file is reread every time \fIxearth\fP redraws an
image into the X root window. In this way, the marker positions and
labels can be dynamic (\fIe.g.\fP, given appropriate data sources,
markers could be used to encode hurricane positions, where earthquakes
have happened recently, temperatures at fixed locations, or other
forms of "real-time" data).
\fIXearth\fP includes a built-in set of marker data for 76 major
locations around the world. The built-in data can be selected by
specifying "built-in" for the \fIfile\fP argument; this is the default
behavior. The built-in set of marker data can be examined either by
using the \fB\-showmarkers\fP option (see below) or by reading the
BUILT-IN file included with the \fIxearth\fP source distribution (see
OBTAINING THE \fIXEARTH\fP SOURCE DISTRIBUTION, below).
.TP
.B \-showmarkers
This option indicates that \fIxearth\fP should load the marker data
(whether built-in or user-specified), print a copy of it to standard
out in a form suitable for use with the \fB\-markers\fP option (see
above), and then exit.
.TP
.B \-stars \fP|\fB \-nostars
Enable/disable stars. If stars are enabled, the black background of
"space" is filled with a random pattern of "stars" (individual white
pixels). The fraction of background pixels that are turned into stars
can be controlled with the \fB\-starfreq\fP option (see below). Stars
are enabled by default.
.TP
.B \-starfreq \fIfrequency\fP
Set the density of the random star pattern (see \fB\-stars\fP, above);
\fIfrequency\fP indicates the fraction of background pixels that
should be turned into "stars". The default value of \fIfrequency\fP is
0.002.
.TP
.B \-bigstars \fIpercent\fP
Set the percentage of double-width stars (see \fB\-stars\fP, above);
by default, all stars are a single pixel, but this option can be used
to create some stars that are composed of two horizontal pixels. This
provides a slightly less uniform look to the "night sky".
.TP
.B \-grid \fP|\fB \-nogrid
Enable/disable the display of a longitude/latitude grid on the Earth's
surface. The spacing of major grid lines and dots between major grid
lines can be controlled with the \fB\-grid1\fP and \fB\-grid2\fP
options (see below). Grid display is disabled by default.
.TP
.B \-grid1 \fIgrid1\fP
Specify the spacing of major grid lines if grid display (see
\fB\-grid\fP, above) is enabled; major grid lines are drawn with a
90/\fIgrid1\fP degree spacing. The default value for \fIgrid1\fP is 6,
corresponding to 15 degrees between major grid lines.
.TP
.B \-grid2 \fIgrid2\fP
Specify the spacing of dots along major grid lines if grid display
(see \fB\-grid\fP, above) is enabled. Along the equator and lines of
longitude, grid dots are drawn with a 90/(\fIgrid1\fP x \fIgrid2\fP)
degree spacing. The spacing of grid dots along parallels (lines of
latitude) other than the equator is adjusted to keep the surface
distance between grid dots approximately constant. The default value
for \fIgrid2\fP is 15; combined with the default \fIgrid1\fP value of
6, this corresponds to placing grid dots on a one degree spacing.
.TP
.B \-day \fIpct\fP
Specify the brightness that should be used to shade the day side of
the Earth when shading is enabled. \fIPct\fP should be an integer
between 0 and 100, inclusive, where 0 indicates total darkness and 100
indicates total illumination. This value defaults to 100.
.TP
.B \-night \fIpct\fP
Specify the brightness that should be used to shade the night side of
the Earth when shading is enabled. \fIPct\fP should be an integer
between 0 and 100, inclusive, where 0 indicates total darkness and 100
indicates total illumination. This value defaults to 5 (if this seems
overly dark, you may want to double-check that appropriate gamma
correction is being employed; see \fB\-gamma\fP, below).
.TP
.B \-term \fIpct\fP
Specify the shading discontinuity at the terminator (day/night
line). \fIPct\fP should be an integer between 0 and 100, inclusive. A
value of \fIx\fP indicates that the shading should immediately jump
\fIx\fP percent of the difference between day and night shading values
(see \fB\-day\fP and \fB\-night\fP, above) when crossing from the
night side to the day side of the terminator. Thus a value of 0
indicates no discontinuity (the original \fIxearth\fP behavior), and a
value of 100 yields a maximal discontinuity (such that the entire day
side of the earth is shaded with the \fB\-day\fP shading value). This
value defaults to 1.
.TP
.B \-gamma \fIgamma_value\fP
When \fIxearth\fP is rendering into the X root window, adjust the
colors \fIxearth\fP uses by a gamma value. Values less than 1.0 yield
darker colors; values greater than 1.0 yield brighter colors. The
default \fIgamma_value\fP is 1.0, appropriate for use on systems with
built-in gamma correction. For systems without built-in gamma
correction, appropriate gamma values are often in the 2.3 to 2.6
range.
See the GAMMA-TEST file included with the \fIxearth\fP source
distribution for information about a simple test that allows you to
directly estimate the gamma of your display system (see OBTAINING THE
\fIXEARTH\fP SOURCE DISTRIBUTION, below).
.TP
.B \-wait \fIsecs\fP
When rendering into the X root window, wait \fIsecs\fP seconds between
updates. This value defaults to 300 seconds (five minutes).
.TP
.B \-timewarp \fItimewarp_factor\fP
Scale the apparent rate at which time progresses by
\fItimewarp_factor\fP. The default value of \fItimewarp_factor\fP is
1.0.
.TP
.B \-time \fIfixed_time\fP
Instead of using the current time to determine the "value" of
time-dependent positions (\fIe.g.\fP, the position the sun), use a
particular \fIfixed_time\fP (expressed in seconds since the Un*x epoch
(see \fBtime(3)\fP).
.TP
.B \-onepix \fP|\fB \-twopix
Specify whether \fIxearth\fP should use one or two pixmaps when
rendering into the X root window. If only one pixmap is used, partial
redraws may be visible at times in the root window (when areas of the
root window are exposed and redrawn during the time \fIxearth\fP is
rendering the next image). If two pixmaps are used, \fIxearth\fP uses
them to double-buffer changes such that partial redraws are (almost?)
never seen. Using only one pixmap has the advantage of using quite a
bit less memory in the X server; this can be important in environments
where server-side memory is a fairly limited resource.
Two pixmaps is the default.
.TP
.B \-mono \fP|\fB \-nomono
If rendering into the X root window, enable/disable monochrome mode.
Monochrome mode is enabled by default on systems with one-bit
framebuffers (see the "depth of root window" information provided by
\fBxdpyinfo(1)\fP) and disabled by default otherwise.
.TP
.B \-ncolors \fInum_colors\fP
If rendering into the X root window or a GIF output file, specify the
number of colors that should be used. (If markers are enabled (see
\fB\-markers\fP, above), the actual number of colors used may be one
larger than \fInum_colors\fP.) The default value of \fInum_colors\fP
is 64.
When rendering into the X root window, the maximum allowable value for
\fInum_colors\fP is 1024. In practice, using values of
\fInum_colors\fP larger than twice the number of distinct shades of
red, green, or blue supported by your hardware is likely to provide
little additional benefit, or, in some cases, produce "banding"
effects in the image. Thus, on systems that can support 256 distinct
shades of red, green, or blue (eight bits per component), the largest
practical value of \fInum_colors\fP is around 512. Similarly, on
systems that support only five or six bits per component (\fIe.g.\fP,
many systems with 16-bit displays), the largest practical value of
\fInum_colors\fP is probably around 64.
When rendering into a GIF output file, the maximum allowable value for
\fInum_colors\fP is 256.
.TP
.B \-font \fIfont_name\fP
If rendering into the X root window, use \fIfont_name\fP for drawing
text labels (see \fB\-label\fP and \fB\-markers\fP, above). By
default, \fIxearth\fP uses the "variable" font.
.TP
.B \-fork \fP|\fB \-nofork
When rendering into the X root window, enable/disable forking. If
forking is enabled, \fIxearth\fP forks a child process to handle all
rendering calculations and screen updates (in essence, automatically
putting itself in the background). Forking is disabled by default.
.TP
.B \-once \fP|\fB \-noonce
Disable/enable updates. If updates are enabled and \fIxearth\fP is
rendering into the X root window, \fIxearth\fP updates the displayed
image periodically (the time between updates can be controlled via the
\fB\-wait\fP option, above). If updates are disabled, \fIxearth\fP
only renders an image once and then exits. Updates are enabled by
default.
.TP
.B \-nice \fIpriority\fP
Run the \fIxearth\fP process with priority \fIpriority\fP (see
\fBnice(1)\fP and \fBsetpriority(2)\fP). By default, \fIxearth\fP runs
at the priority of the process that invoked it, usually 0.
.TP
.B \-gif
Instead of drawing in the X root window, write a GIF file (eight-bit
color) to standard out.
.TP
.B \-ppm
Instead of drawing in the X root window, write a PPM file (24-bit
color) to standard out.
.TP
.B \-display \fIdpyname\fP
Attempt to connect to the X display named \fIdpyname\fP.
.TP
.B \-version
Print what version of \fIxearth\fP this is.
.SH X RESOURCES
.LP
The behavior of \fIxearth\fP can also be controlled using the
following X resources:
.TP
.B proj \fP(projection type)
Specify the projection type \fIxearth\fP should use (see \fB-proj\fP,
above).
.TP
.B pos \fP(position specifier)
Specify the position from which the Earth should be viewed (see
\fB\-pos\fP, above).
.TP
.B rot \fP(float)
Specify the viewing rotation (see \fB\-rot\fP, above).
.TP
.B sunpos \fP(sun position specifier)
Specify a fixed point on the Earth's surface where the Sun is always
directly overhead (see \fB\-sunpos\fP, above).
.TP
.B mag \fP(float)
Specify the magnification of the displayed image (see \fB\-mag\fP,
above).
.TP
.B size \fP(size specifier)
Specify the size of the image to be rendered (see \fB\-size\fP,
above).
.TP
.B shift \fP(shift specifier)
Specify that the center of the rendered Earth image should be shifted
by some amount from the center of the image (see \fB\-shift\fP,
above).
.TP
.B shade \fP(boolean)
Enable/disable shading (see \fB\-shade\fP, above).
.TP
.B label \fP(boolean)
Enable/disable labeling (see \fB\-label\fP, above).
.TP
.B labelpos \fP(geometry)
Specify where the label should be drawn (see \fB\-labelpos\fP, above).
.TP
.B markers \fP(boolean)
Enable/disable markers (see \fB\-markers\fP, above).
.TP
.B markerfile \fP(file name)
Specify a file from which user-defined marker data (locations and
names) should be read (see \fB\-markerfile\fP, above).
.TP
.B stars \fP(boolean)
Enable/disable stars (see \fB\-stars\fP, above).
.TP
.B starfreq \fP(float)
Set the density of the random star pattern (see \fB\-starfreq\fP,
above).
.TP
.B bigstars \fP(int)
Set the percentage of stars that are double width (see \fB\-bigstars\fP,
above).
.TP
.B grid \fP(boolean)
Enable/disable the display of a longitude/latitude grid on the Earth's
surface (see \fB\-grid\fP, above).
.TP
.B grid1 \fP(integer)
Specify the spacing of major grid lines if grid display is enabled
(see \fB\-grid1\fP, above).
.TP
.B grid2 \fP(integer)
Specify the spacing of dots along major grid lines if grid display is
enabled (see \fB\-grid2\fP, above).
.TP
.B day \fP(integer)
Specify the brightness that should be used to shade the day side of
the Earth when shading is enabled (see \fB\-day\fP, above).
.TP
.B night \fP(integer)
Specify the brightness that should be used to shade the night side of
the Earth when shading is enabled (see \fB\-night\fP, above).
.TP
.B term \fP(integer)
Specify the shading discontinuity at the terminator (see \fB\-term\fP,
above).
.TP
.B gamma \fP(float)
Specify the gamma correction \fIxearth\fP should use when selecting
colors (see \fB\-gamma\fP, above).
.TP
.B wait \fP(integer)
Specify the delay between updates when rendering into the X root
window (see \fB\-wait\fP, above).
.TP
.B timewarp \fP(float)
Specify the apparent rate at which time progresses (see
\fB\-timewarp\fP, above).
.TP
.B time \fP(integer)
Specify a particular fixed time that should be used to determine the
"value" of time-dependent positions (see \fB\-time\fP, above).
.TP
.B twopix \fP(boolean)
Specify whether \fIxearth\fP should use one or two pixmaps when
rendering into the X root window (see \fB\-onepix\fP and
\fB\-twopix\fP, above).
.TP
.B mono \fP(boolean)
Specify whether \fIxearth\fP should use monochrome mode when rendering
into the X root window (see \fB\-mono\fP and \fB\-nomono\fP, above).
.TP
.B ncolors \fP(integer)
Specify the number of colors \fIxearth\fP should use (see
\fB\-ncolors\fP, above). The \fBncolors\fP resource is only used when
rendering into the X root window -- the number of colors to use when
rendering into a GIF file can only be specified using the
\fB\-ncolors\fP command line option.
.TP
.B font \fP(font name)
Use the named font for drawing text labels (see \fB\-font\fP, above).
.TP
.B fork \fP(boolean)
When rendering into the X root window, enable/disable the automatic
forking of a child process to handle the updates (see \fB\-fork\fP,
above).
.TP
.B once \fP(boolean)
When rendering into the X root window, disable/enable updates for the
displayed image (see \fB\-once\fP, above).
.TP
.B nice \fP(integer)
Specify the priority at which the \fIxearth\fP process should be run
(see \fB\-nice\fP, above).
.SH OBTAINING THE \fIXEARTH\fP SOURCE DISTRIBUTION
The latest-and-greatest version of xearth should always be available
via a link from the xearth WWW home page (URL
http://cag-www.lcs.mit.edu/~tuna/xearth/index.html), or, for the
web-deprived, via anonymous ftp from cag.lcs.mit.edu in /pub/tuna.
.SH NOTES
There are a number of improvements that I'd \fIlove\fP to make to
\fIxearth\fP, but I really should be working on my thesis instead of
hacking on this.
The map information used in
.I xearth
was derived from the "CIA World Data Bank II map database," as taken
from some "cbd" files that were apparently originally generated by
Brian Reid at DEC WRL.
The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated.
Thanks to Robert Berger for allowing me to include his nifty gamma
measurement image and associated text in the \fIxearth\fP source
distribution.
Thanks to Jamie Zawinski for suggesting that I look at his
xscreensaver package for a good example of how to use the resource and
command line option parts of Xt; his code saved me piles of lossage.
Thanks to Chris Metcalf for the -bigstars stuff, a pile of general
source code cleaning, and spell checking everything carefully.
Thanks to Chris Hayward, Chris Metcalf, Sherman Mui, Dan Rich, and
Leonard Zubkoff for giving the pre-release of version 1.0 a test
drive.
Kudos to Jef Poskanzer for his excellent PBMPLUS toolkit.
Finally, thanks to everybody that sent encouragement, suggestions, and
patches. Apologies to the many people whose good ideas didn't make it
into this release.
.SH COPYRIGHT
Copyright (C) 1989, 1990, 1993, 1994, 1995 by Kirk Lauritz Johnson
Portions of the \fIxearth\fP source code, as marked, are:
.nf
Copyright (C) 1989, 1990, 1991 by Jim Frost
Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
.fi
Permission to use, copy, modify and freely distribute xearth for
non-commercial and not-for-profit purposes is hereby granted without
fee, provided that both the above copyright notice and this permission
notice appear in all copies and in supporting documentation.
Unisys Corporation holds worldwide patent rights on the Lempel Zev
Welch (LZW) compression technique employed in the CompuServe GIF image
file format as well as in other formats. Unisys has made it clear,
however, that it does not require licensing or fees to be paid for
freely distributed, non-commercial applications (such as xearth) that
employ LZW/GIF technology. Those wishing further information about
licensing the LZW patent should contact Unisys directly at
(lzw_info@unisys.com) or by writing to
.nf
Unisys Corporation
Welch Licensing Department
M/S-C1SW19
P.O. Box 500
Blue Bell, PA 19424
.fi
The author makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express or
implied warranty.
\fBTHE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.\fP
.SH AUTHOR
.nf
Kirk Johnson <tuna@cag.lcs.mit.edu>
MIT Laboratory for Computer Science
.fi
Patches, bug reports, and suggestions are welcome, but I can't
guarantee that I'll get around to doing anything about them in a
timely fashion.
dow, write xearth-1.0/dither.c 444 26503 144 30462 6031400472 7427 /*
* dither.c
* kirk johnson
* july 1993
*
* RCS $Id: dither.c,v 1.18 1995/09/25 01:09:14 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "xearth.h"
#include "kljcpyrt.h"
static void dither_row_ltor _P((u_char *, u16or32 *));
static void dither_row_rtol _P((u_char *, u16or32 *));
static void mono_dither_row_ltor _P((u16or32 *));
static void mono_dither_row_rtol _P((u16or32 *));
static u_char *level;
static u_short grn_idx[256];
static u_short blu_idx[256];
static s16or32 *curr;
static s16or32 *next;
static int even_row;
int dither_ncolors;
u_char *dither_colormap;
void dither_setup(ncolors)
int ncolors;
{
int i;
int val;
int half;
unsigned nbytes;
half = (ncolors - 2) / 2;
ncolors = half*2 + 2;
dither_ncolors = ncolors;
level = (u_char *) malloc((unsigned) ncolors);
assert(level != NULL);
nbytes = ncolors * 3;
dither_colormap = (u_char *) malloc(nbytes);
assert(dither_colormap != NULL);
xearth_bzero((char *) dither_colormap, nbytes);
level[0] = 0;
for (i=1; i<=half; i++)
{
val = (i * 255) / half;
dither_colormap[i*3+0] = 0;
dither_colormap[i*3+1] = val;
dither_colormap[i*3+2] = 0;
level[i] = val;
i += half;
dither_colormap[i*3+0] = 0;
dither_colormap[i*3+1] = 0;
dither_colormap[i*3+2] = val;
level[i] = val;
i -= half;
}
dither_colormap[(ncolors-1)*3+0] = 255;
dither_colormap[(ncolors-1)*3+1] = 255;
dither_colormap[(ncolors-1)*3+2] = 255;
level[ncolors-1] = 255;
for (i=0; i<256; i++)
{
val = (i * half + 127) / 255;
grn_idx[i] = val;
if (val == 0)
blu_idx[i] = val;
else
blu_idx[i] = val + half;
}
nbytes = (sizeof(s16or32) * 2) * (wdth+2);
curr = (s16or32 *) malloc(nbytes);
assert(curr != NULL);
xearth_bzero((char *) curr, nbytes);
curr += 2;
next = (s16or32 *) malloc(nbytes);
assert(next != NULL);
xearth_bzero((char *) next, nbytes);
next += 2;
even_row = 1;
}
void dither_row(row, rslt)
u_char *row;
u16or32 *rslt;
{
if (even_row)
dither_row_ltor(row, rslt);
else
dither_row_rtol(row, rslt);
even_row = !even_row;
}
void dither_cleanup()
{
free(curr-2);
free(next-2);
free(dither_colormap);
free(level);
}
static void dither_row_ltor(row, rslt)
u_char *row;
u16or32 *rslt;
{
int i, i_lim;
int grn, g_tmp;
int blu, b_tmp;
int idx;
u_char *rowtmp;
s16or32 *currtmp;
s16or32 *nexttmp;
rowtmp = row;
currtmp = curr;
nexttmp = next;
/* use i_lim to encourage compilers to register loop limit
*/
i_lim = wdth;
for (i=0; i<i_lim; i++)
{
grn = rowtmp[1];
blu = rowtmp[2];
if ((grn == 0) && (blu == 0))
{
rslt[i] = 0;
}
else if ((grn == 255) && (blu == 255))
{
rslt[i] = dither_ncolors - 1;
}
else
{
grn += currtmp[0];
blu += currtmp[1];
if (grn > blu)
{
if (grn < 0)
grn = 0;
else if (grn > 255)
grn = 255;
idx = grn_idx[grn];
grn -= level[idx];
}
else
{
if (blu < 0)
blu = 0;
else if (blu > 255)
blu = 255;
idx = blu_idx[blu];
blu -= level[idx];
}
rslt[i] = idx;
/* conceptually, what we want here is something like
*
* g_tmp = (grn<0) ? 7 : 8;
* b_tmp = (blu<0) ? 7 : 8;
* currtmp[ 2] += ((grn * 7) + g_tmp) >> 4;
* currtmp[ 3] += ((blu * 7) + b_tmp) >> 4;
* nexttmp[ 2] += ((grn * 1) + g_tmp) >> 4;
* nexttmp[ 3] += ((blu * 1) + b_tmp) >> 4;
* nexttmp[ 0] += ((grn * 5) + g_tmp) >> 4;
* nexttmp[ 1] += ((blu * 5) + b_tmp) >> 4;
* nexttmp[-2] += ((grn * 3) + g_tmp) >> 4;
* nexttmp[-1] += ((blu * 3) + b_tmp) >> 4;
*
* but we can get tighter code by computing the product terms
* via a sequence of additions into g_tmp and b_tmp
*/
g_tmp = ((grn<0) ? 7 : 8) + grn;
b_tmp = ((blu<0) ? 7 : 8) + blu;
nexttmp[2] += (g_tmp >> 4);
nexttmp[3] += (b_tmp >> 4);
grn += grn;
blu += blu;
g_tmp += grn;
b_tmp += blu;
nexttmp[-2] += (g_tmp >> 4);
nexttmp[-1] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
nexttmp[0] += (g_tmp >> 4);
nexttmp[1] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
currtmp[2] += (g_tmp >> 4);
currtmp[3] += (b_tmp >> 4);
}
rowtmp += 3;
currtmp += 2;
nexttmp += 2;
}
currtmp = curr;
curr = next;
next = currtmp;
xearth_bzero((char *) next, (unsigned) ((sizeof(s16or32) * 2) * wdth));
}
static void dither_row_rtol(row, rslt)
u_char *row;
u16or32 *rslt;
{
int i;
int grn, g_tmp;
int blu, b_tmp;
int idx;
u_char *rowtmp;
s16or32 *currtmp;
s16or32 *nexttmp;
rowtmp = row + 3*(wdth-1);
currtmp = curr + 2*(wdth-1);
nexttmp = next + 2*(wdth-1);
for (i=(wdth-1); i>=0; i--)
{
grn = rowtmp[1];
blu = rowtmp[2];
if ((grn == 0) && (blu == 0))
{
rslt[i] = 0;
}
else if ((grn == 255) && (blu == 255))
{
rslt[i] = dither_ncolors - 1;
}
else
{
grn += currtmp[0];
blu += currtmp[1];
if (grn > blu)
{
if (grn < 0)
grn = 0;
else if (grn > 255)
grn = 255;
idx = grn_idx[grn];
grn -= level[idx];
}
else
{
if (blu < 0)
blu = 0;
else if (blu > 255)
blu = 255;
idx = blu_idx[blu];
blu -= level[idx];
}
rslt[i] = idx;
/* conceptually, what we want here is something like
*
* g_tmp = (grn<0) ? 7 : 8;
* b_tmp = (blu<0) ? 7 : 8;
* currtmp[-2] += ((grn * 7) + g_tmp) >> 4;
* currtmp[-1] += ((blu * 7) + b_tmp) >> 4;
* nexttmp[-2] += ((grn * 1) + g_tmp) >> 4;
* nexttmp[-1] += ((blu * 1) + b_tmp) >> 4;
* nexttmp[ 0] += ((grn * 5) + g_tmp) >> 4;
* nexttmp[ 1] += ((blu * 5) + b_tmp) >> 4;
* nexttmp[ 2] += ((grn * 3) + g_tmp) >> 4;
* nexttmp[ 3] += ((blu * 3) + b_tmp) >> 4;
*
* but we can get tighter code by computing the product terms
* via a sequence of additions into g_tmp and b_tmp
*/
g_tmp = ((grn<0) ? 7 : 8) + grn;
b_tmp = ((blu<0) ? 7 : 8) + blu;
nexttmp[-2] += (g_tmp >> 4);
nexttmp[-1] += (b_tmp >> 4);
grn += grn;
blu += blu;
g_tmp += grn;
b_tmp += blu;
nexttmp[2] += (g_tmp >> 4);
nexttmp[3] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
nexttmp[0] += (g_tmp >> 4);
nexttmp[1] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
currtmp[-2] += (g_tmp >> 4);
currtmp[-1] += (b_tmp >> 4);
}
rowtmp -= 3;
currtmp -= 2;
nexttmp -= 2;
}
currtmp = curr;
curr = next;
next = currtmp;
xearth_bzero((char *) next, (unsigned) ((sizeof(s16or32) * 2) * wdth));
}
void mono_dither_setup()
{
int i;
unsigned nbytes;
nbytes = sizeof(s16or32) * (wdth+2);
curr = (s16or32 *) malloc(nbytes);
assert(curr != NULL);
for (i=0; i<(wdth+2); i++)
curr[i] = (random() & ((1<<9)-1)) - (1<<8);
curr += 1;
next = (s16or32 *) malloc(nbytes);
assert(next != NULL);
xearth_bzero((char *) next, nbytes);
next += 1;
even_row = 1;
}
void mono_dither_row(row, rslt)
u_char *row;
u16or32 *rslt;
{
int i, i_lim;
/* convert row to gray scale (could save a few instructions per
* pixel by integrating this into the mono_dither_row_* functions)
*/
i_lim = wdth;
for (i=0; i<i_lim; i++)
{
rslt[i] = (2 * row[0]) + (5 * row[1]) + row[2];
row += 3;
}
/* dither to 0s (black) and 1s (white)
*/
if (even_row)
mono_dither_row_ltor(rslt);
else
mono_dither_row_rtol(rslt);
even_row = !even_row;
}
void mono_dither_cleanup()
{
free(curr-1);
free(next-1);
}
static void mono_dither_row_ltor(row)
u16or32 *row;
{
int i, i_lim;
int val, tmp;
u16or32 *rowtmp;
s16or32 *currtmp;
s16or32 *nexttmp;
rowtmp = row;
currtmp = curr;
nexttmp = next;
/* use i_lim to encourage compilers to register loop limit
*/
i_lim = wdth;
for (i=0; i<i_lim; i++)
{
val = rowtmp[0];
if (val == 0)
{
rowtmp[0] = 0;
}
else if (val == 2040)
{
rowtmp[0] = 1;
}
else
{
val += currtmp[0];
if (val > 1020)
{
rowtmp[0] = 1;
val -= 2040;
}
else
{
rowtmp[0] = 0;
}
/* conceptually, what we want here is something like
*
* tmp = (val < 0) ? 7 : 8;
* currtmp[ 1] += ((val * 7) + tmp) >> 4;
* nexttmp[ 1] += ((val * 1) + tmp) >> 4;
* nexttmp[ 0] += ((val * 5) + tmp) >> 4;
* nexttmp[-1] += ((val * 3) + tmp) >> 4;
*
* but we can get tighter code by computing the product terms
* via a sequence of additions into tmp
*/
tmp = ((val < 0) ? 7 : 8) + val;
nexttmp[1] += (tmp >> 4);
val += val;
tmp += val;
nexttmp[-1] += (tmp >> 4);
tmp += val;
nexttmp[0] += (tmp >> 4);
tmp += val;
currtmp[1] += (tmp >> 4);
}
rowtmp += 1;
currtmp += 1;
nexttmp += 1;
}
currtmp = curr;
curr = next;
next = currtmp;
xearth_bzero((char *) next, (unsigned) (sizeof(s16or32) * wdth));
}
static void mono_dither_row_rtol(row)
u16or32 *row;
{
int i;
int val, tmp;
u16or32 *rowtmp;
s16or32 *currtmp;
s16or32 *nexttmp;
rowtmp = row + (wdth-1);
currtmp = curr + (wdth-1);
nexttmp = next + (wdth-1);
for (i=(wdth-1); i>=0; i--)
{
val = rowtmp[0];
if (val == 0)
{
rowtmp[0] = 0;
}
else if (val == 2040)
{
rowtmp[0] = 1;
}
else
{
val += currtmp[0];
if (val > 1020)
{
rowtmp[0] = 1;
val -= 2040;
}
else
{
rowtmp[0] = 0;
}
/* conceptually, what we want here is something like
*
* tmp = (val < 0) ? 7 : 8;
* currtmp[-1] += ((val * 7) + tmp) >> 4;
* nexttmp[-1] += ((val * 1) + tmp) >> 4;
* nexttmp[ 0] += ((val * 5) + tmp) >> 4;
* nexttmp[ 1] += ((val * 3) + tmp) >> 4;
*
* but we can get tighter code by computing the product terms
* via a sequence of additions into tmp
*/
tmp = ((val < 0) ? 7 : 8) + val;
nexttmp[-1] += (tmp >> 4);
val += val;
tmp += val;
nexttmp[1] += (tmp >> 4);
tmp += val;
nexttmp[0] += (tmp >> 4);
tmp += val;
currtmp[-1] += (tmp >> 4);
}
rowtmp -= 1;
currtmp -= 1;
nexttmp -= 1;
}
currtmp = curr;
curr = next;
next = currtmp;
xearth_bzero((char *) next, (unsigned) (sizeof(s16or32) * wdth));
}
r (i=0; i<i_lim; i++)
{
grn = rowtmp[1];
blu = rowtmp[2];
if ((grn == 0) && (blu == 0))
{
rslt[i] = 0;
}
else if ((grn == 255) && (blu == 255))
{
rslt[i] = dither_xearth-1.0/extarr.c 444 26503 144 5440 6020276761 7445 /*
* extarr.c
* kirk johnson
* july 1993
*
* RCS $Id: extarr.c,v 1.4 1995/08/28 08:27:20 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "xearth.h"
#include "kljcpyrt.h"
ExtArr extarr_alloc(eltsize)
unsigned eltsize;
{
ExtArr rslt;
rslt = (ExtArr) malloc((unsigned) sizeof(struct extarr));
assert(rslt != NULL);
rslt->eltsize = eltsize;
rslt->limit = 1;
rslt->count = 0;
rslt->body = (void *) malloc((unsigned) eltsize*rslt->limit);
assert(rslt->body != NULL);
return rslt;
}
void extarr_free(x)
ExtArr x;
{
free(x->body);
free(x);
}
void *extarr_next(x)
ExtArr x;
{
unsigned eltsize;
unsigned limit;
unsigned count;
void *body;
void *rslt;
eltsize = x->eltsize;
limit = x->limit;
count = x->count;
body = x->body;
if (count == limit)
{
limit *= 2;
body = (void *) realloc(body, (unsigned) eltsize*limit);
assert(body != NULL);
x->limit = limit;
x->body = body;
}
rslt = (void *) ((char *) body + (count * eltsize));
x->count = count + 1;
return rslt;
}
ttmp[-2] += (g_tmp >> 4);
nexttmp[-1] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
nexttmp[0] += (g_tmp >> 4);
nexttmp[1] += (b_tmp >> 4);
g_tmp += grn;
b_tmp += blu;
currtmp[2xearth-1.0/extarr.h 444 26503 144 4203 6031124567 7444 /*
* extarr.h
* kirk johnson
* july 1993
*
* RCS $Id: extarr.h,v 1.5 1995/09/24 00:42:28 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _EXTARR_H_
#define _EXTARR_H_
typedef struct extarr
{
unsigned eltsize;
unsigned limit;
unsigned count;
void *body;
} *ExtArr;
extern ExtArr extarr_alloc _P((unsigned));
extern void extarr_free _P((ExtArr));
extern void *extarr_next _P((ExtArr));
#endif
dy = (void *) malloc((unsigned) eltsize*rslt->limit);
assert(rslt->body != NULL);
return rslt;
}
void extarr_free(x)
ExtArr x;
{
free(x->body);
free(x);
}
void *extarr_next(x)
ExtArr x;
{
unsigned eltsize;
unsigned limit;
unsigned count;
void *body;
void *rslt;
eltsize = x->eltsize;
limit = x->limit;
count = x->count;
body =xearth-1.0/gif.c 444 26503 144 6406 6031400527 6677 /*
* gif.c
* kirk johnson
* july 1993
*
* RCS $Id: gif.c,v 1.12 1995/09/25 01:09:42 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "xearth.h"
#include "giflib.h"
#include "kljcpyrt.h"
static void gif_setup _P((FILE *));
static void gif_row _P((u_char *));
static void gif_cleanup _P((void));
static u16or32 *dith;
void gif_output()
{
compute_positions();
scan_map();
do_dots();
gif_setup(stdout);
render(gif_row);
gif_cleanup();
}
static void gif_setup(s)
FILE *s;
{
int i;
int rtn;
BYTE cmap[3][256];
if (num_colors > 256)
fatal("number of colors must be <= 256 with GIF output");
dither_setup(num_colors);
dith = (u16or32 *) malloc((unsigned) sizeof(u16or32) * wdth);
assert(dith != NULL);
for (i=0; i<dither_ncolors; i++)
{
cmap[0][i] = dither_colormap[i*3+0];
cmap[1][i] = dither_colormap[i*3+1];
cmap[2][i] = dither_colormap[i*3+2];
}
rtn = gifout_open_file(s, wdth, hght, dither_ncolors, cmap, 0);
assert(rtn == GIFLIB_SUCCESS);
rtn = gifout_open_image(0, 0, wdth, hght);
assert(rtn == GIFLIB_SUCCESS);
}
static void gif_row(row)
u_char *row;
{
int i, i_lim;
u16or32 *tmp;
tmp = dith;
dither_row(row, tmp);
/* use i_lim to encourage compilers to register loop limit
*/
i_lim = wdth;
for (i=0; i<i_lim; i++)
gifout_put_pixel((int) tmp[i]);
}
static void gif_cleanup()
{
int rtn;
rtn = gifout_close_image();
assert(rtn == GIFLIB_SUCCESS);
rtn = gifout_close_file();
assert(rtn == GIFLIB_SUCCESS);
dither_cleanup();
free(dith);
}
oid dither_row_rtol(row, rslt)
u_char *row;
u16or32 *rslt;
{
int i;
int grn, g_tmp;
int blu, b_tmp;
int idx;
u_char *rowtmp;
s16or32 *currtmp;
s16or32 *nexttmp;
rowtmp = row + 3*(wdth-1);
currtmp =xearth-1.0/gifint.h 444 26503 144 5026 6020276763 7427 /*
* giflib/gifint.h
* kirk johnson
* november 1989
*
* RCS $Id: gifint.h,v 1.5 1995/08/28 08:27:20 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _GIFINT_H_
#define _GIFINT_H_
#include "giflib.h"
#include "kljcpyrt.h"
#define GIF_SIG "GIF87a"
#define GIF_SIG_LEN ((unsigned) 6) /* GIF signature length */
#define GIF_SD_SIZE ((unsigned) 7) /* GIF screen descriptor size */
#define GIF_ID_SIZE ((unsigned) 9) /* GIF image descriptor size */
#define GIF_SEPARATOR ',' /* GIF image separator */
#define GIF_EXTENSION '!' /* GIF extension block marker */
#define GIF_TERMINATOR ';' /* GIF terminator */
#define STAB_SIZE 4096 /* string table size */
#define PSTK_SIZE 4096 /* pixel stack size */
#define NULL_CODE -1 /* string table null code */
#endif
[i*3+0];
cmap[1][i] = dither_colormap[i*3+1];
cmap[2][i] = dither_colormap[i*3+2];
}
rtn = gifout_open_file(s, wdth, hght, dither_ncolors, cmap, 0);
assert(rtn == GIFLIB_SUCCESS);
rtn = gifout_open_image(0, 0, wdth, hght);
assert(rtn == GIFLIB_SUCCESS);
}
static void gif_row(row)
u_char *row;
{
int i, i_lim;
u16or32 *tmp;
tmp = dith;
dither_row(row, tmp);
/* use i_lim to encourage compilers to register loop limit
*/
i_lim = wdth;
for (xearth-1.0/giflib.h 444 26503 144 11062 6031124627 7411 /*
* giflib/giflib.h
* kirk johnson
* may 1990
*
* RCS $Id: giflib.h,v 1.5 1995/09/24 00:43:00 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _GIFLIB_H_
#define _GIFLIB_H_
#include "kljcpyrt.h"
/*
* giflib return codes
*/
#define GIFLIB_SUCCESS 0 /* success */
#define GIFLIB_DONE 1 /* no more images */
#define GIFLIB_ERR_BAD_SD -1 /* bad screen descriptor */
#define GIFLIB_ERR_BAD_SEP -2 /* bad image separator */
#define GIFLIB_ERR_BAD_SIG -3 /* bad signature */
#define GIFLIB_ERR_EOD -4 /* unexpected end of raster data */
#define GIFLIB_ERR_EOF -5 /* unexpected end of input stream */
#define GIFLIB_ERR_OUT -6 /* i/o output error */
#define GIFLIB_ERR_FAO -7 /* file already open */
#define GIFLIB_ERR_IAO -8 /* image already open */
#define GIFLIB_ERR_ISO -9 /* image still open */
#define GIFLIB_ERR_NFO -10 /* no file open */
#define GIFLIB_ERR_NIO -11 /* no image open */
/*
* colormap indices
*/
#define GIFLIB_RED 0
#define GIFLIB_GRN 1
#define GIFLIB_BLU 2
/*
* typedef BYTE for convenience
*/
typedef unsigned char BYTE;
#ifdef USING_GIF_IN
/*
* procedures exported by gifin.c
*/
extern int gifin_open_file();
extern int gifin_open_image();
extern int gifin_get_pixel();
extern int gifin_get_row();
extern int gifin_close_image();
extern int gifin_close_file();
/*
* variables exported by gifin.c
*/
extern int gifin_rast_width; /* raster width */
extern int gifin_rast_height; /* raster height */
extern BYTE gifin_g_cmap_flag; /* global colormap flag */
extern int gifin_g_pixel_bits; /* bits per pixel, global colormap */
extern int gifin_g_ncolors; /* number of colors, global colormap */
extern BYTE gifin_g_cmap[3][256]; /* global colormap */
extern int gifin_bg_color; /* background color index */
extern int gifin_color_bits; /* bits of color resolution */
extern int gifin_img_left; /* image position on raster */
extern int gifin_img_top; /* image position on raster */
extern int gifin_img_width; /* image width */
extern int gifin_img_height; /* image height */
extern BYTE gifin_l_cmap_flag; /* local colormap flag */
extern int gifin_l_pixel_bits; /* bits per pixel, local colormap */
extern int gifin_l_ncolors; /* number of colors, local colormap */
extern BYTE gifin_l_cmap[3][256]; /* local colormap */
extern BYTE gifin_interlace_flag; /* interlace image format flag */
#endif /* USING_GIF_IN */
/*
* procedures exported by gifout.c
*/
extern int gifout_open_file _P((FILE *, int, int, int, BYTE [3][256], int));
extern int gifout_open_image _P((int, int, int, int));
extern void gifout_put_pixel _P((int));
extern void gifout_put_row _P((int *));
extern int gifout_close_image _P((void));
extern int gifout_close_file _P((void));
#endif
blu * 5) + b_tmp) >> 4;
* nexttmp[ 2] += ((grn * 3) + g_tmp) >> 4;
* nexttmp[ 3] += ((blu * 3) + b_tmp) >> 4;
*
* but we can get tighter code by computing the product terms
* via a sequence of additions into g_tmp and b_tmp
*/
g_tmp = ((grn<0) ? 7 : 8) + grn;
b_tmp = ((blu<0) ? 7 : 8) + blu;
nexttmp[-2] += (g_tmp >> 4);
nexttmp[-1] += (b_tmp >> 4);
grn += grn;
blu += blu;
xearth-1.0/gifout.c 444 26503 144 27531 6031166156 7460 /*
* giflib/gifout.c
* kirk johnson
* may 1990
*
* RCS $Id: gifout.c,v 1.7 1995/09/24 05:28:01 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdio.h>
#include "port.h"
#include "gifint.h"
#include "kljcpyrt.h"
/****
**
** local #defines
**
****/
#define HASHSZ (2048)
#define HASH(p, e) (((p)&(HASHSZ-1))^(e))
#define PUT_CODE(val) \
{ \
work_data |= ((long) (val) << work_bits); \
work_bits += code_size; \
while (work_bits >= 8) \
{ \
PUT_BYTE(work_data & 0xFF); \
work_data >>= 8; \
work_bits -= 8; \
} \
}
#define PUT_BYTE(val) \
{ \
buf[buf_idx++] = (val); \
if (buf_idx == 255) \
{ \
write_data_block(255, buf, outs); \
buf_idx = 0; \
} \
}
/****
**
** local variables
**
****/
static int cmap_bits _P((int));
static int root_bits _P((int));
static void put_clr_code _P((void));
static void write_data_block _P((int, BYTE *, FILE *));
static void reset_string_out _P((void));
static void add_string_out _P((int, int));
static int find_string_out _P((int, int));
static void gifout_fatal _P((const char *)) _noreturn;
static BYTE file_open = 0; /* status flags */
static BYTE image_open = 0;
static int rast_width; /* raster width */
static int rast_height; /* raster height */
static int ncolors; /* number of colors */
static int img_width; /* image width */
static int img_height; /* image height */
static FILE *outs; /* output file */
static int root_size; /* root code size */
static int clr_code; /* clear code */
static int eoi_code; /* end of info code */
static int code_size; /* current code size */
static int code_mask; /* current code mask */
static int old_code; /* previous code */
static long work_data; /* working bits */
static int work_bits; /* working bit count */
static BYTE buf[256]; /* byte buffer */
static int buf_idx; /* buffer index */
static int table_size; /* string table size */
static int htable[HASHSZ];
static int pref_extn[STAB_SIZE]; /* (prefix << 16) | extension */
static int next[STAB_SIZE];
/****
**
** exported procedures
**
****/
/*
* open a GIF file for writing on stream s
*/
int gifout_open_file(s, w, h, sz, cmap, bg)
FILE *s;
int w; /* raster width (in pixels) */
int h; /* raster height (in pixels) */
int sz; /* number of colors */
BYTE cmap[3][256]; /* global colormap */
int bg; /* background color index */
{
int i;
int pixel_bits;
/* make sure there isn't already a file open */
if (file_open)
return GIFLIB_ERR_FAO;
/* remember that we've got this file open */
file_open = 1;
outs = s;
rast_width = w;
rast_height = h;
/* write GIF signature */
if (fwrite(GIF_SIG, sizeof(char), GIF_SIG_LEN, outs) != GIF_SIG_LEN)
return GIFLIB_ERR_OUT;
/* write screen descriptor */
pixel_bits = cmap_bits(sz);
ncolors = 1 << pixel_bits;
buf[0] = (w & 0x00FF);
buf[1] = (w & 0xFF00) >> 8;
buf[2] = (h & 0x00FF);
buf[3] = (h & 0xFF00) >> 8;
buf[4] = (pixel_bits - 1) | 0x80;
buf[5] = bg;
buf[6] = 0;
if (fwrite(buf, sizeof(char), GIF_SD_SIZE, outs) != GIF_SD_SIZE)
return GIFLIB_ERR_OUT;
/* write (global) color map */
for (i=0; i<sz; i++)
{
buf[GIFLIB_RED] = cmap[GIFLIB_RED][i];
buf[GIFLIB_GRN] = cmap[GIFLIB_GRN][i];
buf[GIFLIB_BLU] = cmap[GIFLIB_BLU][i];
if (fwrite(buf, sizeof(BYTE), (unsigned) 3, outs) != 3)
return GIFLIB_ERR_OUT;
}
for (i=sz; i<ncolors; i++)
{
buf[GIFLIB_RED] = 0;
buf[GIFLIB_GRN] = 0;
buf[GIFLIB_BLU] = 0;
if (fwrite(buf, sizeof(BYTE), (unsigned) 3, outs) != 3)
return GIFLIB_ERR_OUT;
}
/* done! */
return GIFLIB_SUCCESS;
}
/*
* open a new GIF image for writing in the current GIF file
*/
int gifout_open_image(left, top, w, h)
int left; /* column index for left edge */
int top; /* row index for top edge */
int w; /* image width (in pixels) */
int h; /* image height (in pixels) */
{
/* make sure there's a file open */
if (!file_open)
return GIFLIB_ERR_NFO;
/* make sure there isn't already an image open */
if (image_open)
return GIFLIB_ERR_IAO;
/* remember that we've got this image open */
image_open = 1;
img_width = w;
img_height = h;
/* write image separator */
putc(GIF_SEPARATOR, outs);
/* write image descriptor */
buf[0] = (left & 0x00FF);
buf[1] = (left & 0xFF00) >> 8;
buf[2] = (top & 0x00FF);
buf[3] = (top & 0xFF00) >> 8;
buf[4] = (w & 0x00FF);
buf[5] = (w & 0xFF00) >> 8;
buf[6] = (h & 0x00FF);
buf[7] = (h & 0xFF00) >> 8;
buf[8] = 0;
if (fwrite(buf, sizeof(BYTE), GIF_ID_SIZE, outs) != GIF_ID_SIZE)
return GIFLIB_ERR_OUT;
/* initialize raster data stream */
root_size = root_bits(ncolors);
putc(root_size, outs);
clr_code = 1 << root_size;
eoi_code = clr_code + 1;
code_size = root_size + 1;
code_mask = (1 << code_size) - 1;
old_code = NULL_CODE;
work_bits = 0;
work_data = 0;
buf_idx = 0;
/* initialize string table */
reset_string_out();
/* output initial clear code */
put_clr_code();
/* done! */
return GIFLIB_SUCCESS;
}
/*
* write a pixel into the current image
*/
void gifout_put_pixel(val)
int val; /* pixel color index */
{
int idx;
/* see if string is in table already */
idx = find_string_out(old_code, val);
if (idx != NULL_CODE)
{
/* found a match */
old_code = idx;
}
else
{
/* no match */
PUT_CODE(old_code);
add_string_out(old_code, val);
old_code = val;
/* check for full string table */
if (table_size == STAB_SIZE)
{
/* output remaining code */
PUT_CODE(old_code);
/* reset encoder */
put_clr_code();
}
}
}
/*
* write a row of pixels into the current image
*/
void gifout_put_row(row)
int *row; /* array of size img_width */
{
int col;
int idx;
for (col=0; col<img_width; col++)
{
/* see if string is in table already */
idx = find_string_out(old_code, row[col]);
if (idx != NULL_CODE)
{
/* found a match */
old_code = idx;
}
else
{
/* no match */
PUT_CODE(old_code);
add_string_out(old_code, row[col]);
old_code = row[col];
/* check for full string table */
if (table_size == STAB_SIZE)
{
/* output remaining code */
PUT_CODE(old_code);
/* reset encoder */
put_clr_code();
}
}
}
}
/*
* close an open GIF image
*/
int gifout_close_image()
{
/* make sure there's an image open */
if (!image_open)
return GIFLIB_ERR_NIO;
/* flush any remaining code */
if (old_code != NULL_CODE)
PUT_CODE(old_code);
/* output end of info code */
PUT_CODE(eoi_code);
/* flush any extra bits */
while (work_bits > 0)
{
PUT_BYTE(work_data & 0xFF);
work_data >>= 8;
work_bits -= 8;
}
/* flush any extra bytes */
if (buf_idx > 0)
write_data_block(buf_idx, buf, outs);
/* trailing zero byte */
putc(0, outs);
/* mark image as closed */
image_open = 0;
/* done! */
return GIFLIB_SUCCESS;
}
/*
* close an open GIF file
*/
int gifout_close_file()
{
/* make sure there's a file open */
if (!file_open)
return GIFLIB_ERR_NFO;
/* make sure there isn't an image open */
if (image_open)
return GIFLIB_ERR_ISO;
/* write gif terminator */
putc(GIF_TERMINATOR, outs);
/* mark file as closed */
file_open = 0;
/* done! */
return GIFLIB_SUCCESS;
}
/****
**
** internal procedures
**
****/
static int cmap_bits(n)
int n;
{
int nbits;
if (n < 2)
gifout_fatal("cmap_bits(): argument out of range");
n -= 1;
nbits = 0;
while (n != 0)
{
n >>= 1;
nbits += 1;
}
return nbits;
}
static int root_bits(n)
int n;
{
int rslt;
rslt = cmap_bits(n);
if (rslt < 2)
rslt = 2;
return rslt;
}
static void put_clr_code()
{
/* output clear code */
PUT_CODE(clr_code);
/* reset raster data stream */
code_size = root_size + 1;
code_mask = (1 << code_size) - 1;
old_code = NULL_CODE;
/* clear the string table */
reset_string_out();
}
static void write_data_block(cnt, outbuf, s)
int cnt;
BYTE *outbuf;
FILE *s;
{
putc(cnt, s);
if (fwrite(outbuf, sizeof(BYTE), (unsigned) cnt, s) != cnt)
gifout_fatal("write_data_block(): problems writing data block");
}
static void reset_string_out()
{
int i;
for (i=0; i<HASHSZ; i++)
htable[i] = NULL_CODE;
table_size = eoi_code + 1;
}
static void add_string_out(p, e)
int p;
int e;
{
int idx;
idx = HASH(p, e);
pref_extn[table_size] = (p << 16) | e;
next[table_size] = htable[idx];
htable[idx] = table_size;
if ((table_size > code_mask) && (code_size < 12))
{
code_size += 1;
code_mask = (1 << code_size) - 1;
}
table_size += 1;
}
static int find_string_out(p, e)
int p;
int e;
{
int idx;
int tmp;
int rslt;
if (p == NULL_CODE)
{
/* a lone symbol is always in table */
rslt = e;
}
else
{
rslt = NULL_CODE;
/* search the hash table */
idx = htable[HASH(p, e)];
tmp = (p << 16) | e;
while (idx != NULL_CODE)
{
if (pref_extn[idx] == tmp)
{
rslt = idx;
break;
}
else
{
idx = next[idx];
}
}
}
return rslt;
}
/*
* semi-graceful fatal error mechanism
*/
static void gifout_fatal(msg)
const char *msg;
{
fprintf(stderr, "\n");
fprintf(stderr, "gifout.c: fatal error\n");
fprintf(stderr, " %s\n", msg);
exit(1);
}
static int old_code; /* previous code */
static long work_data; /* working bits */
static int work_bits; /* working bit count */
statixearth-1.0/kljcpyrt.h 444 26503 144 3736 6031124745 10011 #ifndef _KLJ_COPYRIGHT_
#define _KLJ_COPYRIGHT_
/*
* RCS $Id: kljcpyrt.h,v 1.8 1995/09/24 00:44:18 tuna Exp $
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
static const char *Copyright =
"Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson";
#endif
(in pixels) */
int h; xearth-1.0/mapdata.c 444 26503 144 1016714 6024223475 7634 /*
* mapdata.c
* kirk johnson
* july 1993
*
* RCS $Id: mapdata.c,v 1.6 1995/09/09 05:33:38 tuna Exp $
*
* map_data[] is a big array of short (16-bit) ints, as follows:
*
* - the map_data[] info is a sequence of closed curves
*
* - the first value in a curve is the number of points in the curve
*
* - the second value in a curve indicates land/water (1 or -1,
* respectively)
*
* - this is followed by an [x,y,z] triple that indicates a point on
* the unit sphere (each of x, y, and z has been scaled by 30000),
* where the x axis points "to the right" (towards 0 N 90 E), the y
* axis points "up" (towards the north pole), and the z axis points
* "out of the screen" (towards 0 N 0 E). this is the starting point
* of the curve.
*
* - this is followed by (one less than the number of points in the
* curve) triples [dx,dy,dz]; the [x,y,z] triple for each successive
* point in the curve is obtained by adding [dx,dy,dz] onto the
* previous [x,y,z] values.
*
* - the curves are [must be!] non-self-intersecting and traced in a
* counter-clockwise direction
*
* the curves are sampled at a (roughly) a 20 mile resolution.
*
* Copyright (C) 1989, 1990, 1993, 1994, 1995 Kirk Lauritz Johnson
*
* Parts of the source code (as marked) are:
* Copyright (C) 1989, 1990, 1991 by Jim Frost
* Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
*
* Permission to use, copy, modify and freely distribute xearth for
* non-commercial and not-for-profit purposes is hereby granted
* without fee, provided that both the above copyright notice and this
* permission notice appear in all copies and in supporting
* documentation.
*
* Unisys Corporation holds worldwide patent rights on the Lempel Zev
* Welch (LZW) compression technique employed in the CompuServe GIF
* image file format as well as in other formats. Unisys has made it
* clear, however, that it does not require licensing or fees to be
* paid for freely distributed, non-commercial applications (such as
* xearth) that employ LZW/GIF technology. Those wishing further
* information about licensing the LZW patent should contact Unisys
* directly at (lzw_info@unisys.com) or by writing to
*
* Unisys Corporation
* Welch Licensing Department
* M/S-C1SW19
* P.O. Box 500
* Blue Bell, PA 19424
*
* The author makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "xearth.h"
#include "kljcpyrt.h"
short map_data[] = {
/* 0 */
3903, 1, 13663, 15523, 21733,
-138, 74, 34, 69, 29, -64, -38, 19, 10, -93, 24, 41,
-123, 2, 74, -139, 23, 68, -93, -54, 94, -46, 17, 16,
33, 33, -44, -145, -37, 113, -59, -82, 92, -117, -44, 99,
-83, -79, 101, -98, -59, 97, -129, 1, 70, -132, 62, 30,
-136, 30, 54, -146, 22, 63, -120, 37, 38, -137, 40, 44,
-132, 50, 34, -137, 27, 51, -140, 23, 54, -141, 32, 48,
-133, 4, 62, -123, -34, 82, -124, 44, 28, -95, 124, -40,
-134, 50, 28, -136, -5, 65, -143, 24, 48, -135, 51, 25,
-151, 13, 57, -116, 80, -5, -70, 114, -49, -151, 52, 28,
-141, 44, 27, -137, 28, 36, -151, 0, 61, -115, -55, 84,
-137, -19, 66, -113, -59, 83, -106, -67, 85, -83, -88, 91,
-56, -106, 92, 4, -127, 82, 57, -127, 62, 81, -117, 47,
4, -126, 79, -56, -109, 89, -81, -94, 88, -111, -65, 80,
-137, -19, 60, -140, 50, 16, -129, 77, -4, -125, 84, -11,
-140, 59, 9, -141, 51, 13, -141, 46, 16, -146, 36, 22,
-145, 24, 28, -147, 4, 41, -146, 30, 23, -136, 66, -3,
-101, 105, -39, -69, 120, -58, -46, 125, -69, -119, 79, -19,
-150, 23, 25, -143, 45, 7, -135, 65, -9, -147, 32, 16,
-145, 29, 16, -142, 15, 24, -138, -36, 55, -149, 6, 29,
-142, 46, 1, -154, 71, -14, -125, 38, 0, -122, 43, -4,
-131, 126, -59, -138, 25, 9, -148, 44, -2, -111, 93, -43,
-32, 122, -79, 97, 86, -77, 111, 74, -72, 87, 91, -80,
55, 110, -89, 20, 109, -83, -52, 128, -82, -122, 81, -36,
-105, 100, -54, -10, 122, -89, 103, 79, -78, 66, 104, -92,
-18, 101, -74, -145, -63, 76, -125, -11, 32, -59, 130, -89,
-132, 44, -11, -122, 31, -2, -140, -37, 51, -116, -63, 67,
-123, -52, 59, -148, -9, 28, -165, -12, 33, -130, 47, -18,
-137, 6, 13, -141, -43, 50, -141, 43, -15, -120, -13, 23,
-120, -62, 60, -141, -30, 36, -134, -48, 49, -126, 58, -32,
-147, 39, -17, -152, 5, 8, -152, -1, 12, -138, -34, 35,
-152, -18, 23, -141, -6, 11, -140, -63, 54, -146, -2, 7,
-148, -18, 19, -152, -10, 12, -146, -17, 16, -134, -51, 40,
-137, -51, 39, -122, -67, 50, -94, -101, 74, -153, -3, 1,
-142, -45, 31, -141, -36, 24, -96, -91, 63, -113, -76, 51,
-131, -64, 42, -148, -12, 3, -148, 11, -14, -140, 28, -26,
-91, 63, -49, -167, -51, 26, -149, 14, -19, -148, -15, 0,
-147, -15, 0, -141, 43, -42, -112, 79, -66, -79, 97, -77,
-61, 80, -64, -177, -45, 16, -75, -108, 69, -60, -116, 77,
-58, -117, 76, -67, -115, 73, -74, -111, 69, -82, -109, 65,
-94, -100, 58, -130, -71, 31, -136, -61, 24, -140, -54, 17,
-142, -49, 13, -136, -61, 21, -108, -86, 40, -109, -96, 47,
-114, -89, 40, -67, -108, 58, -32, -126, 76, -92, -106, 52,
-95, -106, 50, -65, -120, 64, -22, -130, 76, -16, -131, 77,
18, -106, 67, 52, -115, 78, -47, -130, 68, -87, -111, 50,
-97, -107, 45, -92, -108, 45, -107, -102, 39, -124, -81, 22,
-137, -67, 11, -117, -90, 27, -110, -101, 34, -137, -63, 6,
-142, -53, -1, -148, -33, -13, -149, -22, -22, -131, -55, 1,
-102, -108, 34, -70, -128, 52, -73, -122, 47, -62, -129, 53,
-110, -97, 23, -136, -69, 2, -130, -68, 2, -97, -100, 27,
-63, -128, 47, -72, -127, 45, -68, -126, 43, -24, -137, 61,
-48, -134, 51, -105, -101, 20, -115, -97, 14, -113, -102, 17,
-124, -85, 4, -45, -85, 27, -86, -166, 50, -81, -132, 36,
-63, -120, 34, -64, -131, 39, -91, -126, 28, -120, -81, -2,
-82, -125, 28, -39, -135, 45, -41, -142, 46, -36, -139, 45,
11, -63, 29, 88, 49, 7, 55, -128, 68, 94, -66, 54,
72, -129, 71, 25, -129, 57, -35, -131, 40, -72, -140, 30,
-12, -75, 25, 57, -175, 80, 29, -137, 57, 23, -139, 56,
5, -143, 51, -9, -144, 46, -25, -144, 40, -51, -140, 32,
-67, -134, 24, -71, -130, 20, -54, -138, 27, -39, -142, 32,
-15, -146, 40, -39, -140, 30, -86, -127, 11, -87, -123, 9,
-101, -113, 1, -125, -80, -16, -35, -55, 4, 131, -79, 62,
79, -115, 55, 55, -132, 52, 48, -37, 24, 80, 37, 14,
-24, -130, 27, 5, -132, 35, 86, -97, 49, 143, 40, 32,
151, 15, 39, 139, 11, 37, 23, -12, 9, -165, -14, -43,
-150, -15, -39, -124, -71, -18, -137, 66, -57, -95, -40, -19,
4, -145, 37, -10, -150, 33, 68, -38, 29, 109, -29, 39,
169, 19, 45, 140, -28, 46, 108, 53, 18, 32, 16, 5,
-131, -86, -16, -144, 20, -46, -145, -14, -39, -139, 0, -41,
-63, -98, 4, 132, -84, 59, 105, -1, 30, 30, -154, 43,
141, 35, 33, 23, -19, 11, -4, -74, 15, 145, 44, 31,
138, 22, 33, 85, -33, 31, -198, -69, -40, 68, -43, 28,
74, -18, 24, -111, -109, -7, 57, -133, 43, 67, -24, 23,
37, -29, 16, 51, -69, 28, 93, 5, 23, 42, -89, 29,
50, 7, 12, -20, -138, 21, 87, -128, 47, 146, -64, 49,
100, -103, 43, 114, -63, 40, 40, -145, 35, 105, -106, 43,
55, -111, 32, 51, -127, 32, 3, -125, 20, 49, -47, 19,
-112, -70, -15, 99, -97, 37, 66, -128, 34, 69, -98, 30,
130, -47, 35, 64, -103, 28, 124, -117, 43, 137, -54, 36,
123, -81, 35, 103, -103, 34, 110, -85, 32, 132, -68, 34,
80, -100, 27, 164, -73, 38, 115, -81, 30, 105, -101, 29,
109, -105, 30, 109, -98, 28, 107, -112, 28, 118, -87, 27,
130, -70, 27, 131, -69, 26, 132, -73, 26, 140, -50, 24,
136, -62, 24, 144, -33, 22, 137, 60, 13, 138, 61, 12,
135, 58, 12, 141, 51, 12, 143, 53, 11, 140, 57, 10,
154, 36, 13, 144, 15, 12, 80, 34, 4, 221, -11, 21,
150, 21, 10, 153, 12, 10, 31, 26, 0, -186, -21, -12,
-70, 16, -7, 216, 24, 15, 145, 2, 10, 70, -27, 7,
241, -37, 18, 88, 41, 1, 74, -80, 12, 215, -66, 16,
148, -42, 10, 139, -66, 11, 145, 61, 0, 127, 75, -3,
152, 42, 0, 142, 47, -2, 142, 46, -2, 131, 71, -5,
138, 62, -5, 135, 65, -7, 139, 51, -5, 127, 55, -7,
-86, 84, -8, 179, -137, 12, 126, 67, -9, 101, 104, -12,
145, 45, -9, 147, 33, -7, 150, 23, -8, 151, 18, -8,
151, 15, -8, 152, 14, -9, 152, 2, -8, 118, 66, -15,
96, -12, -4, 194, -39, -9, 150, -20, -8, 138, -57, -5,
119, -93, 1, 116, -123, 3, 104, -60, -4, 93, -111, 3,
72, -52, -2, -60, -116, 16, 22, -115, 9, 66, -152, 6,
111, -118, -1, 127, -59, -9, 123, 10, -14, 172, 14, -20,
81, 57, -14, 16, 106, -11, 97, -87, -4, 83, 20, -12,
13, 34, -5, 114, -41, -11, 107, 4, -14, 144, -25, -18,
172, 14, -25, 57, 94, -16, 10, 60, -7, 117, -110, -8,
125, -37, -16, 93, -200, 1, 128, -95, -14, 128, -3, -20,
103, -40, -15, 18, -169, 8, 77, -131, -5, 50, -132, -1,
-31, -147, 13, -24, -149, 11, -20, -146, 10, 0, -155, 5,
-58, -164, 16, -80, -104, 16, -38, -144, 10, 131, -77, -21,
-34, -206, 9, -55, -13, 9, -78, -47, 14, 106, -119, -17,
145, -47, -25, -5, -38, 1, -148, 11, 26, -107, 24, 17,
-17, -219, 3, -58, -133, 9, -72, -120, 10, -86, -22, 13,
-68, 14, 11, 81, -166, -15, 78, -129, -15, 131, -79, -23,
25, -86, -7, -143, 111, 26, -24, 16, 5, 89, -154, -19,
76, -104, -16, 30, -67, -7, 110, -201, -26, 122, -55, -23,
48, -37, -10, -95, -2, 16, 116, -113, -26, 116, -93, -25,
108, -103, -25, 91, -120, -24, 103, -106, -26, 89, -118, -25,
104, -105, -28, 95, -110, -27, 110, -104, -30, 78, -131, -27,
57, -122, -23, 82, -96, -26, 50, -176, -27, -13, -142, -11,
102, -132, -36, 104, -28, -26, 127, 73, -21, 93, -26, -24,
-201, -68, 38, -145, -55, 26, 65, -176, -34, 77, -125, -32,
81, -121, -33, 28, -149, -25, 49, -142, -31, 54, -139, -31,
63, -136, -34, 66, -131, -35, 13, -141, -25, -66, -116, -2,
-103, -102, 7, 18, -151, -29, 41, -143, -34, 36, -135, -32,
49, -132, -35, 63, -140, -41, 80, -124, -43, 39, -130, -35,
20, -148, -34, -29, -145, -23, -11, -149, -29, -32, -147, -24,
-72, -145, -14, -85, -112, -5, -122, -66, 14, -122, -104, 4,
-63, -130, -16, -105, -105, -2, -74, -124, -13, -34, -157, -32,
-69, -133, -19, -16, -143, -33, -36, -147, -32, -55, -134, -24,
-50, -135, -26, -44, -152, -34, -93, -118, -14, -41, -114, -24,
0, -144, -43, 2, -144, -43, -19, -144, -41, -27, -148, -40,
-22, -140, -40, -12, -144, -44, 14, -143, -49, 61, -126, -55,
56, -127, -56, 98, -104, -56, 78, -117, -58, 64, -122, -58,
51, -130, -58, 58, -125, -59, 57, -126, -59, 67, -119, -60,
36, -136, -61, 39, -134, -61, 51, -126, -61, 67, -120, -64,
69, -117, -64, 50, -128, -65, 77, -111, -65, 74, -113, -66,
50, -126, -66, 16, -135, -62, -51, -115, -38, -7, -166, -71,
-8, -132, -57, -15, -140, -60, -13, -136, -59, 33, -133, -71,
44, -122, -69, 31, -129, -70, -17, -137, -62, 0, -135, -66,
-2, -133, -66, 18, -132, -71, 21, -122, -68, 21, -125, -70,
12, -128, -71, 19, -130, -74, 41, -121, -76, 52, -119, -79,
58, -116, -80, 84, -100, -79, 88, -94, -78, 98, -93, -81,
61, -104, -78, 59, -112, -82, 37, -121, -82, 30, -125, -83,
16, -127, -81, 24, -125, -83, 31, -121, -83, 45, -116, -86,
41, -117, -86, 51, -113, -88, 57, -108, -87, 61, -107, -90,
21, -123, -87, -4, -129, -84, -31, -128, -75, -113, -90, -23,
-98, -49, -2, 35, -95, -76, 20, -75, -58, 78, -152, -131,
6, -123, -89, -60, -113, -60, 47, -37, -42, 134, 23, -29,
68, -84, -84, 108, -67, -86, 80, -84, -90, 125, -33, -69,
120, 35, -18, 134, 79, 9, 151, 38, -29, 129, 19, -35,
138, -2, -56, 150, 15, -49, 131, 79, 6, 134, 50, -18,
145, 18, -47, 117, -26, -69, 139, 5, -55, 142, 26, -43,
131, -22, -74, 122, -33, -80, 139, -17, -76, 122, 77, 1,
139, -10, -74, 110, 29, -30, 112, 94, 16, 135, -5, -70,
135, 4, -64, 138, 53, -30, 135, 59, -24, 131, 75, -13,
131, 75, -12, 129, 77, -12, 124, 90, -1, 128, 79, -11,
122, 91, -1, 118, 93, 2, 113, 99, 8, 113, 99, 7,
126, 83, -13, 126, 80, -15, 115, 101, 4, 108, 105, 10,
101, 112, 18, 98, 113, 19, 95, 118, 24, 103, 110, 12,
87, 122, 29, 106, 111, 9, 112, 98, -4, 119, 92, -13,
122, 70, -31, 127, 93, -20, 85, 115, 20, 83, 127, 29,
55, 132, 47, 65, 130, 40, 76, 128, 29, 70, 131, 35,
48, 133, 49, 45, 135, 51, -9, 92, 60, -74, 102, 107,
104, 114, -1, 117, 120, -7, 131, 81, -40, 122, 53, -51,
130, 55, -55, 130, 46, -62, 131, 49, -61, 130, 49, -63,
128, 60, -55, 110, 95, -25, 103, 114, -9, 70, 138, 25,
-30, 65, 57, 76, 199, 53, 59, 134, 28, 32, 109, 34,
26, 155, 61, 42, 142, 42, -38, 14, 34, -44, -59, 2,
31, 186, 71, 10, 140, 62, -18, 132, 76, 3, 115, 53,
15, 152, 60, -54, 105, 86, -37, 109, 76, 49, 147, 32,
20, 140, 48, 3, 59, 24, 117, -35, -97, 114, 87, -42,
108, 102, -32, 96, 108, -23, 120, 104, -41, 123, 58, -66,
95, 68, -40, 108, 117, -32, 117, 122, -36, 72, 132, -1,
115, 90, -50, 109, 78, -51, 120, 74, -63, 119, 65, -67,
99, 59, -54, 147, 55, -94, 106, 38, -70, 135, 57, -87,
102, 89, -48, 115, 73, -66, 102, 97, -48, 86, 104, -32,
85, 115, -28, 98, 117, -40, 99, 115, -41, 60, 144, 0,
42, 99, 0, 42, 96, -3, 30, 174, 35, -10, 83, 36,
-10, 101, 43, 18, 182, 45, 13, 138, 32, 22, 135, 24,
6, 161, 44, 47, 139, 1, -9, 159, 54, 25, 141, 20,
4, 141, 35, 10, 153, 33, 10, 126, 25, 63, 149, -15,
25, 140, 13, -29, 151, 62, -84, 79, 90, -85, 64, 86,
-73, 102, 85, -2, 156, 37, -21, 134, 47, -19, 149, 47,
-19, 119, 39, -35, 164, 61, 14, 142, 16, 54, 146, -17,
-35, 114, 49, 11, 161, 18, 59, 120, -28, 44, 119, -17,
-78, 96, 80, -61, 118, 67, -77, 87, 75, -36, 161, 52,
23, 148, 1, 52, 143, -24, 50, 144, -23, 41, 151, -15,
49, 140, -25, 92, 92, -66, 62, 139, -37, 37, 138, -18,
72, 152, -47, 26, 97, -13, 71, 122, -50, 52, 152, -33,
18, 145, -6, 101, 86, -81, 107, 41, -89, 71, 113, -55,
34, 134, -23, 127, 38, -109, 89, 107, -74, 72, 119, -59,
65, 140, -53, 52, 131, -44, 71, 99, -62, 80, 121, -71,
70, 106, -63, 82, 114, -75, 76, 109, -70, 75, 111, -70,
75, 110, -71, 75, 109, -74, 81, 101, -79, 85, 91, -84,
78, 102, -78, 80, 99, -82, 85, 91, -87, 87, 85, -89,
91, 74, -94, 92, 69, -97, 90, 77, -95, 89, 76, -96,
78, 96, -87, 69, 108, -80, 73, 103, -84, 71, 105, -82,
66, 112, -80, 64, 112, -79, 66, 109, -81, 64, 110, -82,
61, 115, -78, 62, 112, -81, 49, 125, -69, 40, 132, -62,
51, 123, -73, 53, 119, -77, 47, 126, -71, 43, 128, -69,
38, 132, -64, 12, 144, -39, 20, 142, -48, 32, 134, -61,
42, 124, -73, 44, 123, -75, 31, 137, -65, 11, 140, -43,
58, 113, -94, 38, 127, -74, 30, 129, -66, 24, 138, -63,
42, 119, -80, 33, 131, -74, -10, 152, -29, -2, 147, -38,
-10, 152, -31, 69, 73, -106, 24, 26, -38, -53, 40, 54,
-13, 145, -27, -24, 153, -18, -28, 142, -10, 15, 138, -62,
-35, 100, 10, -105, 49, 113, -83, -34, 112, -46, -113, 93,
-75, -66, 111, -89, -32, 116, -91, -28, 117, -82, -53, 112,
-93, -32, 117, -101, 25, 108, -98, -13, 116, -83, -61, 110,
-98, -19, 115, -101, 15, 106, -96, -14, 108, -74, -80, 104,
-79, -74, 105, -87, -57, 108, -101, 22, 101, -113, 29, 108,
-91, -1, 94, -84, -72, 105, -85, -65, 103, -86, -55, 101,
-112, -5, 112, -109, 12, 104, -102, 86, 77, -96, 96, 67,
-86, 113, 52, -74, 136, 34, -89, 95, 57, -99, 63, 75,
-117, -24, 116, -43, 19, 34, 87, 98, -107, 88, 66, -102,
77, 82, -96, -35, 155, -13, -75, 117, 35, -92, 112, 52,
-100, 62, 73, -97, 117, 53, -86, 83, 52, -79, 138, 26,
-97, 97, 57, -109, 73, 73, -94, 111, 46, -86, 117, 37,
-94, 110, 44, -121, 46, 89, -92, 89, 49, -102, 50, 70,
-112, 33, 83, -66, 134, 8, -86, 29, 62, -21, -93, 50,
-96, 161, 23, -64, 103, 15, -85, 138, 19, -56, 143, -7,
-44, 144, -19, -46, 136, -16, -62, 143, -5, -64, 135, -2,
-76, 133, 7, -83, 129, 14, -79, 109, 17, -110, 64, 60,
-100, 91, 41, -122, 107, 49, -110, 57, 61, -78, 129, 4,
-59, 140, -16, -63, 146, -17, -32, 132, -35, -52, 137, -23,
-33, 149, -44, -47, 136, -28, -56, 143, -27, 10, 76, -44,
-128, 195, 1, -63, 134, -19, -57, 131, -24, -120, 83, 47,
-108, 96, 31, -111, 87, 37, -134, 73, 59, -73, 102, 0,
-93, 125, 0, -48, 134, -37, -20, 153, -68, 43, 57, -62,
-128, 103, 35, -123, 123, 19, -84, 121, -9, -82, 124, -13,
-91, 123, -7, -86, 122, -10, -91, 122, -9, -96, 117, -3,
-91, 122, -10, -92, 124, -13, -67, 126, -30, -68, 124, -31,
-88, 115, -12, -105, 134, -13, -42, 105, -39, -113, 113, 2,
-110, 104, 6, -106, 108, -1, -95, 114, -12, -85, 119, -24,
-61, 127, -45, -109, 113, -7, -5, 135, -88, 49, 1, -32,
86, -151, 47, 88, -107, 16, 114, -104, -5, 80, -117, 25,
65, -125, 39, 116, -100, -12, 110, -101, -7, 115, -93, -18,
134, -51, -58, 42, 108, -98, -38, 135, -61, 8, 122, -86,
-7, 130, -82, -17, 126, -74, 10, 119, -87, 50, -2, -33,
14, -138, 84, 20, -130, 74, 25, -132, 70, -1, -137, 90,
43, -69, 16, 141, -10, -92, 115, -95, -20, 98, -116, 6,
97, -116, 4, 94, -115, 6, 104, -108, -7, 100, -114, -2,
94, -115, 2, 99, -119, 1, 85, -103, -1, 86, -96, -7,
104, -120, -6, 97, -117, -3, 58, -142, 39, 51, -108, 23,
104, -121, -9, 102, -81, -32, 121, -53, -64, 122, -83, -49,
111, -96, -33, 94, -121, -7, 87, -129, 1, 76, -122, 6,
68, -99, 0, 98, -169, 11, 16, -130, 55, 19, -142, 59,
68, -123, 8, 49, -139, 31, 60, -134, 18, 101, -119, -23,
83, -108, -17, 97, -113, -24, 110, -56, -65, 124, -71, -71,
111, -91, -51, 98, -97, -38, 86, -115, -20, 88, -136, -13,
80, -130, -9, 64, -143, 8, 90, -117, -27, 73, -128, -7,
90, -126, -26, 106, -94, -54, 103, -93, -53, 82, -118, -25,
58, -121, -2, 102, -128, -40, 72, -124, -16, 53, -141, 8,
41, -148, 20, -12, -138, 64, 40, -140, 17, 12, -117, 33,
97, -176, -26, 53, -134, -1, 28, -110, 13, 65, -183, 2,
74, -127, -25, 29, -144, 20, 24, -145, 25, 74, -136, -27,
75, -114, -35, 127, -42, -108, 105, -7, -100, 93, 42, -104,
94, 34, -103, 92, 9, -95, 64, 101, -96, 81, 71, -105,
62, 98, -97, 96, 35, -111, 104, 10, -111, 104, 4, -111,
93, 36, -111, 90, 45, -112, 89, 46, -113, 65, 93, -104,
76, 71, -111, 96, 5, -108, 94, 6, -109, 90, 45, -118,
46, 110, -96, 44, 108, -93, 76, 66, -115, 80, 52, -115,
89, 32, -118, 84, 36, -116, 73, 67, -115, 87, 32, -120,
85, 34, -121, 80, 47, -119, 70, 61, -116, 65, 68, -113,
63, 83, -118, -38, 151, -21, 3, 138, -69, 50, 93, -110,
72, 53, -121, 73, 52, -121, 76, 43, -124, 78, 34, -123,
68, 63, -125, 69, 47, -119, 86, 6, -123, 92, -28, -116,
73, 43, -127, 10, 133, -87, -30, 138, -32, 27, 112, -102,
75, 35, -129, 79, 18, -128, 73, 30, -126, 22, 110, -100,
-19, 144, -57, 15, 115, -93, 54, 64, -124, 69, 33, -128,
80, 10, -133, 2, 92, -61, -55, 140, -5, -51, 141, -14,
-17, 137, -65, -21, 139, -62, 8, 116, -95, 56, -22, -73,
66, -9, -102, -3, 146, -99, -3, 110, -77, 9, 114, -100,
31, 90, -120, 15, 102, -103, -7, 124, -86, -6, 121, -87,
-19, 131, -74, -69, 85, 49, -92, 72, 98, -86, 113, 51,
-88, 108, 57, -85, 116, 46, -84, 92, 60, -86, 26, 120,
-94, 38, 120, -88, 27, 117, -94, 42, 114, -95, 53, 104,
-96, 94, 71, -91, 110, 48, -89, 112, 42, -81, 127, 16,
-63, 134, -18, -55, 135, -33, -63, 129, -17, -35, 140, -71,
-52, 93, -3, -22, -178, 188, -23, -89, 111, -31, -81, 115,
-14, -111, 114, -22, -100, 113, -38, -91, 128, -14, -93, 94,
-5, -92, 80, -19, -114, 115, -59, -61, 127, -80, -22, 127,
-96, 21, 114, -89, 18, 106, -100, 6, 127, -65, -24, 103,
-64, -60, 127, -97, 15, 113, -96, 115, 39, -70, 26, 69,
-65, 57, 41, -26, 95, -37, 3, 161, -123, -50, 136, -40,
-70, 137, -16, -27, 111, -52, -102, 122, 33, -82, 23, 85,
-7, -115, 97, 20, -126, 72, 18, -129, 75, 64, -135, 22,
9, -77, 45, -113, 146, 31, -93, 140, 8, -98, 105, 39,
-90, 132, 9, -23, 84, -37, -31, 122, -57, -81, 129, -4,
-84, 90, 30, -110, 86, 63, -92, 67, 55, -105, 120, 27,
-124, 79, 80, -67, 94, 2, -102, 129, 12, -94, 130, 1,
-90, 122, 1, -88, 113, 7, -90, 119, 1, -95, 94, 26,
-62, 54, 23, 42, 90, -122, -74, 158, -54, 147, -35, -134,
67, 37, -108, 6, 90, -87, -19, 107, -73, 55, -45, -23,
112, -93, -47, 102, -43, -82, 82, 50, -141, 100, -108, -22,
108, -111, -30, 108, -99, -43, 85, -130, 11, 92, -103, -22,
97, -111, -22, 82, -131, 12, 93, -121, -12, 100, -103, -37,
101, -51, -85, 102, -25, -107, 108, -63, -87, 106, -94, -58,
89, -88, -41, 105, -72, -78, 110, -54, -100, 100, -94, -55,
94, -33, -101, 91, -5, -120, 100, -57, -91, 92, -32, -103,
48, 68, -126, 57, 50, -127, 39, 69, -119, 56, 56, -132,
49, 61, -129, 83, 0, -125, 98, -44, -108, 79, -89, -38,
83, -141, 4, 68, -132, 15, 71, -127, 4, 94, -116, -41,
101, -37, -127, 84, -36, -101, 86, -23, -117, 79, -2, -127,
89, -42, -109, 82, -30, -108, 72, 8, -130, 86, -24, -124,
84, -14, -132, 73, -2, -126, 91, -52, -112, 86, -30, -126,
85, -25, -130, 53, 13, -111, 73, -23, -115, 51, 29, -124,
37, 18, -89, 69, 19, -152, 70, -4, -133, 68, 5, -141,
32, 59, -126, 66, 6, -143, 86, -53, -119, 67, -15, -125,
51, 34, -146, 51, 22, -136, 61, 1, -135, 50, 25, -140,
53, 20, -141, 20, 17, -67, 132, -165, -108, 64, -132, 8,
78, -36, -142, 59, -87, -36, 69, -126, -17, 82, -136, -38,
70, -92, -62, 67, -7, -154, 61, -60, -82, 52, -32, -93,
17, 75, -133, 9, -7, -15, 4, -112, 125, 62, -112, -24,
74, -107, -64, 77, -73, -112, 72, -61, -117, 65, -33, -136,
30, 42, -131, 32, 47, -146, 39, -4, -103, 24, -180, 155,
-30, -54, 148, -31, -37, 130, -49, -18, 149, -33, -6, 93,
89, -158, -53, 73, -92, -89, 77, -102, -89, 74, -102, -84,
74, -110, -77, 72, -96, -92, 71, -77, -110, 65, -51, -127,
38, 23, -139, 27, 56, -143, 17, 60, -125, 22, 64, -145,
-8, 94, -95, -34, 140, -75, -74, 137, 55, -40, 161, -91,
18, 29, -95, 54, -38, -120, 36, -139, 72, 52, -115, -11,
41, -10, -118, 11, -135, 145, 66, -140, -30, 66, -125, -54,
51, -142, 20, 31, -133, 66, 38, -139, 50, 47, -133, 11,
54, -123, -26, 54, -119, -33, 48, -125, -8, 43, -134, 15,
53, -149, -4, 47, -129, -8, 60, -158, -19, 53, -138, -25,
50, -137, -17, 51, -145, -13, 54, -159, -12, 35, -108, -4,
59, -160, -35, 51, -123, -49, 60, -131, -71, 47, -113, -50,
54, -157, -34, 58, -129, -77, 53, -122, -70, 39, -100, -44,
44, -137, -28, 54, -154, -52, 41, -124, -33, 36, -139, -4,
48, -169, -26, 36, -109, -40, 52, -167, -50, 45, -130, -56,
48, -119, -81, 46, -117, -82, 44, -128, -66, 41, -123, -60,
41, -147, -44, 37, -137, -39, 41, -140, -55, 36, -126, -51,
28, -99, -42, 30, -135, -22, 34, -195, -1, 29, -109, -48,
35, -111, -67, 47, -161, -94, 39, -116, -90, 40, -98, -112,
39, -50, -139, 23, 51, -139, 15, 82, -129, -5, 131, -67,
-13, 127, -37, 4, 120, -113, 21, 47, -142, 22, 41, -143,
30, -9, -149, 5, 5, -30, -40, 53, 161, -26, 128, 22,
-6, 125, -84, -9, 129, -72, -2, 108, -91, 25, -3, -132,
5, 62, -91, -29, 150, 1, -28, 148, -7, -38, 164, 28,
-23, 115, 1, -29, 160, -28, -21, 155, -68, -10, 107, -78,
-19, 133, -65, -27, 145, -36, -29, 146, -33, -32, 122, 17,
-28, 89, 40, -35, 149, -13, -45, 151, 39, -32, 147, -39,
-38, 128, 24, -43, 146, 21, -34, 145, -30, -27, 134, -66,
-14, 110, -99, 16, 30, -147, 14, -6, -75, 1, 34, -72,
-26, 154, -116, -3, 70, -117, 24, -12, -144, 7, 49, -146,
-8, 83, -127, -38, 140, -30, -32, 120, -35, -12, 88, -121,
-3, 64, -137, -7, 76, -139, -18, 89, -88, -25, 114, -107,
-13, 87, -134, -9, 70, -133, -26, 108, -106, -25, 104, -102,
-30, 113, -95, -28, 101, -68, -28, 113, -137, -21, 87, -122,
-9, 29, -19, -4, -10, 94, -34, 124, -122, 27, -56, -83,
-1, 45, -207, -23, 87, -134, -13, 53, -105, -35, 116, -129,
-37, 110, -67, -31, 89, -47, -61, 153, 48, -49, 129, -38,
-29, 92, -116, -9, 39, -146, -12, 44, -145, -34, 95, -113,
-49, 127, -48, -29, 67, 32, 62, -145, -77, 57, -142, -11,
8, -13, -68, -14, 40, -98, -52, 133, -70, 75, -182, -57,
-12, 35, -112, -44, 109, -9, 33, -76, -139, -48, 120, -77,
-21, 54, -26, 65, -162, -49, -42, 106, -96, -59, 144, -14,
-1, 4, -21, 61, -150, -42, 33, -82, -72, -48, 117, -129,
-48, 115, -84, -57, 138, 37, -53, 128, 7, -57, 134, 0,
-44, 104, 54, -21, 49, 122, -39, 88, 132, -26, 59, 139,
-22, 48, 48, 3, -3, -138, 47, -107, -105, 34, -78, -126,
4, -12, -148, 72, -167, -24, 44, -106, -87, 15, -43, -144,
-5, 4, -156, 46, -116, -110, 54, -137, -75, 48, -121, -40,
56, -142, -41, 52, -133, -24, 53, -139, -34, 45, -123, -74,
9, -27, -38, -22, 59, 8, 54, -149, -71, 38, -114, -94,
9, -30, -61, -24, 61, -13, 48, -135, -53, 3, -16, -54,
-16, 36, -44, 62, -169, -7, 0, -8, -58, -17, 26, -129,
27, -95, -117, 32, -103, -77, 45, -136, -47, 24, -40, 146,
33, -125, -154, -37, 96, -55, 58, -178, -50, 28, -93, -52,
48, -161, -73, 39, -130, -51, 43, -142, -32, 38, -126, -30,
48, -147, 26, 49, -146, 40, 47, -148, 37, 40, -122, 44,
44, -147, 15, 2, -29, -76, -42, 117, -105, -17, 42, -53,
50, -175, -19, -23, 51, -92, 33, -122, -32, -32, 84, -84,
15, -70, -58, -15, 39, -41, 26, -110, -54, -39, 103, -107,
-43, 117, -85, -33, 69, -124, -36, 88, -93, -24, 83, 4,
-3, -54, -168, -48, 120, -98, -41, 123, -30, -44, 128, -30,
31, -151, -129, 40, -155, -57, 14, -85, -92, -2, -35, -92,
56, -180, 20, 30, -130, -54, 37, -146, -32, 38, -142, -12,
37, -146, -21, 27, -134, -67, 33, -147, -32, 30, -143, -55,
37, -155, -14, 11, -70, -40, -28, 99, -27, 29, -160, -70,
21, -130, -68, 26, -144, -58, 29, -148, -37, 31, -141, -4,
31, -141, 3, 33, -158, -10, 6, -71, -55, 13, -72, -15,
33, -145, 19, 33, -156, 14, 36, -130, 69, 29, -134, 26,
26, -148, -14, 2, -59, -53, -15, 50, -44, 39, -168, 63,
27, -129, 31, 34, -153, 54, 26, -142, 18, 30, -145, 45,
22, -137, 11, 7, -139, -93, -24, 27, -135, 5, -134, -93,
-1, -104, -102, -2, -95, -95, 3, -152, -107, -7, -70, -96,
7, -124, -52, 1, -114, -73, -5, -112, -101, 1, -126, -77,
1, -132, -75, 11, -156, -28, 14, -142, -6, 10, -151, -22,
7, -139, -30, -4, -115, -74, 12, -146, 0, 3, -140, -38,
-2, -122, -58, -9, -132, -95, -10, -122, -90, -10, -121, -86,
5, -156, -18, -14, -115, -96, -23, -76, -131, -18, -93, -106,
-24, -88, -128, -27, -66, -136, -22, -98, -112, -27, -72, -129,
-28, -72, -129, -22, -96, -106, -20, -35, -86, -40, 49, -157,
-22, 21, -88, -26, 2, -102, 8, 154, 50, 10, 136, 59,
11, 135, 65, 13, 138, 78, 24, 89, 116, 8, 136, 63,
-8, 153, 2, -6, 142, 11, -5, 153, 23, -15, 144, -22,
-16, 146, -19, -9, 152, 15, 1, 137, 55, 5, 133, 70,
9, 123, 90, 20, 85, 124, 15, 100, 112, 6, 121, 87,
16, 85, 115, 19, 71, 126, 11, 103, 109, 3, 127, 88,
19, 58, 133, 31, -16, 146, 18, 68, 134, 12, 80, 121,
8, 86, 105, -2, 133, 85, -15, 41, -55, 3, -124, -72,
0, -49, -38, -16, 196, 57, -14, 146, 35, -16, 147, 32,
-2, 103, 72, -2, 124, 97, -20, 150, 21, -12, 142, 64,
29, -19, 151, 12, 45, 117, -18, 149, 43, -22, 146, 25,
-28, 150, -11, -27, 123, -22, -36, 141, -59, -35, 128, -61,
-34, 150, -27, -37, 143, -45, -40, 134, -67, -38, 133, -56,
-36, 134, -38, -30, 149, 21, -36, 144, -20, -34, 137, -9,
-28, 122, 7, -37, 54, -137, -33, 23, -144, -16, -59, -160,
39, -162, -1, 37, -146, 12, 9, -83, -52, -31, -7, -164,
-30, 8, -140, -27, -21, -151, -7, -56, -96, -5, -88, -112,
-10, -97, -145, -5, -87, -105, 13, -135, -73, -4, -53, -63,
29, -193, -50, 21, -154, -43, -36, 34, -123, -30, 51, -83,
19, -149, -42, 27, -125, 12, -38, 23, -137, -34, -36, -164,
-18, -78, -129, -9, -95, -104, -27, -58, -142, 7, -100, -41,
46, -128, 86, 27, -147, 6, 26, -152, 2, 17, -163, -35,
12, -82, -2, -52, 57, -162, -42, 111, -88, -42, 110, -85,
-46, 58, -132, -51, 62, -140, -25, 121, -13, 4, 123, 89,
-1, 39, 21, -18, -128, -141, -39, -14, -140, -9, 147, 56,
3, 81, 64, -30, -77, -152, 4, 97, 73, -40, 11, -127,
-6, 92, 40, -42, 114, -68, -40, 10, -127, -32, -63, -142,
-59, 75, -141, -54, 62, -131, -50, 90, -97, -53, 60, -123,
-58, 91, -120, -54, 71, -114, -46, 100, -72, -41, 93, -60,
-37, 148, -13, -31, 158, 14, -30, 109, -13, -50, 117, -63,
-30, 153, 20, -15, 138, 55, -25, 124, 17, -34, 152, 15,
-28, 158, 39, -20, 136, 50, -22, 134, 43, -15, 136, 65,
-26, 140, 40, 0, 105, 90, 3, 119, 114, -8, 120, 83,
-7, 106, 75, 14, 94, 131, 14, 90, 130, 7, 80, 101,
10, 118, 149, -10, 109, 83, 7, 95, 122, -2, 105, 108,
-3, 106, 110, -15, 45, -3, -38, 137, 29, 4, 83, 113,
1, 91, 112, -17, 130, 97, -20, 110, 68, -57, 138, -24,
-54, 137, -16, -55, 130, -24, -66, 120, -76, -58, 70, -105,
-72, 109, -102, -57, 131, -21, -57, 108, -48, -36, 71, -26,
-45, 12, -132, -61, 63, -114, -59, 95, -65, -72, 78, -126,
-46, 24, -111, -62, 43, -134, -41, 48, -62, -34, 60, -27,
-14, -62, -118, -10, -97, -149, -36, -22, -129, -64, 65, -103,
2, -104, -116, 77, -141, 52, 45, -140, -33, 24, -120, -67,
17, -115, -77, -58, -12, -173, -57, 124, -22, -18, 111, 74,
-26, 121, 63, -73, 123, -61, -16, 13, -28, -46, 17, -105,
-78, 58, -139, -50, 16, -113, -62, 28, -127, -75, 77, -107,
-63, 51, -103, -62, 6, -144, -29, 49, -18, -32, -36, -116,
-70, 53, -111, -73, 78, -93, -56, 79, -47, -13, 65, 38,
-30, -67, -139, -58, 161, 33, -19, 119, 82, -75, 112, -55,
-2, -33, -39, 34, -104, -32, 5, -131, -123, -1, -80, -85,
-55, 26, -96, -54, 54, -65, -40, 45, -43, -53, 30, -85,
-32, -3, -73, -87, 63, -122, -50, -9, -116, -65, 19, -116,
-71, 17, -130, -80, 46, -117, -98, 116, -87, -28, 51, -6,
-14, 31, 1, -91, 99, -85, -74, 32, -114, -103, 87, -115,
-79, 73, -82, -82, 82, -76, -50, 91, -8, -13, 71, 46,
-78, 49, -99, -77, 5, -139, -82, 111, -44, -83, 71, -82,
-64, 95, -23, -62, 48, -66, -44, 102, 22, -40, -15, -85,
-28, -6, -56, -58, 141, 35, -39, 101, 30, 46, 34, 115,
-127, 87, -137, -54, 85, -10, -56, 143, 46, -47, -20, -103,
15, -44, -16, -73, 105, -22, -90, 112, -42, -64, 95, -13,
-115, 119, -74, -79, 122, -6, -41, 102, 36, -5, 21, 13,
-83, 22, -116, -94, 84, -69, -101, 50, -113, -20, 139, 110,
1, 35, 40, -102, 57, -106, -29, 101, 59, -77, 74, -46,
-58, 12, -81, -32, 114, 70, 67, -11, 98, -159, 133, -114,
-20, 42, 13, 50, 52, 138, 8, 96, 119, 63, 18, 124,
116, -69, 116, 31, 53, 113, 29, 28, 82, -126, 35, -174,
-93, 81, -63, -105, 73, -90, -99, 59, -93, -86, 56, -77,
-34, 133, 99, 25, 76, 128, 10, 90, 123, 40, 56, 135,
4, 74, 95, 73, 9, 136, 76, 5, 137, 5, 99, 132,
-36, 38, -15, 11, -124, -136, -72, 8, -113, -84, 29, -107,
-24, -78, -135, -62, -21, -130, -51, -42, -133, -70, 17, -93,
-12, 121, 124, 7, 78, 105, -13, 101, 103, 33, 74, 145,
-62, 121, 49, -41, 121, 84, -33, 114, 91, -36, 114, 88,
-44, 117, 81, -44, 121, 87, 19, 71, 130, 38, 52, 136,
15, 79, 139, 1, 59, 85, -94, 108, -13, -104, 105, -34,
-115, 101, -56, -91, 70, -58, -105, 97, -40, -64, 75, -3,
-66, -10, -127, -103, 105, -21, -82, 81, -20, -136, 62, -137,
-76, 32, -78, -125, 58, -119, -47, -24, -109, -91, 71, -42,
-94, 124, 27, 58, 52, 166, 74, -12, 100, 64, 25, 141,
39, 56, 147, 23, 65, 135, 97, -31, 118, 88, -61, 57,
129, -98, 73, 102, -82, 52, 80, -6, 131, 25, 59, 137,
-74, 118, 55, -84, 108, 19, -38, 109, 106, 59, 10, 125,
65, 14, 144, 24, 51, 131, -22, 92, 115, -74, 112, 52,
-105, 109, -13, -101, 67, -74, -37, -43, -143, -102, 33, -130,
-65, 19, -86, -133, 124, -31, -106, 97, -22, -106, 68, -72,
-105, 53, -95, -110, 54, -98, -106, 87, -34, -134, 101, -57,
-102, 77, -41, -78, 4, -122, -71, -5, -122, 0, -91, -149,
60, -97, -60, 113, -96, 28, 108, -82, 42, 123, -93, 52,
88, -91, 0, -19, -77, -152, 136, -111, 47, 93, -79, 32,
-144, 58, -147, -113, 62, -85, -115, 90, -44, -111, 61, -81,
-113, 56, -91, -106, 46, -91, -97, 31, -101, -93, 3, -134,
-105, 44, -89, -1, -105, -155, -62, -37, -142, -27, -60, -125,
94, -121, -38, 106, -109, -4, -1, -61, -85, -7, -28, -51,
120, -40, 116, 118, -122, 0, 52, -66, -17, -29, -65, -130,
-35, -59, -128, -109, 51, -83, -59, -48, -147, -101, -1, -137,
24, -67, -55, 65, -148, -103, 37, -87, -62, 39, -74, -39,
87, 11, 130, 88, -84, 13, 26, -142, -142, 57, -118, -69,
16, -93, -91, 119, -132, 1, 112, -116, 12, 74, -115, -36,
25, -109, -94, 66, -86, -11, -7, -85, -108, -97, 52, -70,
-111, 45, -94, -37, -21, -73, -70, 78, -3, -81, 57, -40,
-112, 37, -103, -90, -7, -121, -106, 68, -57, -97, -5, -126,
-126, 95, -48, -86, 98, 4, -101, 132, 28, -28, 89, 67,
-63, 130, 74, -78, 121, 47, -64, 123, 66, -43, 115, 85,
-18, 107, 106, -15, 103, 109, -2, 97, 117, -18, 104, 107,
-29, 108, 102, -13, 98, 110, 27, 76, 134, 18, 79, 126,
-3, 85, 110, -93, 116, 36, -98, 88, -8, -119, 65, -63,
-108, 31, -97, -125, 72, -58, -123, 70, -58, -122, 86, -33,
-120, 63, -62, -97, 76, -14, -88, 121, 59, -57, 107, 81,
-116, 101, 0, -118, 89, -16, -123, 77, -37, -113, 40, -77,
-117, 100, 6, -124, 41, -85, -107, 85, -3, -127, 95, -8,
-61, 9, -56, -24, -24, -61, -64, 8, -58, 50, -110, -99,
-88, -27, -132, -63, -35, -115, -145, 38, -102, -118, 38, -73,
-132, 67, -45, -131, 59, -55, -129, 67, -41, -130, 83, -18,
-121, 80, -12, -106, 90, 18, -121, 90, 6, -129, 72, -29,
-123, 89, 5, -125, 84, -4, -126, 85, -1, -132, 74, -20,
-129, 82, -5, -128, 80, -6, -125, 85, 6, -114, 92, 27,
-114, 91, 26, -109, 100, 45, -119, 88, 21, -131, 79, 0,
-116, 93, 34, -120, 89, 25, -134, 76, -3, -132, 74, -3,
-118, 84, 25, -97, 100, 66, -71, 79, 59, -102, 100, 66,
-105, 106, 75, -63, 93, 90, -75, 74, 54, -61, 108, 117,
-79, 93, 83, -110, 89, 51, -105, 100, 74, -107, 80, 43,
-132, 75, 15, -109, 82, 47, -36, 61, 73, -24, 76, 107,
-79, 91, 89, 19, 67, 129, -18, 21, 21, -106, 11, -66,
-41, 73, 92, 32, 53, 118, 48, 67, 155, -14, 78, 128,
23, 66, 140, 68, 17, 87, 116, -7, 88, 92, -13, 56,
94, -97, -96, 121, -86, -49, 36, 8, 46, -84, 73, 57,
198, -81, 31, 88, 15, 107, -139, 99, 55, -15, 57, 95,
-48, 44, 39, 132, -65, -1, 101, -71, -41, 56, 19, 90,
-109, 95, 76, -84, 83, 80, 0, 44, 86, 127, -10, 101,
86, 14, 110, 30, 54, 137, -139, 80, 23, -137, 46, -42,
-135, 61, -7, -136, 58, -12, -136, 51, -26, -136, 54, -17,
-142, 64, 0, -143, 71, 15, -119, 71, 38, -139, 69, 17,
-130, 52, -6, -149, 58, -10, -141, 57, -1, -142, 57, -2,
-125, 55, 9, -115, 77, 66, -138, 60, 13, -145, 46, -19,
-135, 63, 25, -131, 63, 30, -145, 46, -15, -144, 29, -48,
-126, 9, -75, -131, 2, -89, -103, -2, -78, -145, 8, -85,
-73, -25, -101, -59, -25, -91, -125, 51, 20, -111, -21, -115,
-110, -10, -90, -144, 20, -50, -93, -27, -111, -87, 54, 54,
-145, 67, 47, -122, 0, -72, -96, -31, -117, -70, -24, -85,
-163, 1, -89, -50, -59, -140, -12, -32, -67, 158, -11, 64,
80, -49, -49, -105, -24, -102, -154, 32, -21, -130, -6, -79,
-155, 53, 20, -111, -1, -57, -135, -2, -70, -150, 10, -52,
-53, 63, 93, 122, 17, 89, 33, 27, 67, -87, 73, 97,
-111, 65, 72, -127, 62, 59, -142, 49, 30, -136, 52, 41,
-111, 67, 81, -142, 54, 45, -96, 68, 93, -145, 51, 42,
-138, 21, -15, -134, 3, -48, -143, 18, -19, -112, -14, -72,
-69, -19, -64, -127, 17, -11, 106, -88, -136, 73, -56, -82,
-17, -66, -133, -14, -67, -133, -156, 43, 26, -129, 56, 62,
-127, 53, 61, -121, 47, 50, -165, 41, 27, -100, 5, -21,
-39, 83, 150, -67, 73, 125, -70, 56, 90, -158, 25, 6,
-138, 1, -37, -115, -32, -97, -19, -22, -49, 170, 0, 48,
129, -52, -68, 49, -72, -127, 69, -67, -110, 37, -63, -111,
81, -63, -95, 66, -61, -96, 131, -36, -28, 169, -43, -28,
150, -47, -39, 90, -65, -90, 128, -53, -54, 120, -61, -71,
138, -48, -39, 123, -61, -65, 132, -58, -56, 91, -73, -96,
134, -71, -75, 115, -51, -44, 139, -53, -37, 119, -52, -43,
159, -20, 30, 145, -37, -3, 85, -30, -17, 36, -84, -128,
117, -79, -83, 122, -58, -44, 106, -49, -36, 109, -94, -106,
82, -82, -98, 75, -82, -101, 65, -85, -107, 62, -85, -108,
41, -87, -117, 33, -86, -120, 30, -89, -123, 20, -86, -123,
25, -88, -120, 33, -89, -119, 32, -90, -118, 34, -90, -117,
22, -90, -119, -12, -73, -110, 29, -103, -133, 32, -93, -116,
50, -95, -109, 14, -91, -119, -30, -84, -125, -195, 88, 36,
-121, 70, 44, -137, 65, 33, -119, 79, 60, -98, 87, 82,
-56, 82, 91, -57, 83, 96, -59, 73, 80, -205, 54, -2,
-151, 27, -18, -78, 5, -23, -22, 101, 138, -37, 90, 117,
-88, 84, 91, -127, 63, 47, -135, 56, 35, -139, 6, -38,
-140, 1, -47, -134, 70, 61, 5, 81, 122, 17, 78, 125,
-41, 86, 117, -89, 79, 93, -98, 75, 85, -119, 64, 62,
-100, 19, -1, 17, -95, -143, -132, 50, 38, -20, 87, 131,
47, 56, 102, 18, 68, 116, -29, 86, 130, -106, 66, 74,
-66, 73, 102, 130, 32, 94, 103, -30, -19, 47, 77, 145,
-70, 79, 111, -99, 71, 90, -128, 63, 68, -114, 62, 73,
-87, 70, 95, -55, 78, 123, -97, 68, 93, -121, 24, 7,
-147, 9, -24, -105, -31, -85, -80, 65, 96, -168, 46, 39,
-100, 19, 9, 53, -101, -168, -37, -29, -61, -127, 65, 85,
-121, 58, 77, -134, 29, 22, -156, 25, 12, -144, -2, -33,
-137, -3, -32, -103, -67, -138, -35, -62, -117, -94, -9, -32,
-79, 89, 144, -103, 42, 58, -147, 52, 71, -131, 39, 52,
-94, 50, 77, -110, 45, 69, -88, 41, 63, -145, 58, 91,
-135, 28, 39, -149, 33, 45, -154, 42, 67, -110, 29, 47,
-142, 33, 52, -122, 43, 75, -88, 36, 65, -48, 26, 48,
-79, -44, -90, -151, -18, -40, -139, -29, -58, -91, 10, 17,
-85, 59, 112, 37, 70, 137, 32, 61, 121, 79, 42, 84,
57, 43, 89, 16, 96, 195, 36, 62, 129, 70, 9, 19,
137, 40, 90, 51, 50, 108, 169, -17, -27, 36, 11, 26,
61, 36, 80, 155, -21, -32, 83, -6, -5, -231, 34, 53,
-136, -5, -19, -97, 17, 29, 72, 29, 68, -155, -33, -80,
-91, -42, -93, -163, -15, -36, -124, 23, 46, -123, 34, 71,
-112, 47, 100, -74, 53, 114, -24, 59, 131, 77, 57, 126,
-49, 54, 121, -99, 29, 69, -108, -6, -12, 54, -64, -146,
-67, -63, -139, -79, -39, -84, -150, 6, 20, -139, 16, 41,
-148, -25, -46, -76, -52, -109, -43, -62, -131, -129, -32, -58,
-159, -30, -48, -105, -46, -87, -124, -6, 0, -30, 8, 22,
-73, -24, -43, -57, 44, 101, 39, 66, 136, -102, 62, 146,
30, 32, 67, 11, 49, 105, 29, 27, 57, -151, -27, -39,
-117, 24, 70, 16, 27, 60, -138, -5, 10, -65, 55, 136,
-33, 35, 84, 122, 35, 61, 121, 49, 94, 115, 44, 86,
113, 41, 79, 158, 6, -6, 124, 3, -8, 183, 20, 27,
23, -15, -38, -80, -60, -133, -18, -46, -105, 10, -32, -75,
86, 19, 35, 82, 53, 115, 21, 61, 141, 16, 64, 151,
76, 33, 75, 102, 59, 134, 129, 33, 73, 138, 35, 80,
111, 28, 63, 105, 29, 69, 121, 41, 101, 115, 40, 102,
82, 18, 44, 870, 23, 91, 110, 40, 114, 77, 23, 70,
168, 28, 91, 133, 20, 70, 114, 30, 98, 147, 9, 46,
-90, 27, 62, 141, 13, 57, 73, -15, -30, 53, -51, -132,
-19, -34, -96, -41, -51, -145, 15, -49, -127, 95, -34, -73,
169, 5, 42, 52, 49, 140, 124, 28, 99, 17, 53, 147,
69, 28, 93, 171, -33, -53, 144, 4, 48, 140, 8, 58,
131, 12, 67, 113, 11, 64, 150, -6, 27, 138, -14, 5,
138, -42, -71, 49, -51, -127, 60, -54, -127, 76, -29, -53,
-71, 79, 190, -14, 52, 140, 1, 50, 144, 110, 25, 109,
-28, 52, 141, -81, 43, 99, -8, 49, 144, 48, 39, 136,
93, 26, 116, 113, 17, 100, 135, 5, 72, 150, -3, 56,
113, -7, 29, 162, -13, 33, 146, -15, 25, 140, -3, 62,
52, 28, 120, -7, 49, 156, 114, 7, 87, 44, 10, 60,
14, 38, 140, 41, 25, 111, -150, 31, 21, 30, 35, 144,
94, 17, 120, 126, 4, 94, 139, -28, -16, 135, -41, -62,
151, -29, -4, 25, 19, 88, -141, 35, 31, -58, 13, 9,
14, -26, -86, -127, 49, 98, 155, 0, 104, 71, 5, 70,
-208, 7, -117, -46, 10, 7, 91, 20, 141, 98, 13, 115,
101, 9, 110, 114, 4, 102, 96, 10, 117, 95, 1, 79,
109, -40, -76, 133, -7, 81, 117, -41, -68, -35, -14, -89,
120, -42, -66, 96, -58, -148, 89, 0, 74, 65, 10, 99,
130, -44, -61, 71, -13, 15, 25, 41, 188, 42, 22, 129,
122, -11, 72, 140, -30, 16, 82, 17, 155, -11, 36, 147,
11, 19, 96, 183, -61, -70, 112, -43, -66, 155, -51, -47,
84, -4, 77, 16, 27, 138, -14, 31, 125, -75, 53, 155,
-80, 36, 74, -32, 23, 74, -15, 35, 154, -25, 35, 141,
72, 0, 99, 109, -54, -133, 105, -45, -94, 50, -21, -34,
-128, 64, 153, -73, 48, 147, 30, 17, 135, -15, 32, 149,
18, 21, 148, 53, 10, 136, 28, 19, 158, 37, 11, 129,
65, 4, 136, 47, -2, 67, -5, 36, 232, -126, 44, 76,
38, 14, 176, 36, 11, 147, 59, 2, 141, 104, -14, 111,
123, -27, 48, 138, -42, -32, 187, -62, -75, -42, 18, 54,
-141, 44, 29, -118, 42, 81, -131, 41, 52, -47, 24, 99,
100, -12, 127, -67, 31, 125, 69, -3, 154, 111, -34, -29,
-3, -9, -99, 147, -28, 121, 100, -20, 81, 90, -18, 85,
77, -8, 160, 91, -20, 75, 130, -34, 57, -12, 7, 30,
-147, 40, -39, -126, 31, -55, -140, 35, -59, -92, 16, -109,
-133, 32, -52, -138, 31, -73, -128, 32, -25, -139, 29, -69,
-131, 24, -93, -135, 29, -56, -140, 29, -51, -155, 38, 9,
-68, 29, 120, -52, 14, 26, -2, -10, -105, -127, 37, 72,
-73, 28, 119, -80, 32, 142, -82, 30, 140, 29, 5, 136,
51, 1, 149, 91, -14, 95, 46, -1, 124, -187, 43, 23,
2, 10, 158, -32, 14, 112, -177, 35, -56, -60, 23, 186,
83, -11, 131, 135, -25, 77, 148, -30, 61, 135, -30, 13,
142, -36, -57, 44, -12, -44, 21, 3, 184, 63, -11, 92,
147, -40, -107, 144, -35, 15, 202, -54, -65, -73, 21, 54,
-123, 32, 26, -149, 37, 6, -32, 13, 130, 106, -21, 127,
51, -9, 130, -27, 8, 64, -59, 17, 91, 33, -5, 135,
77, -18, 95, 108, -26, 130, 55, -13, 135, 48, -11, 147,
66, -18, 128, 103, -27, 104, 85, -24, 134, 147, -41, 64,
19, -6, 68, 15, -5, 55, 129, -34, -105, 26, -8, 31,
25, -8, 70, 136, -36, -112, 129, -37, -45, 103, -32, 103,
80, -25, 120, 132, -38, -81, 21, -7, 3, -143, 41, 91,
-118, 37, -84, -104, 31, -37, 37, -15, 193, 1, -4, 148,
12, -8, 152, -17, -1, 153, 3, -8, 154, 55, -21, 114,
136, -42, 33, 138, -40, -30, 143, -45, 34, 130, -38, -51,
84, -20, -134, 141, -43, -46, 99, -28, -115, 139, -44, -30,
133, -47, 62, 126, -43, 4, 155, -52, -32, 141, -50, 9,
67, -29, 129, -217, 78, -48, -91, 30, 49, 147, -56, 97,
75, -27, 24, -208, 74, -46, -143, 50, -14, -108, 40, -86,
-122, 44, -87, -69, 19, 95, -20, -1, 153, -144, 42, 95,
-91, 26, 69, -105, 27, 110, -56, 9, 142, 31, -19, 141,
84, -28, 24, 106, -34, 10, -98, 21, 131, 30, -19, 134,
148, -48, 3, 117, -31, -89, 78, -17, -117, 122, -36, -74,
69, -22, -14, -138, 31, 215, -60, 10, 119, -78, 16, 122,
-115, 38, -4, -151, 50, -18, -124, 44, -71, -124, 43, -54,
-144, 45, -14, -64, 14, 67, 179, -57, 30, 125, -44, 67,
52, -28, 137, 63, -31, 126, 126, -49, 95, 144, -44, -27,
145, -47, -12, 144, -46, -26, 122, -48, 68, 107, -46, 95,
131, -53, 64, 136, -49, 11, 136, -52, 28, 89, -28, -48,
36, 2, -152, -16, 20, -148, 86, -19, -130, 104, -30, -102,
111, -37, -68, 140, -53, -1, 120, -48, 13, 104, -50, 107,
129, -49, -15, 73, -19, -133, 41, -13, -37, -39, 1, 179,
-129, 44, 82, -136, 57, -40, -129, 53, -27, -126, 47, 10,
-142, 50, 53, -63, 13, 112, 8, -18, 149, 45, -31, 143,
136, -57, 59, 142, -53, -20, 138, -57, 23, 102, -50, 93,
82, -46, 121, 126, -59, 66, 78, -45, 115, 43, -35, 140,
57, -39, 119, 74, -46, 108, -89, 19, 130, -46, -2, 147,
-88, 19, 119, -113, 31, 99, -93, 46, -59, 72, -8, -137,
102, -28, -92, 11, 18, -161, -96, 49, -74, -84, 51, -134,
-94, 51, -104, -79, 46, -124, -107, 51, -78, -132, 56, -46,
-104, 51, -100, -143, 47, 58, -132, 44, 48, -138, 54, -39,
-127, 51, -45, -138, 54, -54, -142, 53, -26, -121, 47, -58,
-126, 49, -59, -139, 50, -36, -135, 41, 25, -146, 45, 24,
-107, 44, -100, -115, 44, -86, -124, 45, -74, -148, 49, -40,
-125, 31, 66, -83, 14, 108, -48, -1, 147, -42, -1, 123,
116, -48, 130, 127, -47, 76, 124, -46, 79, 112, -45, 93,
74, -39, 124, 41, -31, 146, 95, -43, 99, 120, -41, 17,
125, -39, -7, 123, -50, 70, 110, -45, 58, 111, -53, 108,
78, -23, -21, 122, -24, -128, 143, -52, 19, 146, -46, -48,
73, -19, -46, 128, -61, 101, 66, -43, 127, -160, 48, 75,
-148, 45, 55, -120, 29, 88, -120, 29, 81, -122, 25, 107,
-140, 42, 39, -122, 26, 88, -106, 18, 107, -87, 7, 124,
-101, 13, 115, -20, -16, 122, 55, -38, 110, 148, -51, 18,
124, -43, 8, 82, -56, 149, 10, -26, 114, 62, -41, 104,
-119, 33, 37, -113, 55, -90, -93, 27, 22, 4, -32, 149,
-4, -32, 163, -60, -8, 131, -85, 3, 112, -35, -21, 147,
41, -47, 149, -77, -2, 113, -87, 20, 38, -90, 56, -120,
-88, 48, -90, -8, 17, -64, -53, -20, 162, -10, -31, 147,
55, -34, 69, -14, -15, 81, -74, -7, 122, -44, -22, 144,
-2, -43, 171, -14, -29, 128, -19, -34, 149, -41, -25, 138,
26, -38, 109, 85, -58, 111, 53, -51, 120, -70, -19, 143,
-68, 2, 64, -159, 44, 17, -135, 42, -6, -111, 47, -48,
-14, 46, -145, 77, 18, -141, 3, 26, -96, -128, 49, -44,
-150, 49, -21, -141, 24, 57, -100, -4, 114, -90, -3, 96,
222, -83, 76, 62, -44, 91, 74, -55, 118, 90, -69, 142,
142, -41, 0, 117, -61, 82, 66, -54, 112, 64, -59, 127,
39, -38, 80, -114, 24, 35, -160, 55, -21, -116, 7, 85,
-21, -50, 172, -30, -38, 141, -44, -33, 136, -18, -44, 143,
15, -50, 132, 125, -58, 61, 134, -55, 39, 87, -65, 108,
-108, -7, 111, -171, 30, 57, -122, 8, 76, -161, 52, -16,
-157, 32, 34, -14, -54, 156, 100, -54, 67, 150, -56, 35,
136, -17, -59, 121, -76, 104, -62, -35, 139, -143, 18, 62,
-138, 38, 4, -140, 47, -18, -139, 20, 48, -134, 64, -69,
-83, 61, -101, -108, 57, -75, -77, 52, -85, -35, 66, -152,
-97, 53, -78, -153, 45, -17, -139, 35, -4, -122, 43, -38,
-145, 48, -39, -131, 50, -55, -35, 17, -25, 137, -22, -26,
172, -52, 33, 120, -16, -36, 126, -23, -20, 163, -31, -28,
144, -22, -41, 137, -12, -66, 138, -19, -52, 141, -23, -41,
122, -3, -88, 89, 17, -123, 62, 29, -135, 27, 39, -143,
-8, 50, -143, -36, 54, -137, -97, 54, -86, -118, 58, -80,
-129, 45, -36, -124, 35, -5, -133, 33, 4, -164, 34, 26,
-107, 20, 20, -188, 54, -27, -146, 34, 0, -150, 34, 3,
-145, 30, 10, -127, 8, 63, -145, 14, 55, -85, -11, 92,
-32, -14, 67, -106, 45, -73, -137, 20, 24, -42, 26, -57,
73, 11, -81, -168, 22, 37, -53, -27, 118, -158, 15, 48,
-68, -6, 58, -88, 16, 1, -103, 34, -50, -68, 18, -19,
189, -4, -93, 63, 34, -146, -88, 35, -63, -131, 25, -8,
-159, 26, 8, -61, -27, 121, 26, -41, 118, 15, -28, 81,
-100, 59, -136, -39, 43, -117, -48, 35, -90, -92, -13, 92,
24, -50, 148, -47, -22, 93, -103, 51, -111, -30, -54, 187,
-4, -45, 141, -43, -10, 52, -44, 57, -156, -3, 55, -172,
-113, 9, 23, -46, -29, 115, -20, -42, 140, -51, -43, 155,
-8, -37, 114, -142, 27, -21, -138, 10, 25, 3, -21, 63,
99, -27, 38, 1, -24, 71, -133, 8, 28, -51, -34, 119,
20, -39, 105, -49, -14, 57, -19, 63, -172, -63, 18, -30,
3, -52, 148, -27, -6, 29, -81, 38, -80, -1, -47, 132,
41, -28, 66, -100, 12, 0, -57, -14, 60, -78, -50, 161,
19, -50, 132, -110, -31, 118, 37, -32, 72, 121, -13, -3,
-55, -17, 61, -119, -5, 51, 22, -32, 75, -8, -30, 81,
-128, 34, -51, -13, -34, 92, -68, -38, 115, 104, -25, 35,
-22, -38, 101, -97, -8, 46, 10, -31, 75, 96, -15, 11,
-150, -26, 102, -89, -41, 122, -29, -49, 124, -5, -59, 142,
102, -25, 34, -142, -35, 113, -11, -42, 101, -17, -61, 141,
32, -65, 140, -65, -49, 121, -116, -25, 80, -12, -22, 49,
74, 4, -24, -32, -65, 149, -87, -22, 64, -107, -19, 61,
-74, -53, 125, -30, -54, 117, -20, -47, 102, 103, -40, 63,
121, 38, -100, 11, 45, -95, 83, 15, -48, -5, -52, 109,
-74, -49, 115, -125, -37, 99, -78, 21, -28, -105, 24, -32,
-65, -36, 84, -117, -54, 126, -12, -43, 88, 3, -20, 39,
-93, 17, -21, 40, -36, 67, -187, 32, -38, -68, -35, 77,
142, -19, 19, 44, -6, 7, -107, -31, 73, -170, 5, 11,
-38, -29, 61, 138, -35, 51, 19, -30, 56, -139, 30, -41,
-26, -22, 45, -79, -18, 43, -10, -20, 39, -119, 5, 2,
-73, -15, 35, 51, -34, 60, 135, -9, 4, 88, -13, 15,
-204, 6, 8, -58, -54, 107, 41, -62, 111, -12, -60, 111,
165, 3, -22, 141, 9, -30, 81, 9, -26, 121, 5, -25,
46, 10, -23, -65, -71, 137, -113, 15, -13, -165, 6, 8,
-137, -10, 31, -71, -39, 77, 44, -55, 96, 56, -52, 87,
-60, -51, 95, 76, -8, 8, 32, -7, 9, 58, -30, 46,
91, 74, -140, 133, 14, -40, -101, -58, 115, -116, -74, 141,
22, -36, 61, 36, -9, 12, -128, -39, 79, -45, -62, 111,
96, -4, -3, 89, 24, -50, 69, 16, -36, -27, -68, 119,
-8, -73, 125, 52, -14, 17, -163, -5, 26, -11, -80, 133,
113, -56, 81, 164, -41, 48, 93, -44, 62, 120, -27, 28,
139, 12, -38, 114, 32, -68, 113, 56, -108, 91, 75, -138,
71, 50, -95, 85, 48, -96, 129, 23, -62, 16, 79, -137,
-21, 60, -100, 45, 39, -76, 43, -102, 168, 100, -60, 85,
86, -42, 54, 22, -91, 149, 77, -82, 121, 102, -39, 44,
30, -102, 160, 52, -68, 100, 79, -76, 105, 81, -75, 101,
100, -72, 92, 107, -82, 103, -20, -80, 129, 43, -77, 108,
97, -78, 95, 31, -91, 130, 152, -23, -2, 139, 15, -55,
85, 37, -78, -46, 84, -116, 82, 66, -121, 93, 34, -76,
140, 2, -42, 120, 7, -44, 27, 94, -155, 33, 71, -122,
-10, 85, -133, -17, 82, -129, -22, 77, -118, -36, 75, -113,
0, 71, -119, -42, 78, -120, -84, 51, -62, -18, 8, -8,
158, 11, -67, 92, 44, -104, 59, 43, -94, 109, 50, -124,
-4, 43, -75, -166, -24, 98, -135, 18, 11, -144, 30, -10,
-87, 17, -4, 167, 12, -72, 119, 0, -37, 2, 31, -55,
149, -74, 84, 81, 29, -78, 74, 63, -140, -30, 63, -103,
-137, 64, -72, -118, 56, -65, -130, 36, -23, -116, 42, -42,
-64, 75, -122, -41, 74, -128, -29, 75, -135, 10, 49, -99,
-15, 80, -154, -40, 69, -124, 76, 46, -118, -7, 57, -113,
69, 41, -108, 71, 47, -122, 85, 54, -144, 93, 36, -111,
75, 31, -94, 48, 61, -151, 27, 60, -142, 7, 54, -123,
-98, 55, -87, 11, 62, -146, -33, 63, -135, 49, 45, -126,
-1, 19, -44, 43, 11, -45, 45, 31, -92, 136, -8, -38,
142, 2, -68, 121, -7, -38, 168, -56, 59, 69, -63, 119,
54, -65, 129, -102, -29, 116, -19, -59, 146, -32, -54, 138,
-35, -54, 138, -50, -50, 131, -57, -41, 114, -34, -55, 135,
-52, -49, 125, -61, -30, 89, -21, -65, 145, 24, -66, 128,
78, -59, 90, 58, -76, 131, 98, -70, 104, 39, -58, 98,
35, -86, 155, 29, -67, 119, 95, -70, 98, 126, -32, 10,
161, -43, 16, 118, -28, 2, 88, -64, 85, 11, -26, 43,
80, 38, -106, 156, 9, -87, 89, 28, -93, 101, 21, -88,
125, 31, -120, 87, 26, -94, 91, 14, -71, 143, 6, -86,
115, 7, -74, 136, 12, -97, 132, -76, 79, 140, -29, -19,
134, -20, -36, 62, -45, 55, -190, 9, 90, -75, -38, 116,
-100, -25, 103, -13, -67, 136, -131, -8, 83, -145, 16, 45,
-146, 21, 32, -137, 6, 55, -107, -24, 97, -117, -9, 71,
-105, -33, 110, -98, -41, 117, 21, -66, 111, 73, -68, 92,
97, -88, 114, 158, -25, -26, 66, -81, 113, 35, -79, 122,
68, -81, 109, 16, -74, 121, -89, -48, 120, -143, 29, 13,
-109, 73, -77, -134, 61, -47, -107, 36, -17, -124, -37, 114,
-48, -64, 126, 16, -80, 128, -34, -71, 129, 31, -93, 141,
30, -73, 105, 61, -83, 110, 66, -83, 105, 74, -87, 106,
34, -78, 107, -27, -60, 104, -107, 38, -18, 47, 87, -152,
-16, 52, -75, -34, -119, 198, -91, -45, 103, -86, -36, 85,
-11, -86, 133, -87, -52, 109, -140, -7, 59, -122, 57, -43,
-29, 57, -75, -218, 21, 39, -130, -21, 74, -112, -40, 93,
-111, -38, 89, -63, -56, 100, -148, -32, 88, -129, -25, 72,
-126, -32, 78, -132, -15, 55, -87, 9, 10, 190, -58, 34,
-36, -31, 53, -140, 41, -22, -103, 81, -90, -133, 38, -21,
-139, 51, -42, -94, -4, 27, -136, -64, 122, -128, -38, 80,
-91, -22, 48, -108, 37, -30, -13, 81, -112, -199, 13, 18,
-104, 55, -58, -90, 68, -83, -50, 40, -48, -25, 89, -125,
1, 91, -135, 42, 64, -102, 84, 60, -105, 60, 68, -113,
96, 51, -97, -95, 45, -50, -102, 33, -33, -46, 108, -159,
68, 72, -125, -33, 84, -128, -29, 28, -39, -132, -44, 93,
-66, -71, 124, -120, -33, 72, -139, -21, 54, -71, -78, 132,
72, -25, 27, 91, 85, -145, 98, 9, -30, 90, -10, 1,
-70, -93, 155, -18, -17, 29, -92, 29, -29, -109, -42, 80,
-76, -38, 70, 13, -54, 79, 32, -90, 131, 5, -98, 145,
84, -39, 46, 72, -99, 134, 40, -83, 114, 75, -76, 97,
-8, -64, 92, 19, -48, 65, 63, -79, 100, 137, -58, 59,
59, -44, 51, -210, 58, -47, -104, -26, 52, -25, -83, 118,
-102, 23, -17, -129, 39, -35, -146, -27, 55, 4, -80, 109,
-47, -11, 21, -127, 39, -37, -147, -12, 32, -140, -28, 53,
-93, -63, 94, -127, -54, 83, -74, -49, 71, -18, -91, 121,
-46, -85, 114, -90, -78, 108, -68, -65, 87, 16, -45, 57,
47, -36, 41, -117, -21, 35, 128, -38, 39, -230, 4, 9,
-135, -41, 59, -128, -49, 67, -143, -27, 39, -139, -41, 56,
-32, -93, 115, 6, -98, 119, -35, -60, 72, -123, -64, 80,
-144, -29, 37, -135, -47, 56, -12, -90, 106, -152, -52, 60,
-149, 15, -18, -155, 15, -20, -86, 84, -100, -162, -7, 4,
52, -114, 135, 32, -91, 106, 9, -114, 130, -161, -25, 24,
-133, 4, -10, -139, -10, 5, -111, 74, -90, -151, -18, 12,
-136, -26, 20, -161, -16, 8, -72, -73, 77, 57, -63, 75,
-53, -87, 93, 137, -50, 67, 137, -19, 29, 162, -32, 46,
100, -45, 55, 119, -19, 27, 91, -75, 85, 133, -37, 45,
-30, -117, 125, 67, -94, 103, 85, -65, 71, 146, -61, 67,
44, -104, 109, -9, -94, 97, 103, -89, 93, 52, -99, 101,
23, -57, 57, -115, 142, -145, -71, -3, 2, -22, -109, 110,
-19, -107, 106, 14, -78, 78, -40, -136, 133, -28, -107, 103,
-32, -106, 101, -74, -99, 92, -138, -42, 35, -146, 0, -5,
-143, 33, -37, -142, -16, 8, -151, 34, -42, -139, -3, -6,
-172, -22, 9, -145, 9, -21, -145, 24, -35, -138, 23, -34,
-148, 23, -37, -159, -13, -4, -147, -4, -14, -148, -5, -12,
-141, 50, -67, -128, 15, -31, -139, -42, 21, -62, -79, 67,
-211, -45, 10, -123, -56, 35, -32, -88, 78, 77, -89, 95,
53, -76, 79, -2, -93, 86, -45, -126, 108, -2, -102, 92,
2, -115, 103, 22, -108, 99, -27, -115, 98, -8, -54, 45,
-83, -186, 148, -46, -98, 76, -66, -108, 81, -83, -102, 72,
-64, -84, 59, -44, -119, 91, 19, -93, 79, 126, 53, -22,
61, 39, -23, -122, -131, 87, 47, -63, 58, 109, -10, 26,
-38, -152, 115, -1, -121, 95, -19, -114, 86, -49, -117, 83,
18, -67, 55, 169, 15, 14, 153, -25, 40, 133, 6, 14,
142, 54, -22, 157, 13, 10, 84, -19, 25, 121, -86, 80,
70, -67, 58, 30, -135, 104, 79, -114, 93, 127, -64, 60,
128, 33, -12, 92, 101, -65, 140, 50, -25, 138, 39, -17,
123, 56, -33, 151, 11, 3, 151, -8, 16, 148, 11, 0,
152, -13, 18, 134, 36, -21, 159, -4, 9, 106, 95, -67,
69, 112, -83, 114, 78, -56, 141, 35, -24, 133, 37, -26,
39, 115, -89, 58, 119, -92, 90, 88, -69, 131, 65, -52,
61, 86, -69, -122, 102, -82, -43, 111, -91, 13, 111, -91,
73, 102, -84, 87, 93, -79, 93, 91, -77, 81, 100, -86,
77, 60, -52, 88, 121, -106, 134, 42, -40, 147, 33, -32,
144, 32, -34, 110, 76, -70, 132, 56, -56, 124, 59, -59,
73, 90, -85, 0, 111, -100, -56, 113, -101, -23, 112, -102,
34, 91, -87, 120, 73, -76, 120, 69, -72, 103, 22, -29,
168, -48, 33, 114, 8, -17, 115, -6, -4, 128, -73, 57,
153, -46, 29, 141, -6, -10, 144, 54, -67, 82, 80, -86,
112, 69, -80, 121, 50, -63, 145, 31, -49, 99, 69, -81,
80, 84, -95, 121, 57, -75, 149, -25, 2, 134, -51, 28,
136, -50, 26, 130, -60, 35, 52, -105, 93, 70, -99, 83,
55, -106, 91, 69, -75, 59, 122, -75, 47, 102, -99, 73,
141, -44, 13, 116, -90, 59, 127, -69, 37, 105, -88, 57,
126, -83, 47, 135, -58, 22, 123, -28, -3, 147, -15, -22,
126, -70, 33, 105, -88, 52, 132, -70, 28, 155, -24, -19,
74, -117, 83, 113, -80, 41, 135, -26, -15, 107, -79, 39,
69, -110, 75, 82, -106, 67, 60, -114, 80, 26, -104, 80,
-78, -77, 86, -23, -114, 101, -26, -99, 88, 115, -56, 13,
83, 65, -77, 68, 93, -96, 53, 91, -91, -1, 112, -93,
128, 48, -79, 49, 65, -70, -51, 122, -89, -128, 78, -28,
-125, 71, -24, 8, 117, -104, 39, 103, -103, 86, 76, -94,
104, -33, -2, 164, -45, -12, 114, -71, 26, 89, -93, 54,
97, 12, -43, -10, 118, -102, -113, 94, -46, -123, 78, -31,
-144, 57, -5, -133, 65, -17, -139, 59, -10, -143, 42, 4,
-142, 49, -3, -141, 79, -31, 14, 125, -120, -172, 27, 24,
-145, 1, 39, -142, 41, 0, -124, 69, -32, -127, 77, -40,
-115, 84, -50, -80, 101, -77, -62, 107, -87, -76, 104, -82,
-102, 74, -48, -137, 65, -31, -133, 63, -32, -126, 69, -40,
-81, 97, -79, -38, 109, -101, 34, 91, -101, -89, 117, -101,
60, 86, -102, 128, 30, -60, 109, 51, -79, 144, -3, -31,
37, -68, 62, 12, -104, 106, 70, -91, 77, 105, -36, 12,
54, 87, -104, 82, 59, -82, 137, -74, 40, 56, -99, 89,
72, -97, 79, 123, -77, 46, 1, -51, 51, 118, -122, 90,
134, -72, 34, 107, -73, 41, 151, -4, -39, 153, -49, 1,
130, -72, 32, 136, -74, 30, 31, -32, 22, -122, 21, 18,
213, -65, -5, 139, -55, 9, 144, -73, 23, 103, -35, -1,
148, -91, 37, 112, -86, 43, 138, -77, 24, -10, -96, 95,
35, -112, 91, 22, -110, 94, 18, -133, 116, 33, -91, 71,
140, -97, 36, 114, -81, 32, 83, -104, 62, 88, -88, 45,
129, -94, 34, 135, -66, 6, 69, -40, 8, -23, -79, 78,
115, -110, 50, 89, -38, -3, 126, -18, -34, 159, 17, -78,
142, -3, -56, 130, -29, -28, 119, -85, 22, -228, 24, 75,
-138, 50, 14, -119, -8, 55, -120, -49, 88, -42, -110, 108,
111, -102, 42, 122, -103, 37, 19, -127, 96, 120, -89, 24,
113, 33, -72, 102, -109, 47, 63, -49, 12, 89, 76, -98,
119, -92, 24, 37, 13, -26, -57, 117, -70, -80, 121, -65,
-91, 110, -52, 25, 58, -59, 134, -63, -5, 47, 72, -80,
-121, 89, -23, -21, 73, -53, 144, 21, -80, 128, -70, 4,
87, -9, -31, -51, 146, -103, -119, 77, -13, -136, 65, 3,
-121, 63, -2, -151, 55, 16, -61, 42, -11, 63, 83, -100,
-9, 85, -71, 85, -38, -2, -133, 153, -80, -101, 103, -51,
-106, 100, -46, -27, 125, -104, 68, 49, -73, 134, -93, 29,
112, -92, 36, 75, -17, -16, -36, 90, -68, 134, -79, 14,
41, 11, -28, -67, 96, -59, 113, -7, -44, -169, 116, -33,
11, 66, -66, 125, 23, -78, 96, 39, -80, 125, 5, -63,
105, 13, -62, 149, -35, -38, 149, -29, -43, 116, -76, 15,
140, 11, -79, 28, -41, 24, -103, -68, 116, 35, -72, 52,
96, 112, -154, 98, 57, -105, 75, 70, -106, 56, 82, -109,
128, 13, -81, 127, 12, -79, 112, -18, -44, 95, 62, -113,
-145, 71, 8, -141, 52, 25, -122, 78, -13, -72, 105, -68,
-105, 106, -53, -118, 86, -27, -5, 75, -75, 43, 77, -102,
-37, 120, -108, 39, 89, -115, 102, 41, -100, -33, 122, -114,
-32, 111, -104, -30, 100, -95, 3, 95, -108, 22, 84, -107,
160, 5, -96, -13, 108, -117, -43, 104, -96, -38, 95, -89,
72, 25, -71, 82, 100, -168, 27, 90, -125, 11, 88, -114,
111, 33, -107, 76, 31, -85, 88, 25, -87, -59, 90, -76,
-21, 26, -20, 98, -112, 81, 108, -71, 21, 69, -16, -24,
-180, -4, 118, -23, -14, 31, 114, -65, 10, 158, -67, -16,
132, -5, -78, 125, 10, -94, 134, -33, -47, 47, -66, 51,
-99, -45, 120, -80, -55, 119, -12, -79, 103, 182, -57, -48,
134, -44, -36, 78, -102, 70, 37, -104, 100, 148, -59, -29,
89, 44, -113, 40, 79, -121, 101, 33, -110, 79, 41, -105,
65, 56, -115, 144, -23, -75, 92, 32, -108, -42, 108, -105,
-159, 7, 107, -90, -33, 108, -132, 55, 25, -118, 90, -29,
-103, 98, -51, -28, 90, -95, 70, 20, -75, 80, 89, -172,
92, 41, -119, 84, 19, -87, 107, 13, -98, 85, 61, -144,
62, 52, -118, 125, 7, -107, 86, 30, -108, 72, 14, -78,
154, -9, -111, -4, -62, 89, -80, -44, 124, -41, -57, 111,
-114, -27, 126, -13, -39, 63, 115, -63, -7, 145, -69, -22,
8, -33, 38, -49, -42, 94, -32, -19, 49, -4, -135, 179,
30, -76, 74, -119, -11, 106, -110, 8, 72, 26, -75, 74,
162, -54, -53, 120, -86, 15, 134, -31, -63, 127, -64, -19,
133, -52, -41, 132, -45, -49, 131, -71, -18, 131, -76, -11,
128, -82, -5, 130, -75, -16, 137, -72, -27, 125, -50, -44,
131, -43, -60, 125, -75, -16, 123, -73, -18, 94, -109, 49,
99, -108, 43, 72, -113, 72, -6, -94, 117, -37, -74, 120,
-73, -52, 124, -70, -54, 122, -89, -43, 125, -122, 14, 87,
-132, 33, 71, -112, -8, 101, -98, -33, 116, -106, -14, 99,
-136, 29, 75, -115, 31, 55, -132, 22, 76, -126, 63, 27,
-119, 4, 84, -114, 25, 57, -133, 114, -27, -108, -4, 81,
-131, 31, 60, -111, 101, -33, -88, 5, 57, -112, -20, 99,
-128, 7, 80, -130, 7, 80, -127, 2, 81, -101, -39, 109,
-106, -35, 104, -82, -52, 107, -80, -62, 115, -85, -56, 112,
-46, -79, 108, -112, -35, 103, -136, 22, 59, -130, 13, 63,
-131, -5, 82, -136, 18, 59, -107, -21, 81, 65, -99, 62,
120, -47, -21, 86, -22, -27, -177, -28, 128, -37, -77, 95,
-126, -30, 99, -132, 3, 68, -125, 14, 53, -140, -26, 99,
-120, 26, 36, -121, -25, 86, -74, -77, 110, -52, -90, 110,
18, -115, 97, 63, -74, 37, 134, 27, -91, 87, -35, -12,
-6, -95, 91, 120, -127, 55, 1, -112, 100, 34, -86, 60,
-158, 38, 45, 42, -116, 82, 178, -55, -41, 144, -64, -17,
24, -119, 91, 90, -110, 49, 95, -87, 25, -4, -78, 69,
140, 2, -75, 128, 11, -77, 27, -34, 14, -66, -60, 87,
-90, -34, 75, 184, -9, -90, 135, 38, -104, 151, -52, -39,
91, -55, -3, 109, -105, 27, 139, -47, -38, 111, 10, -72,
124, 27, -95, 56, 55, -80, -20, 119, -91, 42, 74, -89,
136, -10, -73, 133, -37, -48, 139, -57, -36, 133, -59, -31,
117, -98, 11, 130, -69, -22, 125, 1, -82, 110, 25, -93,
116, 15, -90, 91, 52, -107, 48, 96, -119, 61, 81, -114,
103, 26, -94, 133, -55, -43, 129, -24, -70, 42, 57, -82,
118, 50, -132, 58, -114, 63, -48, -95, 121, 81, -123, 53,
13, -114, 92, 40, -113, 72, 91, -122, 41, 36, -120, 78,
75, -122, 50, -4, -99, 87, -24, -99, 101, 12, -122, 93,
-4, -114, 97, -9, -114, 98, 1, -113, 91, 2, -125, 97,
1, -114, 89, 20, -125, 83, 9, -123, 88, -6, -117, 93,
-27, -109, 100, -52, -94, 105, -86, -64, 105, -114, -26, 95,
-130, -8, 92, -97, -4, 66, -89, -7, 62, -155, 22, 83,
50, -167, 88, 34, -111, 55,
/* 1 */
2737, 1, -14284, 23878, -11217,
-82, -105, -117, -15, 25, 72, -60, -31, 10, -79, -19, 62,
9, 110, 225, -46, -61, -72, -154, -85, 22, 40, 7, -38,
54, -36, -148, 1, -47, -99, -122, -119, -90, -97, 31, 190,
25, -21, -77, -3, -73, -146, -91, -31, 55, 11, -36, -89,
-159, -97, 12, -70, -4, 82, -94, 2, 131, -118, -56, 45,
-43, 51, 167, -40, -46, -43, 34, -54, -159, -75, -37, 27,
-59, 19, 122, -93, -16, 98, 60, 99, 126, -21, -11, 5,
-93, -116, -113, -75, 5, 120, -18, -24, -28, -75, -101, -104,
-108, -75, 1, -89, -3, 123, 55, 85, 101, -32, -19, 6,
-123, -105, -42, -7, -27, -46, -43, -47, -35, -81, 17, 159,
-116, -60, 49, -40, -57, -60, -105, -66, 22, -127, -79, 29,
-105, -95, -35, -124, -106, -28, -98, -74, 1, -88, -112, -92,
-92, -106, -71, 18, -79, -186, 29, 58, 71, 40, 78, 93,
80, 93, 65, 18, -7, -42, -45, -114, -161, 40, 41, 20,
30, 80, 115, 96, 95, 47, 95, 26, -94, 91, 7, -122,
101, 19, -114, 137, 43, -116, -52, -83, -87, -118, -92, -9,
-117, -93, -10, -108, -96, -29, -143, -117, -12, -135, -130, -48,
-50, -79, -75, -157, -56, 130, 47, -16, -100, -29, -66, -80,
-93, -105, -5