diff -u --recursive --new-file xearth-1.0/MAKEFILE.gcc xearth-1.0.atari.rel4/MAKEFILE.gcc
--- xearth-1.0/MAKEFILE.gcc	Thu Jan  1 01:00:00 1970
+++ xearth-1.0.atari.rel4/MAKEFILE.gcc	Tue Oct 13 19:28:08 1998
@@ -0,0 +1,64 @@
+# 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.
+
+# GNU C 2.8.1 for ATARI
+# ST version.
+
+DEFINES =
+CC	= gcc
+# -w for short int ( DOES NOT WORK - GIVES WRONG MERCATORPROJ)
+CFLAGS	= -O2 -m68000 -finline-functions -Wmissing-prototypes -fomit-frame-pointer -DATARI
+           
+
+LDFLAGS =
+
+PROG	= xearth
+SRCS	= xearth.c dither.c extarr.c gif.c gifout.c mapdata.c \
+	  ppm.c render.c scan.c sunpos.c
+OBJS	= xearth.o dither.o extarr.o gif.o gifout.o mapdata.o \
+	  ppm.o render.o scan.o sunpos.o
+# no need for pml library if 68020+68881
+LIBS	= -lpml
+
+xearth.ttp:	$(OBJS)
+	$(CC) $(CFLAGS) -o xearth.ttp $(OBJS) $(LIBS)
+
diff -u --recursive --new-file xearth-1.0/extarr.c xearth-1.0.atari.rel4/extarr.c
--- xearth-1.0/extarr.c	Mon Aug 28 10:27:29 1995
+++ xearth-1.0.atari.rel4/extarr.c	Tue Oct 13 19:28:04 1998
@@ -94,6 +94,7 @@
   {
     limit *= 2;
     body   = (void *) realloc(body, (unsigned) eltsize*limit);
+
     assert(body != NULL);
 
     x->limit = limit;
diff -u --recursive --new-file xearth-1.0/gif.c xearth-1.0.atari.rel4/gif.c
--- xearth-1.0/gif.c	Mon Sep 25 02:09:43 1995
+++ xearth-1.0.atari.rel4/gif.c	Tue Oct 13 19:28:04 1998
@@ -56,14 +56,49 @@
 static u16or32 *dith;
 
 
+/* changed: (Tommy)
+ * if -gif is used then use stdout for gif output
+ *  user can then send output to another program
+ *  or redirect to a file
+ * no -gif, picture saved to world.gif
+ */
+
 void gif_output()
 {
+extern short use_stdout;	/* if -gif specified -> must use stdout */
+
+#ifdef ATARI
+  FILE *fp;
+#endif
   compute_positions();
   scan_map();
   do_dots();
+#ifndef ATARI
   gif_setup(stdout);
   render(gif_row);
   gif_cleanup();
+#else
+	if (use_stdout)
+	{
+#ifdef LATTICE
+		fmode(stdout,1);	/* stdout to binary mode */
+#else
+		stdout->_flag |= _IOBIN;  /* force GCC to use binary output */
+#endif
+		gif_setup(stdout);
+		render(gif_row);
+		gif_cleanup();
+	}
+	else
+	{	if (fp=fopen("world.gif","wb"))
+		{	gif_setup(fp);
+			render(gif_row);
+			gif_cleanup();
+		}
+		else
+			printf("Could not save gif\n");
+	}
+#endif
 }
 
 
@@ -79,6 +114,7 @@
 
   dither_setup(num_colors);
   dith = (u16or32 *) malloc((unsigned) sizeof(u16or32) * wdth);
+
   assert(dith != NULL);
 
   for (i=0; i<dither_ncolors; i++)
diff -u --recursive --new-file xearth-1.0/gifout.c xearth-1.0.atari.rel4/gifout.c
--- xearth-1.0/gifout.c	Sun Sep 24 06:28:14 1995
+++ xearth-1.0.atari.rel4/gifout.c	Tue Oct 13 19:28:05 1998
@@ -46,10 +46,12 @@
  */
 
 #include <stdio.h>
+#ifdef ATARI
+#include <stdlib.h>
+#endif
 #include "port.h"
 #include "gifint.h"
 #include "kljcpyrt.h"
-
 
 /****
  **
diff -u --recursive --new-file xearth-1.0/makefile.st xearth-1.0.atari.rel4/makefile.st
--- xearth-1.0/makefile.st	Thu Jan  1 01:00:00 1970
+++ xearth-1.0.atari.rel4/makefile.st	Tue Oct 13 19:28:08 1998
@@ -0,0 +1,65 @@
+# 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.
+
+
+# LATTICE C 5.52 for ATARI
+# Basic Atari ST (68000 no FPU)
+
+DEFINES =
+CC	= lc
+# USE LONG INTEGERS!!
+CFLAGS	= -b4 -ms -r6 -v -cf -ci -d0 -fl -m0 -rr -fm -j104i -Oloop,alias
+
+LDFLAGS = 
+
+PROG	= xearth
+SRCS	= xearth.c dither.c extarr.c gif.c gifout.c mapdata.c \
+	  ppm.c render.c scan.c sunpos.c
+OBJS	= xearth.o dither.o extarr.o gif.o gifout.o mapdata.o \
+	  ppm.o render.o scan.o sunpos.o
+LIBS	= -Lm
+
+xearth.ttp:	$(OBJS) makefile.st
+	$(CC) -N $(CFLAGS) $(OBJS) $(LIBS)
+
+.c.o: 
+	$(CC) $(CFLAGS) $*.c 
diff -u --recursive --new-file xearth-1.0/makefile.tt xearth-1.0.atari.rel4/makefile.tt
--- xearth-1.0/makefile.tt	Thu Jan  1 01:00:00 1970
+++ xearth-1.0.atari.rel4/makefile.tt	Tue Oct 13 19:28:08 1998
@@ -0,0 +1,65 @@
+# 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.
+
+# LATTICE C 5.52 for ATARI
+# TT version FPU inline and 68030 CPU.
+
+DEFINES =
+CC	= lc
+# use long integers !!!
+CFLAGS	= -cl -b4 -ms -r6 -v -cf -ci -d0 -f8 -m3 -rr -fm -j104i -Oloop,alias
+
+LDFLAGS = 
+
+PROG	= xearth
+SRCS	= xearth.c dither.c extarr.c gif.c gifout.c mapdata.c \
+	  ppm.c render.c scan.c sunpos.c
+OBJS	= xearth.o dither.o extarr.o gif.o gifout.o mapdata.o \
+	  ppm.o render.o scan.o sunpos.o
+LIBS	= -Lm
+
+xearth.ttp:	$(OBJS) makefile.tt
+	$(CC) -N $(CFLAGS) $(OBJS) $(LIBS)
+
+.c.o: 
+	$(CC) $(CFLAGS) $*.c 
+
diff -u --recursive --new-file xearth-1.0/mapdata.c xearth-1.0.atari.rel4/mapdata.c
--- xearth-1.0/mapdata.c	Sat Sep  9 07:33:49 1995
+++ xearth-1.0.atari.rel4/mapdata.c	Tue Oct 13 19:28:06 1998
@@ -71,10 +71,14 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "xearth.h"
-#include "kljcpyrt.h"
+/* #include "xearth.h"
+#include "kljcpyrt.h" */
 
+#ifdef LATTICE
+far short map_data[] = {
+#else
 short map_data[] = {
+#endif
 
 /* 0 */
 3903, 1, 13663, 15523, 21733,
diff -u --recursive --new-file xearth-1.0/ppm.c xearth-1.0.atari.rel4/ppm.c
--- xearth-1.0/ppm.c	Sun Sep 24 02:46:09 1995
+++ xearth-1.0.atari.rel4/ppm.c	Tue Oct 13 19:28:06 1998
@@ -65,18 +65,21 @@
 }
 
 
-static void ppm_setup(s)
-     FILE *s;
+static void ppm_setup(FILE *s)
 {
-  outs          = s;
-  bytes_per_row = wdth * 3;
+	outs          = s;
+	bytes_per_row = wdth * 3;
 
-  fprintf(outs, "P6\n%d %d\n255\n", wdth, hght);
+#ifdef LATTICE
+	fmode(stdout,1);	/* binr, no trans */
+#else
+	stdout->_flag |= _IOBIN;	/* force bin */
+#endif
+	fprintf(outs, "P6\n%d %d\n255\n", wdth, hght);
 }
 
 
-static void ppm_row(row)
-     u_char *row;
+static void ppm_row(u_char *row)
 {
-  assert(fwrite(row, 1, bytes_per_row, outs) == bytes_per_row);
+	assert(fwrite(row, 1, bytes_per_row, outs) == bytes_per_row);
 }
diff -u --recursive --new-file xearth-1.0/render.c xearth-1.0.atari.rel4/render.c
--- xearth-1.0/render.c	Mon Sep 25 02:10:37 1995
+++ xearth-1.0.atari.rel4/render.c	Tue Oct 13 19:28:06 1998
@@ -47,6 +47,9 @@
 
 #include "xearth.h"
 #include "kljcpyrt.h"
+#ifdef ATARI
+#include <osbind.h>	/* Random() */
+#endif
 
 static void new_stars _P((double));
 static void new_grid _P((int, int));
@@ -525,9 +528,13 @@
 
   for (i=0; i<max_stars; i++)
   {
+#ifndef ATARI
     x = random() % wdth;
     y = random() % hght;
-
+#else
+    x= Random() % wdth;	/* buggy Lattice random() with long int */
+    y= Random() % hght;
+#endif
     newdot = (ScanDot *) extarr_next(dots);
     newdot->x    = x;
     newdot->y    = y;
diff -u --recursive --new-file xearth-1.0/scan.c xearth-1.0.atari.rel4/scan.c
--- xearth-1.0/scan.c	Mon Sep 25 02:12:11 1995
+++ xearth-1.0.atari.rel4/scan.c	Tue Oct 13 19:28:07 1998
@@ -207,7 +207,7 @@
 
 void scan_map()
 {
-  int i;
+  register int i;
 
   view_pos_info.cos_lat = cos(view_lat * (M_PI/180));
   view_pos_info.sin_lat = sin(view_lat * (M_PI/180));
@@ -491,8 +491,8 @@
      double x_0, y_0, a_0;
      double x_1, y_1, a_1;
 {
-  int    i;
-  int    lo, hi;
+  register int    i;
+  register int    lo, hi;
   double angle, step;
   double prev_x, prev_y;
   double curr_x, curr_y;
@@ -548,8 +548,8 @@
 
 void merc_scan_curves()
 {
-  int     i;
-  int     cidx;
+  register int     i;
+  register int     cidx;
   int     npts;
   int     val;
   short  *raw;
@@ -595,8 +595,8 @@
      int    npts;
      short *data;
 {
-  int     i;
-  int     x, y, z;
+  register int     i;
+  register int     x, y, z;
   double  scale;
   double *pos;
   double *rslt;
@@ -776,8 +776,8 @@
 
 void merc_handle_xings()
 {
-  int       i;
-  int       nxings;
+  register int       i;
+  register int       nxings;
   EdgeXing *xings;
   EdgeXing *from;
   EdgeXing *to;
@@ -835,7 +835,7 @@
      EdgeXing *from;
      EdgeXing *to;
 {
-  int    s0, s1, s_new;
+  register int    s0, s1, s_new;
   double x_0, x_1, x_new;
   double y_0, y_1, y_new;
 
@@ -914,10 +914,10 @@
      double x_0, y_0;
      double x_1, y_1;
 {
-  int    i;
-  int    lo_y, hi_y;
-  double x_value;
-  double x_delta;
+  register int    i;
+  register int    lo_y, hi_y;
+  register double x_value;
+  register double x_delta;
 
   if (y_0 < y_1)
   {
diff -u --recursive --new-file xearth-1.0/xearth.c xearth-1.0.atari.rel4/xearth.c
--- xearth-1.0/xearth.c	Sun Sep 24 02:53:42 1995
+++ xearth-1.0.atari.rel4/xearth.c	Tue Oct 13 19:28:07 1998
@@ -47,14 +47,21 @@
 
 #include "xearth.h"
 #include "kljcpyrt.h"
+
+#ifdef LATTICE
+#include <mintbind.h>
+#endif
+
 extern int errno;
 
 #ifndef NO_SETPRIORITY
 /* apparently some systems (possibly mt.xinu 4.3bsd?) may need 
  * <sys/time.h> to be included here before <sys/resource.h>.
  */
+#ifndef ATARI
 #include <sys/resource.h>	/* for setpriority() */
 #endif
+#endif
 
 #define ModeX    (0)		/* possible output_mode values */
 #define ModePPM  (1)
@@ -109,7 +116,7 @@
 char    *markerfile;		/* for user-spec. marker info  */
 int      wait_time;             /* wait time between redraw    */
 double   time_warp;		/* passage of time multiplier  */
-int      fixed_time;		/* fixed viewing time (ssue)   */
+long     fixed_time;		/* fixed viewing time (ssue)   */
 int      day;                   /* day side brightness (%)     */
 int      night;                 /* night side brightness (%)   */
 int      terminator;		/* terminator discontinuity, % */
@@ -119,6 +126,10 @@
 int      do_fork;		/* fork child process?         */
 int      priority;		/* desired process priority    */
 
+#ifdef ATARI
+short use_stdout=0;	/* not output gif to stdout */
+#endif
+
 time_t start_time = 0;
 time_t current_time;
 char   errmsgbuf[1024];		/* for formatting warning/error msgs */
@@ -130,6 +141,7 @@
 {
   set_defaults();
 
+#ifndef ATARI
   if (using_x(argc, argv))
     command_line_x(argc, argv);
   else
@@ -137,8 +149,14 @@
 
   if (priority != 0)
     set_priority(priority);
-
   srandom(((int) time(NULL)) + ((int) getpid()));
+#else
+  #ifdef LATTICE
+  Pdomain(1);
+  #endif
+  command_line(argc,argv);
+  /* srandom( (int) time(NULL) ); */
+#endif
 
   output();
 
@@ -184,11 +202,13 @@
 void set_priority(new)
      int new;
 {
+#ifndef ATARI
   if ((setpriority(PRIO_PROCESS, getpid(), new) == -1))
   {
     perror("setpriority");
     exit(-1);
   }
+#endif
 }
 
 #endif /* NO_SETPRIORITY */
@@ -206,11 +226,12 @@
     gif_output();
     break;
 
+#ifndef ATARI		/* no forking here */
   case ModeX:
     if ((!do_fork) || (fork() == 0))
       x11_output();
     break;
-
+#endif
   case ModeTest:
     test_mode();
     break;
@@ -431,7 +452,11 @@
  */
 void set_defaults()
 {
+#ifndef ATARI
   output_mode      = ModeX;
+#else
+  output_mode      = ModeGIF;
+#endif
   proj_type        = ProjTypeOrthographic;
   view_pos_type    = ViewPosTypeSun;
   sun_rel_lat      = 0;
@@ -668,7 +693,7 @@
     {
       i += 1;
       if (i >= argc) usage("missing arg to -time");
-      sscanf(argv[i], "%d", &fixed_time);
+      sscanf(argv[i], "%ld", &fixed_time);
     }
     else if (strcmp(argv[i], "-onepix") == 0)
     {
@@ -704,7 +729,12 @@
     }
     else if (strcmp(argv[i], "-fork") == 0)
     {
+#ifdef ATARI
+      warning("-fork not supported");
+      do_fork= 0;
+#else
       do_fork = 1;
+#endif
     }
     else if (strcmp(argv[i], "-nofork") == 0)
     {
@@ -734,6 +764,9 @@
     }
     else if (strcmp(argv[i], "-gif") == 0)
     {
+#ifdef ATARI
+		use_stdout=1;	/* Use stdout, not world.gif */
+#endif
       output_mode = ModeGIF;
     }
     else if (strcmp(argv[i], "-test") == 0)
@@ -1073,7 +1106,8 @@
 
 void xearth_bzero(buf, len)
      char    *buf;
-     unsigned len;
+     unsigned long len;
+#ifndef ATARI
 {
   int *tmp;
 
@@ -1142,12 +1176,16 @@
     }
   }
 }
-
+#else
+{
+	memset(buf,0,(long)len);
+}
+#endif
 
 void version_info()
 {
   fflush(stdout);
-  fprintf(stderr, "\nThis is xearth version %s.\n\n", VersionString);
+  fprintf(stderr, "\nThis is xearth version %s.\nAtari version compiled by T.Andersen, "__DATE__"\n\n", VersionString);
   exit(0);
 }
 
@@ -1162,15 +1200,11 @@
   fprintf(stderr, "usage: %s\n", progname);
   fprintf(stderr, " [-proj proj_type] [-pos pos_spec] [-rot angle]\n");
   fprintf(stderr, " [-sunpos sun_pos_spec] [-mag factor] [-size size_spec]\n");
-  fprintf(stderr, " [-shift shift_spec] [-shade|-noshade] [-label|-nolabel]\n");
-  fprintf(stderr, " [-labelpos geom] [-markers|-nomarkers] [-markerfile file]\n");
-  fprintf(stderr, " [-showmarkers] [-stars|-nostars] [-starfreq frequency]\n");
+  fprintf(stderr, " [-shift shift_spec] [-shade|-noshade]\n");
+  fprintf(stderr, " [-stars|-nostars] [-starfreq frequency]\n");
   fprintf(stderr, " [-bigstars percent] [-grid|-nogrid] [-grid1 grid1] [-grid2 grid2]\n");
-  fprintf(stderr, " [-day pct] [-night pct] [-term pct] [-gamma gamma_value]\n");
-  fprintf(stderr, " [-wait secs] [-timewarp factor] [-time fixed_time]\n");
-  fprintf(stderr, " [-onepix|-twopix] [-mono|-nomono] [-ncolors num_colors]\n");
-  fprintf(stderr, " [-font font_name] [-fork|-nofork] [-once|-noonce]\n");
-  fprintf(stderr, " [-nice priority] [-gif] [-ppm] [-display dpyname] [-version]\n");
+  fprintf(stderr, " [-day pct] [-night pct] [-term pct] [-time fixed_time]\n");
+  fprintf(stderr, " [-ncolors num_colors] [-gif] [-ppm] [-version]\n");
   fprintf(stderr, "\n");
   exit(1);
 }
diff -u --recursive --new-file xearth-1.0/xearth.h xearth-1.0.atari.rel4/xearth.h
--- xearth-1.0/xearth.h	Fri Sep 29 19:12:36 1995
+++ xearth-1.0.atari.rel4/xearth.h	Tue Oct 13 19:28:08 1998
@@ -1,9 +1,8 @@
 /*
- * xearth.h
  * kirk johnson
  * july 1993
  *
- * RCS $Id: xearth.h,v 1.28 1995/09/29 18:12:30 tuna Exp $
+ * 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
  *
@@ -48,9 +47,10 @@
 #ifndef _XEARTH_H_
 #define _XEARTH_H_
 
-#include <X11/Xos.h>
+/* #include <X11/Xos.h> */
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <math.h>
 #include <assert.h>
 #include <time.h>
@@ -59,9 +59,18 @@
 #include "kljcpyrt.h"
 
 #define VersionString "1.0"
+#ifdef LATTICE
+#define NO_RANDOM
+#else
+#undef NO_RANDOM
+#endif
+
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+
 
-/* if NO_RANDOM is defined, use lrand48() and srand48() 
- * instead of random() and srandom()
+/* if NO_RANDOM is defined, use lrand48() and srand48() * instead of 
+ random() and srandom()
  */
 #ifdef NO_RANDOM
 #define random()   lrand48()
@@ -78,7 +87,7 @@
 
 /* rotational period of the earth (seconds)
  */
-#define EarthPeriod (86400)
+#define EarthPeriod (86400L)
 
 /* types of pixels
  */
@@ -146,10 +155,10 @@
 /* mercator projection (xyz->xy)
  */
 #define MERCATOR_X(x, z)  (atan2((x), (z)))
-#define MERCATOR_Y(y)     (((y) >= 1) ? (BigNumber)      \
-			   : (((y) <= -1) ? (-BigNumber) \
-			      : log(tan((asin(y)/2) + (M_PI/4)))))
-#define INV_MERCATOR_Y(y) (sin(2 * (atan(exp(y)) - (M_PI/4))))
+#define MERCATOR_Y(y)     (((y) >= 1.0) ? (BigNumber)      \
+			   : (((y) <= -1.0) ? (-BigNumber) \
+			      : log(tan((asin(y)/2.0) + (M_PI/4.0)))))
+#define INV_MERCATOR_Y(y) (sin(2.0 * (atan(exp(y)) - (M_PI/4.0))))
 
 /* xy->screen projections
  */
@@ -162,9 +171,9 @@
 /* on alpha systems, trade off space for more efficient access
  */
 typedef int      s8or32;
-typedef unsigned u8or32;
+typedef unsigned int u8or32;
 typedef int      s16or32;
-typedef unsigned u16or32;
+typedef unsigned int u16or32;
 #else
 /* other systems can access 8- and 16-bit items efficiently
  */
@@ -193,7 +202,7 @@
 {
   short  x;
   short  y;
-  u_char type;
+  unsigned char type;
 } ScanDot;
 
 typedef struct
@@ -206,19 +215,23 @@
 
 /* dither.c */
 extern int     dither_ncolors;
-extern u_char *dither_colormap;
+extern unsigned char *dither_colormap;
 extern void    dither_setup _P((int));
-extern void    dither_row _P((u_char *, u16or32 *));
+extern void    dither_row _P((unsigned char *, u16or32 *));
 extern void    dither_cleanup _P((void));
 extern void    mono_dither_setup _P((void));
-extern void    mono_dither_row _P((u_char *, u16or32 *));
+extern void    mono_dither_row _P((unsigned char *, u16or32 *));
 extern void    mono_dither_cleanup _P((void));
 
 /* gif.c */
 extern void gif_output _P((void));
 
 /* mapdata.c */
+#ifdef LATTICE
+extern far short map_data[]; /* lattice atari */
+#else
 extern short map_data[];
+#endif
 
 /* markers.c */
 extern MarkerInfo *marker_info;
@@ -229,7 +242,7 @@
 extern void ppm_output _P((void));
 
 /* render.c */
-extern void render _P((void (*)(u_char *)));
+extern void render _P((void (*)(unsigned char *)));
 extern void do_dots _P((void));
 
 /* resources.c */
@@ -252,8 +265,9 @@
 extern void sun_position _P((time_t, double *, double *));
 
 /* x11.c */
-extern void command_line_x _P((int, char *[]));
+/* extern void command_line_x _P((int, char *[]));
 extern void x11_output _P((void));
+*/
 
 /* xearth.c */
 extern char  *progname;
@@ -280,7 +294,7 @@
 extern char  *markerfile;
 extern int    wait_time;
 extern double time_warp;
-extern int    fixed_time;
+extern long   fixed_time;
 extern int    day;
 extern int    night;
 extern int    terminator;
@@ -298,7 +312,7 @@
 extern void   decode_sun_pos _P((char *));
 extern void   decode_size _P((char *));
 extern void   decode_shift _P((char *));
-extern void   xearth_bzero _P((char *, unsigned));
+extern void   xearth_bzero _P((char *, unsigned long));
 extern void   version_info _P((void)) _noreturn;
 extern void   usage _P((const char *)) _noreturn;
 extern void   warning _P((const char *));
@@ -332,3 +346,5 @@
 #endif
 
 #endif
+
+#undef NO_SETPRIORITY
\ No newline at end of file
