v12i001: Starchart 3.2 update to 3.2.1 part 1/4

ccount at ATHENA.MIT.EDU ccount at ATHENA.MIT.EDU
Sat Apr 14 08:59:51 AEST 1990


Posting-number: Volume 12, Issue 1
Submitted-by: ccount at ATHENA.MIT.EDU
Archive-name: starchart2/part01

This patch updates the release 3.2 to version 3.2.1.  Many small
modifications, and a new IBMPC driver supporting different displays is
included. minor bugs have been fixed.  The changes were small but
widespread, producing this large patch distribution.

Separate patch files are provided in this and the following shar files
for each subdirectory of the 3.2 distribution, the 'starchart'
directory patch is split into four parts which should be reassembled
after unsharing.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 4)."
# Contents:  README.3.2.1 data.pch dataconv.pch doc.pch observe.pch
#   stch_pch.ad
# Wrapped by ccount at E40-008-8 on Thu Apr  5 01:17:37 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README.3.2.1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README.3.2.1'\"
else
echo shar: Extracting \"'README.3.2.1'\" \(1328 characters\)
sed "s/^X//" >'README.3.2.1' <<'END_OF_FILE'
XThis patch updates the release 3.2 to version 3.2.1.  Many small
Xmodifications, and a new IBMPC driver supporting different displays is
Xincluded. minor bugs have been fixed.  Note clarification of the
Xcopyright statement.
X
XA #pragma was added to starsupp.c, to support the Macintosh.
XOlder compilers may not understand this, and you may need to remove it.
X
XHere are brief notes on the changes made:
X1) minor fix for Atari problems
X2) Define NO_BUF_READSTAR to eliminate use of buf_readstar()
X3) Fix comet position angle, position angle of bright limb (change in
X		observe also)
X4) fix 16bit int problem in xform
X5) add checks on malloc returns
X6) improve grids behaviour
X7) add C star color class.
X8) fix typos in boundaries.star and cnames.star
X9) fix constellation name typo in dataconv/sif_to_text.c
X10) Add -f error messge to observe
X11) improve format of .eph file in observe
X12) Add optional STARRC environment variable.
X13) Adjust tick positioning in starpost
X14) Fix typo with fine_mags in starpost
X15) define user dict in starpost
X16) Allow multiple -f files in observe
X17) Fix problem with magnitude -9.96 to -10 objects in observe:outsif.c
X18) Add another method for observe timezone 
X19) Fix problem with table interpolation in observe
X
XThanks to all those who reported and expecially those who also fixed
Xproblems.
END_OF_FILE
if test 1328 -ne `wc -c <'README.3.2.1'`; then
    echo shar: \"'README.3.2.1'\" unpacked with wrong size!
fi
# end of 'README.3.2.1'
fi
if test -f 'data.pch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'data.pch'\"
else
echo shar: Extracting \"'data.pch'\" \(3137 characters\)
sed "s/^X//" >'data.pch' <<'END_OF_FILE'
Xdiff -r -c ../../starchart3.2/data/boundaries.star ./boundaries.star
X*** ../../starchart3.2/data/boundaries.star	Wed Apr  4 18:27:34 1990
X--- ./boundaries.star	Wed Apr  4 18:30:31 1990
X***************
X*** 138,143 ****
X--- 138,145 ----
X  151230-5530000Vs
X  180900-4530000VM
X  175900-4530000Vs
X+ 175830-3705000VM
X+ 175900-4530000Vs
X  163400-4545000Vs
X  085300-5500000VM
X  083000-5500000Vs
X***************
X*** 872,874 ****
X--- 874,877 ----
X  024230+3720000Vs
X  024230+3435000Vs
X  025030+3435000Vs
X+ 000000+0000999#        Version 3.2.1
Xdiff -r -c ../../starchart3.2/data/cnames.star ./cnames.star
X*** ../../starchart3.2/data/cnames.star	Wed Apr  4 18:27:34 1990
X--- ./cnames.star	Wed Apr  4 18:30:32 1990
X***************
X*** 1,11 ****
X  120000-8200000I         CHAMAELEON
X  130000-7400000I         MUSCA
X! 163000-6900000I         TRIANGULUM AUSTALE
X  170000-8100000I         APUS
X  210000-7300000I         PAVO
X  100000-8500000I         OCTANS
X  190000-5500000I         TELESCOPIUM
X! 213000-5800000I         INNDUS
X  003000-6800000I         TUCANA
X  020000-8000000I         HYDRUS
X  053000-8000000I         MENSA
X--- 1,11 ----
X  120000-8200000I         CHAMAELEON
X  130000-7400000I         MUSCA
X! 163000-6900000I         TRIANGULUM AUSTRALE
X  170000-8100000I         APUS
X  210000-7300000I         PAVO
X  100000-8500000I         OCTANS
X  190000-5500000I         TELESCOPIUM
X! 213000-5800000I         INDUS
X  003000-6800000I         TUCANA
X  020000-8000000I         HYDRUS
X  053000-8000000I         MENSA
X***************
X*** 15,27 ****
X  161000-5900000I         NORMA
X  173000-6500000I         ARA
X  103000-7400000I         CARINA
X! 105000-5200000I         VELLA
X  125800-6300000I         CRUX
X  060000-5400000I         PICTOR
X  030000-6000000I         HOROLOGIUM
X  040000-6600000I         RETICULUM
X  052000-6400000I         DORADO
X! 200000-4430000I         SAGITARIUS
X  010000-5600000I         PHOENIX
X  230000-5400000I         GRUS
X  175800-4430000I         SCORPIUS
X--- 15,27 ----
X  161000-5900000I         NORMA
X  173000-6500000I         ARA
X  103000-7400000I         CARINA
X! 105000-5200000I         VELA
X  125800-6300000I         CRUX
X  060000-5400000I         PICTOR
X  030000-6000000I         HOROLOGIUM
X  040000-6600000I         RETICULUM
X  052000-6400000I         DORADO
X! 200000-4430000I         SAGITTARIUS
X  010000-5600000I         PHOENIX
X  230000-5400000I         GRUS
X  175800-4430000I         SCORPIUS
X***************
X*** 51,57 ****
X  212000+0300000I         EQUULEUS
X  205000+0300000I         DELPHINUS
X  194500+2000000I         VULPECULA
X! 021500-5600000I         ERADINUS
X  171000-2330000I         OPHIUCHUS
X  185000-1510000I         SCUTUM
X  194000+1700000I         SAGITTA
X--- 51,57 ----
X  212000+0300000I         EQUULEUS
X  205000+0300000I         DELPHINUS
X  194500+2000000I         VULPECULA
X! 021500-5600000I         ERIDANUS
X  171000-2330000I         OPHIUCHUS
X  185000-1510000I         SCUTUM
X  194000+1700000I         SAGITTA
X***************
X*** 87,89 ****
X--- 87,90 ----
X  041000+0130000I         TAURUS
X  033000+3130000I         PERSEUS
X  060000+2900000I         AURIGA
X+ 000000+0000999#        Version 3.2.1
END_OF_FILE
if test 3137 -ne `wc -c <'data.pch'`; then
    echo shar: \"'data.pch'\" unpacked with wrong size!
fi
# end of 'data.pch'
fi
if test -f 'dataconv.pch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dataconv.pch'\"
else
echo shar: Extracting \"'dataconv.pch'\" \(1646 characters\)
sed "s/^X//" >'dataconv.pch' <<'END_OF_FILE'
Xdiff -r -c ../../starchart3.2/dataconv/sif_to_text.c ./sif_to_text.c
X*** ../../starchart3.2/dataconv/sif_to_text.c	Wed Apr  4 18:27:41 1990
X--- ./sif_to_text.c	Wed Apr  4 18:30:38 1990
X***************
X*** 25,31 ****
X   *
X   */
X  
X! static char rcsid[]="$Header: sif_to_text.c,v 2.6 90/02/19 16:59:29 ccount Exp $";
X  
X  
X  
X--- 25,31 ----
X   *
X   */
X  
X! static char rcsid[]="$Header: sif_to_text.c,v 2.7 90/04/02 20:05:42 ccount Exp $";
X  
X  
X  
X***************
X*** 319,325 ****
X    {"PER",	"Perseus",	"Persei"},
X    {"PHE",	"Phoenix",	"Phoenicis"},
X    {"PIC",	"Pictor",	"Pictoris"},
X!   {"PSA",	"Piscis Astrinus",	"Piscis Austrini"},
X    {"PSC",	"Pisces",	"Piscium"},
X    {"PUP",	"Puppis",	"Puppis"},
X    {"PYX",	"Pyxis",	"Pyxidis"},
X--- 319,325 ----
X    {"PER",	"Perseus",	"Persei"},
X    {"PHE",	"Phoenix",	"Phoenicis"},
X    {"PIC",	"Pictor",	"Pictoris"},
X!   {"PSA",	"Piscis Austrinus",	"Piscis Austrini"},
X    {"PSC",	"Pisces",	"Piscium"},
X    {"PUP",	"Puppis",	"Puppis"},
X    {"PYX",	"Pyxis",	"Pyxidis"},
X***************
X*** 333,339 ****
X    {"SGR",	"Sagittarius",	"Sagittarii"},
X    {"TAU",	"Taurus",	"Tauri"},
X    {"TEL",	"Telescopium",	"Telescopii"},
X!   {"TRA",	"Triangulum Astrale",	"Trianguli Astralis"},
X    {"TRI",	"Triangulum",	"Trianguli"},
X    {"TUC",	"Tucana",	"Tucanae"},
X    {"UMA",	"Ursa Major",	"Ursae Majoris"},
X--- 333,339 ----
X    {"SGR",	"Sagittarius",	"Sagittarii"},
X    {"TAU",	"Taurus",	"Tauri"},
X    {"TEL",	"Telescopium",	"Telescopii"},
X!   {"TRA",	"Triangulum Australe",	"Trianguli Australis"},
X    {"TRI",	"Triangulum",	"Trianguli"},
X    {"TUC",	"Tucana",	"Tucanae"},
X    {"UMA",	"Ursa Major",	"Ursae Majoris"},
END_OF_FILE
if test 1646 -ne `wc -c <'dataconv.pch'`; then
    echo shar: \"'dataconv.pch'\" unpacked with wrong size!
fi
# end of 'dataconv.pch'
fi
if test -f 'doc.pch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'doc.pch'\"
else
echo shar: Extracting \"'doc.pch'\" \(3650 characters\)
sed "s/^X//" >'doc.pch' <<'END_OF_FILE'
Xdiff -r -c ../../starchart3.2/doc/astro.ms ./astro.ms
X*** ../../starchart3.2/doc/astro.ms	Wed Apr  4 18:27:48 1990
X--- ./astro.ms	Wed Apr  4 18:30:45 1990
X***************
X*** 1760,1766 ****
X  .PP
X  Tom Horsley contributed the ibm PC driver.
X  .PP
X! Mike Daly helped with the Macintosh version.
X  .PP
X  Joe Wang helped with the X11 version.
X  .PP
X--- 1760,1768 ----
X  .PP
X  Tom Horsley contributed the ibm PC driver.
X  .PP
X! Doug McDonald contributed the ibm PC VGA/SVGA driver.
X! .PP
X! Mike Daly and Gavin Eadie helped with the Macintosh version.
X  .PP
X  Joe Wang helped with the X11 version.
X  .PP
Xdiff -r -c ../../starchart3.2/doc/astro.texinfo ./astro.texinfo
X*** ../../starchart3.2/doc/astro.texinfo	Wed Apr  4 18:27:49 1990
X--- ./astro.texinfo	Wed Apr  4 18:30:45 1990
X***************
X*** 2198,2204 ****
X  
X  Tom Horsley contributed the ibm PC driver.
X  
X! Mike Daly helped with the Macintosh version.
X  
X  Joe Wang helped with the X11 version.
X  
X--- 2198,2206 ----
X  
X  Tom Horsley contributed the ibm PC driver.
X  
X! Doug McDonald contributed the ibm PC VGA/SVGA driver.
X! 
X! Mike Daly and Gavin Eadie helped with the Macintosh version.
X  
X  Joe Wang helped with the X11 version.
X  
Xdiff -r -c ../../starchart3.2/doc/starchart.1 ./starchart.1
X*** ../../starchart3.2/doc/starchart.1	Wed Apr  4 18:27:52 1990
X--- ./starchart.1	Wed Apr  4 18:30:49 1990
X***************
X*** 262,268 ****
X  
X  Detailed control of the chart is provided through files containing
X  variable names and values.  A ``.starrc'' file may be used to set
X! personal preferences.  Additionally, the
X  .B \-e
X  argument allows additional files to be read.  These files set
X  parameters which may be overridden by later command line arguments.
X--- 262,271 ----
X  
X  Detailed control of the chart is provided through files containing
X  variable names and values.  A ``.starrc'' file may be used to set
X! personal preferences.  The name of this file was set at compile time,
X! and is usually ``.starrc''.  It is also possible to use the
X! environment variable STARRC to specify this file on some systems.
X! Additionally, the
X  .B \-e
X  argument allows additional files to be read.  These files set
X  parameters which may be overridden by later command line arguments.
X***************
X*** 401,407 ****
X  .br
X  Tom Horsley
X  .br
X! Dave Van't Hof
X  .br
X  Dave Van't Hof
X  .br
X--- 404,410 ----
X  .br
X  Tom Horsley
X  .br
X! Doug McDonald
X  .br
X  Dave Van't Hof
X  .br
X***************
X*** 419,428 ****
X  .br
X  and
X  .br
X! Dean Payne <deanp at hplsla.hp.com>
X  .br
X! David Smith <smith at hpldrs.hp.com>
X  .br
X! Tim Pointing <tim at zorac.dciem.dnd.ca>
X  .br
X  and others
X--- 422,431 ----
X  .br
X  and
X  .br
X! Dean Payne
X  .br
X! David Smith
X  .br
X! Tim Pointing
X  .br
X  and others
Xdiff -r -c ../../starchart3.2/doc/staribmv.1 ./staribmv.1
X*** ../../starchart3.2/doc/staribmv.1	Wed Apr  4 18:27:53 1990
X--- ./staribmv.1	Wed Apr  4 18:30:49 1990
X***************
X*** 0 ****
X--- 1,30 ----
X+ .TH STARCHART LOCAL "15 July 1989"
X+ .ad b
X+ .SH NAME
X+ staribmv \- display astronomical star charts on IBM PC vga or svga display.
X+ .SH SYNOPSIS
X+ Arguments as in other starchart programs, with the special argument -a:
X+ .br
X+ .B \-a
X+ \fBX
X+ |
X+ .B \-a
X+ \fBD\fIn\fR
X+ .br
X+ .SH DESCRIPTION
X+ See starchart(1) for details on the starchart programs in general.
X+ .PP
X+ With the
X+ .B \-a
X+ \fBX
X+ option, the names of any non-stellar objects are plotted independent
X+ of the normal namelimit.  The
X+ .B \-a
X+ \fBD\fIn\fR
X+ option, where n is a number from -5 to 5, changes the size of the
X+ plotted stars.
X+ .SH BUGS
X+ .SH AUTHORS/EDITORS
X+ Doug McDonald <mcdonald at aries.scs.uiuc.edu>
X+ .br
X+ Craig Counterman
END_OF_FILE
if test 3650 -ne `wc -c <'doc.pch'`; then
    echo shar: \"'doc.pch'\" unpacked with wrong size!
fi
# end of 'doc.pch'
fi
if test -f 'observe.pch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'observe.pch'\"
else
echo shar: Extracting \"'observe.pch'\" \(15758 characters\)
sed "s/^X//" >'observe.pch' <<'END_OF_FILE'
Xdiff -r -c ../../starchart3.2/observe/main.c ./main.c
X*** ../../starchart3.2/observe/main.c	Wed Apr  4 18:28:00 1990
X--- ./main.c	Wed Apr  4 18:30:56 1990
X***************
X*** 28,34 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: main.c,v 1.13 90/02/23 18:44:16 ccount Exp $";
X  #endif
X  
X  
X--- 28,34 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: main.c,v 1.14 90/04/02 20:54:32 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 96,105 ****
X  
X  int file_input = FALSE;
X  fformat_t tr_format();
X- char *infile_name = "";
X- FILE *infile;
X- fformat_t in_type;
X  
X  
X  
X  /* objects */
X--- 96,109 ----
X  
X  int file_input = FALSE;
X  fformat_t tr_format();
X  
X+ #define MAXFILES 10
X+ struct inf {
X+   char *infile_name;
X+   FILE *infile;
X+   fformat_t in_type;
X+ } infiles[MAXFILES];
X+ int num_files = 0;
X  
X  
X  /* objects */
X***************
X*** 198,236 ****
X  
X    jd_to_str(start_date, datestr);
X  
X!   if (file_input) {
X!     if ((infile = fopen(infile_name, "r")) == NULL) {
X!       fprintf(stderr, "%s: could not open file %s for reading\n",
X! 	      progname, infile_name);
X!       exit(1);
X!     };
X  
X!     /* input data from infile */
X!     switch (in_type) {
X!     case emp:
X!     case empb:
X!     case aa:
X!     case st:
X!     case iau:
X!       read_table(infile, in_type);
X!       nbodies = 1;
X!       bodies[0].name = obj_name;
X!       bodies[0].orbit_type = tabulated;
X!       break;
X!     case ell_e:
X!       read_elliptical(infile, bodies, &nbodies, MAXOBJECTS);
X!       break;
X!     case par_e:
X!       read_parabolic(infile, bodies, &nbodies, MAXOBJECTS);
X!       break;
X!     case obj:
X!       read_objects(infile, objects, &nobjects, MAXOBJECTS);
X!       break;
X!     default:
X!       break;
X      };
X!   };
X! 
X    /* open output files */
X    strncpy(filename, outfile_root, MAXPATHLEN-5);
X  #ifndef ATARI_ST
X--- 202,243 ----
X  
X    jd_to_str(start_date, datestr);
X  
X!   nbodies = 0;
X!   nobjects = 0;
X!   for (i = 0; i < num_files; i++) {
X!     if (file_input) {
X!       if ((infiles[i].infile = fopen(infiles[i].infile_name, "r")) == NULL) {
X! 	fprintf(stderr, "%s: could not open file %s for reading\n",
X! 		progname, infiles[i].infile_name);
X! 	exit(1);
X!       };
X  
X!       /* input data from infile */
X!       switch (infiles[i].in_type) {
X!       case emp:
X!       case empb:
X!       case aa:
X!       case st:
X!       case iau:
X! 	read_table(infiles[i].infile, infiles[i].in_type);
X! 	nbodies++;
X! 	bodies[0].name = obj_name;
X! 	bodies[0].orbit_type = tabulated;
X! 	break;
X!       case ell_e:
X! 	read_elliptical(infiles[i].infile, bodies, &nbodies, MAXOBJECTS);
X! 	break;
X!       case par_e:
X! 	read_parabolic(infiles[i].infile, bodies, &nbodies, MAXOBJECTS);
X! 	break;
X!       case obj:
X! 	read_objects(infiles[i].infile, objects, &nobjects, MAXOBJECTS);
X! 	break;
X!       default:
X! 	break;
X!       };
X      };
X!   }
X    /* open output files */
X    strncpy(filename, outfile_root, MAXPATHLEN-5);
X  #ifndef ATARI_ST
X***************
X*** 588,593 ****
X--- 595,614 ----
X    return (-tzp.tz_minuteswest/60.0 + tzp.tz_dsttime);
X  }
X  */
X+ /* Method 4, on systems (such as VMS) with no knowledge about timezones
X+  * use an environment variable named "TIMEZONE". This should be set to
X+  * seconds after GMT, like the SYSV definition.
X+  */
X+ /*
X+ double now_zone()
X+ {
X+     long timezone;
X+     char *chzone;
X+     chzone = getenv("TIMEZONE");
X+     timezone = atol(chzone);
X+     return(-timezone/3600.0);
X+ }
X+ */
X  /* For ATARI_ST */
X  /*double now_zone()
X  {
X***************
X*** 820,835 ****
X  	break;
X        case 'f':
X  				/* file format */
X! 	if (((i+2) < argc) && (notarg(argv[i+1])) && (notarg(argv[i+2]))) {
X! 	  infile_name = argv[i+1];
X! 	  in_type = tr_format(argv[i+2]);
X! 	  if (in_type == no_format) {
X  	    fprintf(stderr, "%s: format %s not recognized.\n", progname, 
X  		    argv[i+2]);
X  	    exit(1);
X  	  };
X  	  i += 2;
X  	  file_input = TRUE;
X  	};
X  	break;
X        case 'h':
X--- 841,862 ----
X  	break;
X        case 'f':
X  				/* file format */
X! 	if ((((i+2) < argc) && (notarg(argv[i+1])) && (notarg(argv[i+2])))
X! 	    && (num_files < MAXFILES)) {
X! 	  infiles[num_files].infile_name = argv[i+1];
X! 	  infiles[num_files].in_type = tr_format(argv[i+2]);
X! 	  if (infiles[num_files].in_type == no_format) {
X  	    fprintf(stderr, "%s: format %s not recognized.\n", progname, 
X  		    argv[i+2]);
X  	    exit(1);
X  	  };
X+ 	  num_files++;
X  	  i += 2;
X  	  file_input = TRUE;
X+ 	} else {
X+ 	  fprintf(stderr, "%s: -f needs filename and file type (format).\n",
X+ 		  progname);
X+ 	  usage();
X  	};
X  	break;
X        case 'h':
Xdiff -r -c ../../starchart3.2/observe/objcalc.c ./objcalc.c
X*** ../../starchart3.2/observe/objcalc.c	Wed Apr  4 18:28:02 1990
X--- ./objcalc.c	Wed Apr  4 18:30:58 1990
X***************
X*** 16,22 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: objcalc.c,v 1.9 90/03/06 00:08:40 ccount Exp $";
X  #endif
X  
X  
X--- 16,22 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: objcalc.c,v 1.10 90/04/02 20:55:15 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 52,58 ****
X    double alpha, delta, alpha2000, delta2000;
X    char typestr[10];
X  
X!   j = 0;
X    while (!feof(infile)) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL) {
X--- 52,58 ----
X    double alpha, delta, alpha2000, delta2000;
X    char typestr[10];
X  
X!   j = *nobjects_p;
X    while (!feof(infile)) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL) {
Xdiff -r -c ../../starchart3.2/observe/observe.h ./observe.h
X*** ../../starchart3.2/observe/observe.h	Wed Apr  4 18:28:03 1990
X--- ./observe.h	Wed Apr  4 18:30:59 1990
X***************
X*** 14,20 ****
X   *
X   */
X  /*
X!  * $Header: observe.h,v 1.7 90/02/19 17:22:04 ccount Exp $
X   */
X  
X  
X--- 14,20 ----
X   *
X   */
X  /*
X!  * $Header: observe.h,v 1.8 90/04/02 20:55:45 ccount Exp $
X   */
X  
X  
X***************
X*** 109,114 ****
X--- 109,116 ----
X    double alpha2000, delta2000;	/* position in equinox 2000.0 */
X    double beta;			/* Phase angle */
X    double psi;			/* Elongation */
X+   double chi;			/* position angle of bright limb,
X+ 				   opposite to comet's tail */
X    double r, Delta;		/* Distance to sun, and earth */
X    double mag;			/* magnitude */
X    orbtype_t orbit_type;		/* Orbit type */
Xdiff -r -c ../../starchart3.2/observe/orbcalc.c ./orbcalc.c
X*** ../../starchart3.2/observe/orbcalc.c	Wed Apr  4 18:28:04 1990
X--- ./orbcalc.c	Wed Apr  4 18:31:00 1990
X***************
X*** 16,22 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: orbcalc.c,v 1.8 90/02/19 17:20:47 ccount Exp $";
X  #endif
X  
X  
X--- 16,22 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: orbcalc.c,v 1.9 90/04/02 20:56:19 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 67,73 ****
X    fgets(in_line, 1000, infile);
X  
X    
X!   j = 0;
X    while ((j < maxbodies) && (!feof(infile))) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL)
X--- 67,73 ----
X    fgets(in_line, 1000, infile);
X  
X    
X!   j = *nbodies_p;
X    while ((j < maxbodies) && (!feof(infile))) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL)
X***************
X*** 204,209 ****
X--- 204,216 ----
X    data->psi = acos((R*R + Delta*Delta - r*r)/ (2*R*Delta))*RAD_TO_DEG;
X    data->beta = acos((r*r + Delta*Delta - R*R)/ (2*r*Delta))*RAD_TO_DEG;
X  
X+   data->chi = /* position angle of bright limb */
X+     DATAN2(DCOS(sun_data.delta2000) * DSIN(sun_data.alpha2000 - alpha2000),
X+ 	   DCOS(data->delta2000) * DSIN(sun_data.delta2000)
X+ 	   - DSIN(data->delta2000) * DCOS(sun_data.delta2000)
X+ 	     * DCOS(sun_data.alpha2000 - data->alpha2000));
X+   if (data->chi < 0.0) data->chi += 360.0;
X+ 
X    if (data->body_type == asteroid) {
X      G = data->G;
X      H = data->H;
X***************
X*** 254,260 ****
X    fgets(in_line, 1000, infile);
X  
X    
X!   j = 0;
X    while ((j < maxbodies) && (!feof(infile))) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL)
X--- 261,267 ----
X    fgets(in_line, 1000, infile);
X  
X    
X!   j = *nbodies_p;
X    while ((j < maxbodies) && (!feof(infile))) {
X      linep = fgets(in_line, 1000, infile);
X      if (linep != NULL)
X***************
X*** 380,385 ****
X--- 387,399 ----
X  
X    data->psi = acos((R*R + Delta*Delta - r*r)/ (2*R*Delta))*RAD_TO_DEG;
X    data->beta = acos((r*r + Delta*Delta - R*R)/ (2*r*Delta))*RAD_TO_DEG;
X+ 
X+   data->chi = /* position angle of bright limb */
X+     DATAN2(DCOS(sun_data.delta2000) * DSIN(sun_data.alpha2000 - alpha2000),
X+ 	   DCOS(data->delta2000) * DSIN(sun_data.delta2000)
X+ 	   - DSIN(data->delta2000) * DCOS(sun_data.delta2000)
X+ 	     * DCOS(sun_data.alpha2000 - data->alpha2000));
X+   if (data->chi < 0.0) data->chi += 360.0;
X  
X    if (data->body_type == asteroid) {
X      G = data->G;
Xdiff -r -c ../../starchart3.2/observe/outeph.c ./outeph.c
X*** ../../starchart3.2/observe/outeph.c	Wed Apr  4 18:28:05 1990
X--- ./outeph.c	Wed Apr  4 18:31:01 1990
X***************
X*** 16,22 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: outeph.c,v 1.11 90/03/06 00:09:35 ccount Exp $";
X  #endif
X  
X  
X--- 16,22 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: outeph.c,v 1.12 90/04/02 20:57:30 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 68,74 ****
X  
X  
X    fprintf(o_eph,
X! "name   RA2000.0  Dec2000.0  RA epoch  Dec epoch  rise  trans set   mag    size   elong. phase Delta r\n");
X  
X    raformat(sun_data.alpha2000/15.0, rastr1);
X    raformat(sun_data.alpha/15.0, rastr2);
X--- 68,74 ----
X  
X  
X    fprintf(o_eph,
X! " Name   RA/2000    Dec/2000  RA/epoch   Dec/epoch Rise  Trans Set    Mag  Size   Elong  Phase Delta  r\n");
X  
X    raformat(sun_data.alpha2000/15.0, rastr1);
X    raformat(sun_data.alpha/15.0, rastr2);
X***************
X*** 144,155 ****
X      };
X  
X      fprintf(o_eph,
X!       "%-7.7s %s %s %s %s %s %s %s %5.2f                     %s %s\n",
X  	    bodies[i].name,
X  	    rastr1, decstr1,
X  	    rastr2, decstr2,
X  	    risestr, transitstr, setstr,
X! 	    bodies[i].mag, Delta_str, r_str);
X    };
X  
X    for (i = 0; i < nobjects; i++) {
X--- 144,155 ----
X      };
X  
X      fprintf(o_eph,
X!       "%-7.7s %s %s %s %s %s %s %s %5.2f        %6.1f        %s %s\n",
X  	    bodies[i].name,
X  	    rastr1, decstr1,
X  	    rastr2, decstr2,
X  	    risestr, transitstr, setstr,
X! 	    bodies[i].mag, bodies[i].psi, Delta_str, r_str);
X    };
X  
X    for (i = 0; i < nobjects; i++) {
Xdiff -r -c ../../starchart3.2/observe/outsif.c ./outsif.c
X*** ../../starchart3.2/observe/outsif.c	Wed Apr  4 18:28:08 1990
X--- ./outsif.c	Wed Apr  4 18:31:04 1990
X***************
X*** 16,22 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: outsif.c,v 1.13 90/03/06 00:10:00 ccount Exp $";
X  #endif
X  
X  
X--- 16,22 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: outsif.c,v 1.14 90/04/02 20:58:01 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 29,35 ****
X  #include "observe.h"
X  #include "date.h"
X  
X- 
X  void write_files(), tosizestr();
X  
X  
X--- 29,34 ----
X***************
X*** 48,55 ****
X       int nobjects;
X  {
X    int i;
X!   char moon_phase[20];
X    char *typefield;
X  
X    if (one_day) {
X  				/* print all */
X--- 47,55 ----
X       int nobjects;
X  {
X    int i;
X!   char moon_phase[20], comet_phase[20];
X    char *typefield;
X+   char *commentfield;
X  
X    if (one_day) {
X  				/* print all */
X***************
X*** 75,85 ****
X  		    "   ", planets[i].name, "");
X  
X      for (i = 0; i < nbodies; i++) {
X        if (bodies[i].body_type == asteroid)
X  	typefield = "PA";
X!       else if (bodies[i].body_type == comet)
X  	typefield = "PC";
X!       else
X  	typefield = "P?";
X  
X        write_files(o_sif, o_star, do_sif, do_star,
X--- 75,89 ----
X  		    "   ", planets[i].name, "");
X  
X      for (i = 0; i < nbodies; i++) {
X+       commentfield = "";
X        if (bodies[i].body_type == asteroid)
X  	typefield = "PA";
X!       else if (bodies[i].body_type == comet) {
X  	typefield = "PC";
X! 	/* calculate tail angle */
X! 	commentfield = comet_phase;
X! 	sprintf(comet_phase, "%6.1f", bodies[i].chi);
X!       } else
X  	typefield = "P?";
X  
X        write_files(o_sif, o_star, do_sif, do_star,
X***************
X*** 86,92 ****
X  		  bodies[i].alpha2000/15.0, bodies[i].delta2000,
X  		  bodies[i].mag,
X  		  typefield, "  ", -1.0,
X! 		  "   ", bodies[i].name, "");
X      };
X   
X     for (i = 0; i < nobjects; i++)
X--- 90,96 ----
X  		  bodies[i].alpha2000/15.0, bodies[i].delta2000,
X  		  bodies[i].mag,
X  		  typefield, "  ", -1.0,
X! 		  "   ", bodies[i].name, commentfield);
X      };
X   
X     for (i = 0; i < nobjects; i++)
X***************
X*** 153,159 ****
X       double jd;
X  {
X    static char *namep = "";
X!   char *vectfield, *typefield;
X    char datestr[15];
X    char name_date[96];
X  
X--- 157,164 ----
X       double jd;
X  {
X    static char *namep = "";
X!   char comet_phase[20];
X!   char *vectfield, *typefield, *commentfield;
X    char datestr[15];
X    char name_date[96];
X  
X***************
X*** 164,174 ****
X      vectfield = "VM";
X    };
X  
X    if (body.body_type == asteroid)
X      typefield = "PA";
X!   else if (body.body_type == comet)
X      typefield = "PC";
X!   else
X      typefield = "P?";
X  
X    jd_to_str(jd, datestr);
X--- 169,182 ----
X      vectfield = "VM";
X    };
X  
X+   commentfield = "";
X    if (body.body_type == asteroid)
X      typefield = "PA";
X!   else if (body.body_type == comet) {
X      typefield = "PC";
X! 	commentfield = comet_phase;
X! 	sprintf(comet_phase, "%6.1f", body.chi);
X!   } else
X      typefield = "P?";
X  
X    jd_to_str(jd, datestr);
X***************
X*** 178,184 ****
X  	      body.alpha2000/15.0, body.delta2000,
X  	      body.mag,
X  	      typefield, "  ", -1.0,
X! 	      "   ", name_date, "");
X    write_files(o_sif, o_star, do_sif, do_star,
X  	      body.alpha2000/15.0, body.delta2000,
X  	      body.mag + 1.0,
X--- 186,192 ----
X  	      body.alpha2000/15.0, body.delta2000,
X  	      body.mag,
X  	      typefield, "  ", -1.0,
X! 	      "   ", name_date, commentfield);
X    write_files(o_sif, o_star, do_sif, do_star,
X  	      body.alpha2000/15.0, body.delta2000,
X  	      body.mag + 1.0,
X***************
X*** 320,326 ****
X    }
X  
X    if (mag < 0.0) {
X!     if (mag < -10.0) strcpy(magstr,"-99");
X      else {
X        i = -mag*10 + .5;
X        sprintf(magstr,"-%02d", i);
X--- 328,334 ----
X    }
X  
X    if (mag < 0.0) {
X!     if (mag < -9.95) strcpy(magstr,"-99");
X      else {
X        i = -mag*10 + .5;
X        sprintf(magstr,"-%02d", i);
Xdiff -r -c ../../starchart3.2/observe/tablecalc.c ./tablecalc.c
X*** ../../starchart3.2/observe/tablecalc.c	Wed Apr  4 18:28:13 1990
X--- ./tablecalc.c	Wed Apr  4 18:31:10 1990
X***************
X*** 16,22 ****
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: tablecalc.c,v 1.8 90/02/19 17:21:52 ccount Exp $";
X  #endif
X  
X  
X--- 16,22 ----
X  
X  #ifndef  lint
X  static char rcsid[] =
X!   "$Header: tablecalc.c,v 1.9 90/04/04 02:12:31 ccount Exp $";
X  #endif
X  
X  
X***************
X*** 70,79 ****
X    delta = polint(dates, dec, Nread, jd, &error);
X    precess(from_equinox, 2000.0, alpha, delta, &alpha2000, &delta2000);
X  
X!   body->alpha = alpha;
X!   body->delta = delta;
X!   body->alpha2000 = alpha2000;
X!   body->delta2000 = delta2000;
X    body->mag = polint(dates, mag, Nread, jd, &error);
X    body->r = polint(dates, r, Nread, jd, &error);
X    body->Delta = polint(dates, Delta, Nread, jd, &error);
X--- 70,79 ----
X    delta = polint(dates, dec, Nread, jd, &error);
X    precess(from_equinox, 2000.0, alpha, delta, &alpha2000, &delta2000);
X  
X!   body->alpha = into_range(alpha);
X!   body->delta = into_range(delta);
X!   body->alpha2000 = into_range(alpha2000);
X!   body->delta2000 = into_range(delta2000);
X    body->mag = polint(dates, mag, Nread, jd, &error);
X    body->r = polint(dates, r, Nread, jd, &error);
X    body->Delta = polint(dates, Delta, Nread, jd, &error);
END_OF_FILE
if test 15758 -ne `wc -c <'observe.pch'`; then
    echo shar: \"'observe.pch'\" unpacked with wrong size!
fi
# end of 'observe.pch'
fi
if test -f 'stch_pch.ad' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'stch_pch.ad'\"
else
echo shar: Extracting \"'stch_pch.ad'\" \(21342 characters\)
sed "s/^X//" >'stch_pch.ad' <<'END_OF_FILE'
X+ 
X+         cmp     first14,0
X+         jne     sec14
X+         inc     first14
X+         mov     ah, 011h
X+         mov     al, 030h
X+         mov     bh, 02
X+         push    bp
X+         int     010h
X+         mov     ax,es
X+         mov     es14,ax
X+         mov     bp14,bp
X+         pop     bp
X+ sec14:
X+ 
X+         xor     ax,ax
X+         mov     al,byte ptr [bp+argbase+8]
X+         mul     fourt
X+         add     ax,bp14
X+         mov     si,ax
X+         mov     ax,word ptr [bp+argbase+4]
X+         mov     dx,ax
X+         and     dx,7
X+         mov     cl,3
X+         sar     ax,cl
X+         mov     [bp+argbase+8],ax
X+         mov     [bp+argbase+4],dx
X+         mov     cx,xwidth
X+         mov     ax,drawseg
X+         mov     es,ax
X+         push    ds
X+         mov     ax,es14
X+         mov     ds,ax
X+         mov     bx,14
X+ 
X+ 
X+ commonl:
X+ 
X+                               ; symbol, slettr, and llettr the same after this
X+                               ; compute location of byte to change
X+         mov     ax,word ptr [bp+argbase+6]         ;this is y
X+         mov     [bp+argbase+6],cx
X+         mul     word ptr [bp+argbase+6]
X+         add     ax,[bp+argbase+8]
X+         mov     di,ax
X+ 
X+         mov     dx,3ceh         ; change SET/RESET register
X+         mov     al,00h          ; to contain the color to write.
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     ax,word ptr [bp+argbase+10]
X+         out     dx,al
X+ 
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+         mov     dx,3cfh
X+         cmp     word ptr [bp+argbase+8],0ffffh  ;special case:partially off
X+                                                 ;left edge of screen
X+         je      loop2m1
X+         cmp     word ptr [bp+argbase+8],cx  ;totally off screen horizontally
X+         jae     commf
X+         dec     cx
X+         cmp     word ptr [bp+argbase+8],cx      ;Partially off right edge
X+         je      loop2p1
X+ loop2:
X+ 
X+         xor     ax,ax
X+         mov     ah,ds:[si+0]            ;get pattern of current row
X+         mov     cx,[bp+argbase+4]
X+         shr     ax,cl
X+         out     dx,al
X+         inc     byte ptr es:[di+1]
X+         mov     al,ah
X+         out     dx,al
X+         inc     byte ptr es:[di]
X+         add     di,[bp+argbase+6]
X+         inc     si
X+         dec     bx
X+         jg      loop2
X+         jmp     commf
X+ loop2m1:
X+ 
X+         xor     ax,ax
X+         mov     ah,ds:[si+0]
X+         mov     cx,[bp+argbase+4]
X+         shr     ax,cl
X+         out     dx,al
X+         inc     byte ptr es:[di+1]
X+         add     di,[bp+argbase+6]
X+         inc     si
X+         dec     bx
X+         jg      loop2m1
X+         jmp     commf
X+ loop2p1:
X+ 
X+         xor     ax,ax
X+         mov     ah,ds:[si+0]
X+         mov     cx,[bp+argbase+4]
X+         shr     ax,cl
X+         mov     al,ah
X+         out     dx,al
X+         inc     byte ptr es:[di]
X+         add     di,[bp+argbase+6]
X+         inc     si
X+         dec     bx
X+         jg      loop2p1
X+ 
X+ commf:
X+         pop     ds
X+         pop     si
X+         pop     di
X+         pop     bp
X+         ret
X+ 
X+ pEnd _llettr
X+ 
X+ 
X+ 
X+ 
X+ 
X+ pBegin _max_lin
X+         mov     ax,maxline
X+         ret
X+ pEnd   _max_lin
X+ 
X+ ; setmod.asm routine to be called from c to set mode n using
X+ ; call setmod(n) : n=3 set to cursor mode, n=16 set to color graphics mode
X+ ; 18 for VGA 480x640 color mode
X+ ; any number > 61 for 600x800 mode
X+ ; this version does not actually call the bios setmode routine -
X+ ; you have to do that
X+ pBegin _setmod
X+ 
X+         push    bp
X+         mov     bp,sp
X+ 
X+         mov     ax, word ptr [bp+argbase+4]
X+         mov     bx,ax
X+         and     bx, 127
X+         cmp     bx, 60
X+         jl      setq7
X+         mov     xwidth,100
X+         mov     xwidthm,99
X+         mov     maxseg,60000
X+         mov     maxline,600
X+         mov     maxscreen,800
X+         mov     mmaxscreen,799
X+         jmp     setm1
X+ 
X+ setq7:
X+         mov     xwidth,80
X+         mov     xwidthm,79
X+         mov     maxseg,28000
X+         mov     maxline,350
X+         mov     maxscreen,640
X+         mov     mmaxscreen,639
X+         cmp     bx,18
X+         jz      qq44
X+         cmp     bx,17
X+         jnz     setm1
X+ qq44:
X+         mov     maxseg,38400
X+         mov     maxline,480
X+ setm1:
X+         pop     bp
X+         ret
X+ 
X+ 
X+ pEnd _setmod
X+ 
X+ pBegin _zsetup
X+         push    dx
X+         push    ax
X+ 
X+         mov     dx,3c4h
X+         mov     al,02h
X+         out     dx,al
X+         mov     dx,3c5h
X+         mov     al,0fh
X+         out     dx,al
X+ 
X+         mov     dx,3ceh
X+         mov     al,01h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,0fh
X+         out     dx,al
X+         pop     ax
X+         pop     dx
X+         ret
X+ pEnd _zsetup
X+ 
X+ ; ZLINE  :  SUBROUTINE TO DRAW LINE ON EGA BOARD
X+ ;this version has microsoft c calling convention
X+ ;      zline(ix0,iy0,ix1,iy1,icolor)
X+ pBegin _zline
X+         push    bp
X+         mov     bp,sp
X+         mov     cx,word ptr [bp+argbase+6]
X+         cmp     cx,word ptr [bp+argbase+10]
X+         jne     nhoriz
X+         jmp     far ptr __horiz_
X+ nhoriz:
X+         sub     sp,6
X+         push    di
X+         push    si
X+         mov     dx,3ceh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     ax,word ptr [bp+argbase+12]
X+         out     dx,al
X+ 
X+         mov     dx,word ptr [bp+argbase+10]
X+         mov     ax,word ptr [bp+argbase+8]
X+         mov     di,ax
X+         mov     bx,word ptr [bp+argbase+4]
X+         mov     ax,di
X+         sub     ax,bx
X+         jge     store_x
X+         mov     bx,di
X+         mov     di,dx
X+         mov     dx,cx
X+         mov     cx,di
X+         neg     ax
X+ store_x:
X+         mov     word ptr[bp+argbase+6],ax
X+         mov     word ptr[bp+argbase+4],bx
X+         mov     word ptr[bp+argbase+8],cx
X+         sub     dx,cx
X+         push    xwidth
X+         pop     word ptr [bp-2]
X+         jge     store_y
X+         neg     word ptr [bp-2]
X+         neg     dx
X+ store_y:
X+         mov     word ptr[bp+argbase+10],dx
X+ ;initialize values
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+         mov     ax,drawseg
X+         mov     es,ax
X+ ;calculate address in screen buffer of first point
X+         mov     ax,word ptr[bp+argbase+4]
X+         mov     dx,ax
X+         and     dx,7
X+         mov     cl,3
X+         sar     ax,cl
X+         mov     si,ax
X+         lea     bx,btab
X+         add     bx,dx
X+         mov     ax,word ptr[bp+argbase+8]
X+         mul     xwidth
X+         mov     dx,ax
X+         mov     al,[bx]
X+         mov     bx,dx
X+         mov     cx,0
X+ ;figure out if slope is greater or less than 1
X+         mov     dx,word ptr[bp+argbase+6]
X+         cmp     dx,word ptr[bp+argbase+10]
X+         jl      csteep
X+         call    slant
X+         jmp     finish
X+ csteep:
X+         call    steep
X+ finish:
X+         pop     si
X+         pop     di
X+         mov     sp,bp
X+         pop     bp
X+         ret
X+ 
X+ pEnd _zline
X+ slant    proc    near
X+           ;slope<1
X+         cmp     si,xwidth      ;test for line off screen to right
X+         jge     quit1
X+         mov     di,word ptr[bp+argbase+10]
X+         mov     dx,word ptr[bp+argbase+6]
X+         mov     word ptr [bp-4],dx
X+         shr     dx,1
X+         mov     word ptr [bp-6],dx
X+         mov     dx,3cfh
X+ newdot:
X+         cmp     si,0       ;test for line off screen to left
X+         jl      q1
X+         out     dx,al                   ;output bit in byte to mask register
X+         inc     byte ptr es:[bx][si]    ;insert byte in buffer ... note that
X+                         ;the inc instruction doesn't actually do the
X+                         ;work -- it;s done by the EGA's wierd hardware
X+ q1:     ror     al,1
X+         jnc     nc1
X+         inc     si
X+         cmp     si,xwidth
X+         je      quit1
X+ nc1:    add     cx,di
X+         cmp     cx,word ptr [bp-6]
X+         jle     dcount
X+         sub     cx,word ptr[bp+argbase+6]
X+         add     bx,word ptr [bp-2]
X+ dcount: dec     word ptr [bp-4]
X+         jge     newdot
X+ quit1:  ret
X+ 
X+ 
X+ slant    endp
X+ steep   proc    near
X+         ;slope>1     see comments in "slant"
X+         cmp     si,xwidth
X+         jge     quit2
X+         mov     di,word ptr[bp+argbase+6]
X+         or      di,di
X+         je      vertical
X+         mov     dx,word ptr[bp+argbase+10]
X+         mov     word ptr[bp-4],dx
X+         shr     dx,1
X+         mov     word ptr[bp-6],dx
X+         mov     dx,3cfh
X+         out     dx,al
X+ newdot2:
X+         cmp     si,0
X+         jl      c3
X+         inc     byte ptr es:[bx][si]
X+ c3:     add     bx,word ptr [bp-2]
X+         add     cx,di
X+         cmp     cx,word ptr[bp-6]
X+         jle     dcount2
X+         sub     cx,word ptr[bp+argbase+10]
X+         ror     al,1
X+         out     dx,al
X+         jnc     dcount2
X+         inc     si
X+         cmp     si,xwidth
X+         je      quit2
X+ dcount2:
X+         dec     word ptr[bp-4]
X+         jge     newdot2
X+ quit2:  ret
X+ vertical:
X+         add     bx,si
X+         cmp     si,0               ;special case for vertical lines
X+         jl      quit2              ;which doesn't need fancy algorithm
X+         mov     cx,word ptr[bp+argbase+10]
X+         mov     dx,3cfh
X+         out     dx,al
X+ loopy2:
X+         inc     byte ptr es:[bx]
X+ c3v:
X+         add     bx,word ptr [bp-2]
X+         dec     cx
X+         jge     loopy2
X+         ret
X+ 
X+ 
X+ steep   endp
X+ 
X+ 
X+ 
X+ ;this routine resets the system to use ordinary bios or dos screen writes
X+ ;it has no parameters and may be called from any language
X+ pBegin _curmod
X+         push    dx
X+         push    ax
X+ 
X+         mov     dx,3ceh
X+         mov     al,01h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,0ffh
X+         out     dx,al
X+ 
X+ 
X+         pop     ax
X+         pop     dx
X+         ret
X+ pEnd _curmod
X+ 
X+ ;         zpoint.asm plot point at xt,yt in color zpcol
X+ pBegin _zpoint
X+         push    bp
X+         mov     bp,sp
X+ 
X+         mov     dx,3ceh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr [bp+argbase+8]
X+         out     dx,al
X+         mov     ax,drawseg
X+         mov     es,ax
X+         mov     cx,word ptr [bp+argbase+4]
X+         mov     bx,cx
X+         and     bx,7
X+         sar     cx,1
X+         sar     cx,1
X+         sar     cx,1
X+         or      cx,cx
X+         jl      ptquit
X+         cmp     cx,xwidthm
X+         jg      ptquit
X+ 
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr btab[bx]
X+         out     dx,al
X+ 
X+         mov     bx,cx
X+         mov     ax,word ptr [bp+argbase+6]
X+         mul     xwidth
X+         add     bx,ax
X+         inc     byte ptr es:[bx]
X+ 
X+ ptquit: pop     bp
X+         ret	
X+ 
X+ pEnd _zpoint
X+ 
X+ 
X+ 
X+ ;_e_start start up ellipse plotter
X+ ; e_start(xleft,xright,y,color)
X+ pBegin _e_start
X+         push    bp
X+         mov     bp,sp
X+ 
X+         mov     dx,3ceh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr [bp+argbase+10]
X+         out     dx,al
X+         mov     ax,drawseg
X+         mov     es,ax
X+ 
X+         mov     cx,word ptr [bp+argbase+4]
X+         mov     bx,cx
X+         and     bx,7
X+         sar     cx,1
X+         sar     cx,1
X+         sar     cx,1
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr btab[bx]
X+         mov     leftbit,al
X+ 
X+         out     dx,al
X+ 
X+         mov     ax,word PTR [bp+argbase+8]
X+         mul     xwidth
X+         mov     bx,ax
X+         mov     ysave,bx
X+         mov     leftx,cx
X+         add     bx,cx
X+         mov     leftbot,bx
X+         mov     lefttop,bx
X+         cmp     cx,xwidth
X+         jae     s1
X+         inc     byte ptr es:[bx]
X+ 
X+ s1:     mov     cx,word ptr [bp+argbase+6]
X+         mov     bx,cx
X+         and     bx,7
X+         sar     cx,1
X+         sar     cx,1
X+         sar     cx,1
X+ 
X+         mov     dx,3cfh
X+         mov     al,byte ptr btab[bx]
X+         mov     rightbit,al
X+         out     dx,al
X+         mov     bx,ysave
X+         mov     rightx,cx
X+         add     bx,cx
X+         mov     rightbot,bx
X+         mov     righttop,bx
X+         cmp     cx,xwidth
X+         jae     s2
X+         inc     byte ptr es:[bx]
X+ 
X+ s2:     pop     bp
X+         ret	
X+ 
X+ pEnd _e_start
X+ 
X+ 
X+ pBegin _e_xd
X+         mov     ax,drawseg
X+         mov     es,ax
X+         rol     rightbit,1
X+         mov     al,rightbit
X+         jae     l1
X+         dec     rightx
X+         dec     rightbot
X+         dec     righttop
X+ l1:     mov     dx,3cfh
X+         out     dx,al
X+         mov     bx,xwidth
X+         cmp     rightx,bx
X+         jae     s3
X+         mov     bx,righttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,rightbot
X+         inc     byte ptr es:[bx]
X+ 
X+ s3:
X+         ror     leftbit,1
X+         mov     al,leftbit
X+         jae     l2
X+         inc     leftx
X+         inc     lefttop
X+         inc     leftbot
X+ l2:     out     dx,al
X+         mov     bx,xwidth
X+         cmp     leftx,bx
X+         jae     s4
X+         mov     bx,lefttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,leftbot
X+         inc     byte ptr es:[bx]
X+ s4:     ret
X+ pEnd _e_xd
X+ 
X+ pBegin _e_xdyu
X+         mov     ax,drawseg
X+         mov     es,ax
X+         rol     rightbit,1
X+         mov     al,rightbit
X+         jae     l3
X+         dec     rightx
X+         dec     rightbot
X+         dec     righttop
X+ l3:     mov     dx,3cfh
X+         out     dx,al
X+         mov     cx,xwidth
X+         add     righttop,cx
X+         sub     rightbot,cx
X+         cmp     rightx,cx
X+         jae     s5
X+         mov     bx,righttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,rightbot
X+         inc     byte ptr es:[bx]
X+ 
X+ s5:
X+         ror     leftbit,1
X+         mov     al,leftbit
X+         jae     l4
X+         inc     leftx
X+         inc     lefttop
X+         inc     leftbot
X+ l4:     out     dx,al
X+         add     lefttop,cx
X+         sub     leftbot,cx
X+         cmp     leftx,cx
X+         jae     s6
X+         mov     bx,lefttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,leftbot
X+         inc     byte ptr es:[bx]
X+ 
X+ 
X+ s6:     ret
X+ pEnd _e_xdyu
X+ 
X+ pBegin _e_yu
X+         mov     ax,drawseg
X+         mov     es,ax
X+         mov     al,leftbit
X+         mov     dx,3cfh
X+         out     dx,al
X+         mov     cx,xwidth
X+         add     lefttop,cx
X+         sub     leftbot,cx
X+         cmp     leftx,cx
X+         jae     s7
X+         mov     bx,lefttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,leftbot
X+         inc     byte ptr es:[bx]
X+ s7:     mov     al,rightbit
X+         out     dx,al
X+         add     righttop,cx
X+         sub     rightbot,cx
X+         cmp     rightx,cx
X+         jae     s8
X+         mov     bx,righttop
X+         inc     byte ptr es:[bx]
X+         mov     bx,rightbot
X+         inc     byte ptr es:[bx]
X+ 
X+ s8:     ret
X+ pEnd _e_yu
X+ 
X+ pBegin _rectfill
X+ ;  rectfill(ix0,iy0,ix1,iy1,icol) plots a rectangle in
X+ ; color icol.   all are integers
X+         push    bp
X+         mov     bp,sp
X+         mov     bx,word PTR [bp+argbase+10]
X+         cmp     bx,word ptr [bp+argbase+6]
X+         jne     notflat
X+         jmp     far ptr __horiz_
X+ notflat:
X+         push    di
X+         push    si
X+         nop
X+ 
X+         mov     dx,3ceh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr [bp+argbase+12]
X+         out     dx,al
X+         mov     cx,word PTR [bp+argbase+4]
X+         mov     dx,word PTR [bp+argbase+6]
X+         mov     ax,word PTR [bp+argbase+8]
X+ 
X+         cmp     ax,cx
X+         jge     test2
X+         mov     si,ax
X+         mov     ax,cx
X+         mov     cx,si
X+ test2:  or      ax,ax
X+         jge     test3
X+         jmp     rfinish
X+ test3:  cmp     cx,maxscreen
X+         jl      test4
X+         jmp     rfinish
X+ test4:  cmp     cx,0
X+         jge     test5
X+         sub     cx,cx
X+ test5:  cmp     ax,maxscreen
X+         jl      test6
X+         mov     ax,mmaxscreen
X+ test6:
X+         cmp     bx,dx
X+         jge     test7
X+         mov     si,bx
X+         mov     bx,dx
X+         mov     dx,si
X+ test7:  or      bx,bx
X+         jge     test8
X+         jmp     rfinish
X+ test8:  cmp     dx,maxline
X+         jl      test9
X+         jmp     rfinish
X+ test9:  cmp     dx,0
X+         jge     testa
X+         sub     dx,dx
X+ testa:  cmp     bx,maxline
X+         jl      testb
X+         mov     bx,maxline
X+         dec     bx
X+ testb:
X+ 
X+         mov     xx0,cx
X+         mov     yy0,dx
X+         mov     xx1,ax
X+         mov     yy1,bx
X+ 
X+         mov     ax,cx
X+         mov     dx,ax
X+         and     dx,7
X+         mov     cl,3
X+         sar     ax,cl
X+         mov     xc10,ax
X+         mov     xc20,dx
X+         mov     di,ax
X+         mov     ax,xx1
X+         mov     dx,ax
X+         and     dx,7
X+         mov     cl,3
X+         sar     ax,cl
X+         mov     xc11,ax
X+         mov     xc21,dx
X+         sub     ax,di
X+         mov     del_x,ax
X+         mov     ax,drawseg
X+         mov     es,ax
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+ 
X+         mov     ax,yy0
X+         mul     xwidth
X+         add     ax,xc10
X+         mov     lowyb,ax
X+ 
X+         mov     ax,yy1
X+         sub     ax,yy0
X+         inc     ax
X+         mov     del_y,ax
X+         mov     bx,xc20
X+         mov     dl,left[bx]
X+         or      del_x,0
X+         jnz     leftcol
X+         mov     bx,xc21
X+         and     dl,right[bx]
X+ leftcol:
X+         mov     al,dl
X+         mov     dx,3cfh
X+         out     dx,al
X+         mov     bx,lowyb
X+         mov     cx,del_y
X+         mov     ax,xwidth
X+ loopd:  inc     byte ptr es:[bx]
X+         add     bx,ax
X+         loop    loopd
X+         cmp     del_x,1
X+         jl      rfinish
X+         jz      lastcol
X+         mov     al,255
X+         out     dx,al
X+         mov     bx,del_y
X+         mov     ax,lowyb
X+         inc     ax
X+         mov     si,del_x
X+         dec     si
X+ loope:  mov     cx,si
X+         mov     di,ax
X+         rep     stosb
X+         add     ax,xwidth
X+         dec     bx
X+         jnz     loope
X+ 
X+ lastcol:
X+         mov     bx,xc21
X+         mov     al,right[bx]
X+         out     dx,al
X+         mov     bx,lowyb
X+         add     bx,del_x
X+         mov     cx,del_y
X+         mov     ax,xwidth
X+ loopf:  inc     byte ptr es:[bx]
X+         add     bx,ax
X+         loop    loopf
X+ 
X+ rfinish:
X+         pop     si
X+         pop     di
X+         pop     bp
X+         ret
X+ 
X+ 
X+ pEnd _rectfill
X+ 
X+ pBegin __horiz_             ;stripped down version of rectfill
X+         push    di
X+         push    si
X+ 
X+         mov     dx,word PTR [bp+argbase+6]
X+         cmp     dx,maxline
X+         jae     rfinish
X+         mov     dx,3ceh
X+         mov     al,00h
X+         out     dx,al
X+         mov     dx,3cfh
X+         mov     al,byte ptr [bp+argbase+12]
X+         out     dx,al
X+         mov     cx,word PTR [bp+argbase+4]
X+         mov     bx,word PTR [bp+argbase+8]
X+ 
X+         cmp     bx,cx
X+         jge     test2h
X+         mov     si,bx
X+         mov     bx,cx
X+         mov     cx,si
X+ test2h: or      bx,bx
X+         jge     test3h
X+         jmp     hfinish
X+ test3h: cmp     cx,maxscreen
X+         jl      test4h
X+         jmp     hfinish
X+ test4h: cmp     cx,0
X+         jge     test5h
X+         sub     cx,cx
X+ test5h: cmp     bx,maxscreen
X+         jl      test6h
X+         mov     bx,mmaxscreen
X+ test6h:
X+ 
X+         xor     dx,dx
X+         mov     ax,cx
X+         div     ate
X+         mov     xc10,ax
X+         mov     xc20,dx
X+         mov     cx,ax
X+         xor     dx,dx
X+         mov     ax,bx
X+         div     ate
X+         mov     xc11,ax
X+         mov     xc21,dx
X+         sub     ax,cx
X+         mov     cx,ax
X+         mov     ax,drawseg
X+         mov     es,ax
X+         mov     dx,3ceh
X+         mov     al,08h
X+         out     dx,al
X+ 
X+         mov     ax,word ptr [bp+argbase+6]
X+         mov     dx,ax
X+         mul     xwidth
X+         add     ax,xc10
X+         mov     di,ax
X+ 
X+         mov     bx,xc20
X+         mov     al,left[bx]
X+         or      cx,cx
X+         jnz     leftcoh
X+         mov     bx,xc21
X+         and     al,right[bx]
X+ leftcoh:
X+         mov     dx,3cfh
X+         out     dx,al
X+         inc     byte ptr es:[di]
X+         inc     di
X+         cmp     cx,1
X+         jl      hfinish
X+         jz      lastcoh
X+         mov     al,255
X+         out     dx,al
X+         dec     cx
X+         rep     stosb
X+ 
X+ lastcoh:
X+         mov     bx,xc21
X+         mov     al,right[bx]
X+         out     dx,al
X+         inc     byte ptr es:[di]
X+ 
X+ hfinish:
X+         pop     si
X+         pop     di
X+         pop     bp
X+         ret
X+ 
X+ pEnd __horiz_
X+ 
X+ endcs _egagraf
X+       end
X+ 
X+ 
X+ 
END_OF_FILE
if test 21342 -ne `wc -c <'stch_pch.ad'`; then
    echo shar: \"'stch_pch.ad'\" unpacked with wrong size!
fi
# end of 'stch_pch.ad'
fi
echo shar: End of archive 1 \(of 4\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 4 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0



More information about the Comp.sources.misc mailing list