home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume13
/
starchart
/
patch1
next >
Wrap
Text File
|
1988-01-30
|
24KB
|
904 lines
Subject: v13i024: Starchart package, Patch1
Newsgroups: comp.sources.unix
Sender: sources
Approved: rsalz@uunet.UU.NET
Submitted-by: "Alan W. Paeth" <awpaeth@watcgl.waterloo.edu>
Posting-number: Volume 13, Issue 24
Archive-name: starchart/patch1
[ The starchart software was posted in Volume 12. **MAKE SURE TO UNPACK
THIS IN A SEPARATE DIRECTORY or you will wipe out existing files!** --r$ ]
! This is a parallel posting along with a submission to comp.sources.bugs.
! Whereas the latter is for quick dissemination of a rapidly evolving program,
! this copy to comp.sources.unix is intended to provide both archival storage
! of the software, plus wider distribution when it is eventually posted.
This posting is a complete upgrade/bug fix for my recent posting of
StarChart. It fixes all reported bugs, both public and private.
In addition, starchart.c has been significantly upgraded, and ver #2.1 is
sent in complete form (not as a patch list). A nasty bug in planet.c has
been squashed. Compile and run-time portability to sysV UNIX is added.
Bonus: new drivers have been written by the net: IRIS and Unix Plot(5) format.
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Contents: README Makefile patch-moonphase.c patch-planet.c patch-stardsp.c
# patch-starhp.c patch-starimages.c patch-starlaser.c patch-starpic.c
# patch-starpost.c patch-startek.c patch-yaleformat patchall
echo x - README
sed 's/^@//' > "README" <<'@//E*O*F README//'
This is the SOFTWARE update kit for StarChart version #2
which was released in Nov/Dec 1987. The kit performs an upgrade to ver #2.1
No upgrades to yale.star or other .star files occurs.
This kit updates StarChart version #2 software as it appeared in that release -
no other patches should already be in place. Virgin copies of version #2 are
available from the moderator of comp.sources.unix.
Overview of Changes
More portability across sysV and IRIS UNIX installations.
A particularly nasty bug in planet.c was removed.
Two new device drivers were added (Unix Plot(5) and Iris).
StarChart now performs full clipping of vectors.
Additional flags for creating stylized output and larger displays.
PostScript now has nicer symbols for non-stellar objects.
More detailed patch and upgrade notes appear in the source code.
FILES
Name Description/Instructions
---- ------------------------
README this file
patch-* patches for moonphase.c, planet.c, drivers, yaleformat
patchall runs the above patches on the originals
starchart.1 new man page
starchart.c rewritten main driver (easier to reinstall then patch)
starchart.h accompanying new .h file for above (ditto)
stariris.c new IRIS driver
staruplot.c new UNIX Plot(5) driver
@//E*O*F README//
chmod u=rw,g=r,o=r README
echo x - Makefile
sed 's/^@//' > "Makefile" <<'@//E*O*F Makefile//'
#
# Author: Petri Launiainen, Intrinsic Oy, Tampere, FINLAND (pl@intrin.FI)
#
# Based on the work of Alan W. Paeth
#
SHELL = /bin/sh
#SITE DEPENDENCIES
#
# Uncomment out the version appropriate for your site.
# At present dependencies for sysV UNIX and Silicon Graphics IRIS exist
#
#LOCAL=-DSYSV -Dindex=strchr
#LOCAL= -Zf
#
# put the Yale Star Catalog file path here: because the yale.star is
# static (stars don't change so often :->), consider using some static
# library path here - relative one is used for quick testing
#STAR = "/usr/lib/starchart/yale.star"
STAR = "./yale.star"
# similarly assign the Messier file path:
#MESS = "/usr/lib/starchart/messier.star"
MESS = "./messier.star"
# and the constellation finder file:
#CONS = "/usr/lib/starchart/con.locs"
CONS = "./con.locs"
# put the planet position file path here: it should be preferably
# relative, thus allowing everyone to change planet positions according
# to their interests. This file changes when the 'planet' program is
# executed
PLANET = "./planet.star"
# notice that starchart.o and planet are made dependent on Makefile, due
# to the STARFILE, MESSFILE, CONSTFILE and PLANETFILE definitions here
# put the installation directory here
BINDIR = "/usr/local/bin"
CFLAGS = -g -DSTARFILE='$(STAR)' -DPLANETFILE='$(PLANET)' -DCONSTFILE='$(CONS)' -DMESSFILE='$(MESS)'\
$(LOCAL)
LFLAGS = -g
# star chart calculation routine file
COBJ = starchart.o
# default binary names: if you change these, change also the corresponding
# make tags
BINS = epoch moonphase planet startek stardsp starpic staruplot starhp starlaser starpost
test:
stardsp -c ori
all: \
planet\
starhp\
staruplot\
stardsp\
startek\
starpic\
starpost\
starlaser\
epoch\
moonphase
install: all
strip $(BINS)
mv $(BINS) $(BINDIR)
starchart.o: starchart.c Makefile starchart.h
moonphase: moonphase.o
cc $(LFLAGS) moonphase.o -lm -o $@
epoch: epoch.o
cc $(LFLAGS) epoch.o -lm -o $@
planet: planet.o Makefile
cc $(LFLAGS) $(DEFINES) planet.o -lm -o $@
stardsp: $(COBJ) stardsp.o
cc $(LFLAGS) $(COBJ) stardsp.o -lm -o $@
starpic: $(COBJ) starpic.o
cc $(LFLAGS) $(COBJ) starpic.o -lm -o $@
staruplot: $(COBJ) staruplot.o starimages.o
cc $(LFLAGS) $(COBJ) staruplot.o starimages.o -lplot -lm -o $@
startek: $(COBJ) startek.o starimages.o
cc $(LFLAGS) $(COBJ) startek.o starimages.o -lm -o $@
starhp: $(COBJ) starhp.o starimages.o
cc $(LFLAGS) $(COBJ) starhp.o starimages.o -lm -o $@
starlaser: $(COBJ) starlaser.o starimages.o
cc $(LFLAGS) $(COBJ) starlaser.o starimages.o -lm -o $@
stariris: $(COBJ) stariris.o starimages.o
cc $(LFLAGS) $(COBJ) stariris.o starimages.o -Zf -Zg -lm -o $@
starpost: $(COBJ) starpost.o
cc $(LFLAGS) $(COBJ) starpost.o -lm -o $@
clean:
rm -f *.o mlog core
@//E*O*F Makefile//
chmod u=r,g=r,o=r Makefile
echo x - patch-moonphase.c
sed 's/^@//' > "patch-moonphase.c" <<'@//E*O*F patch-moonphase.c//'
6c6
< by Duffett-Smith.
---
> by Duffett-Smith.
8c8
< of code was adapted from.
---
> of code was adapted from.
12c12,13
< ****************************************************************************/
---
> ! modified by awpaeth@watcgl, December 1987 for sysV compatability
> ****************************************************************************/
14a16
> #ifndef SYSV
15a18,20
> #else
> #include <time.h>
> #endif
@//E*O*F patch-moonphase.c//
chmod u=rw,g=r,o=r patch-moonphase.c
echo x - patch-planet.c
sed 's/^@//' > "patch-planet.c" <<'@//E*O*F patch-planet.c//'
2c2
< * A program to determine the position of
---
> * A program to determine the position of
32a33,41
> ! Patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> ! based on revisions by Kurt Horton (ihnp4!erc780!horton)
> ! and Stephen Kennedy <ihnp4!cbosgd!smk>
> ! et al.
> !
> ! [1] Mars and Saturn now plot as "m" and "s", not "M" and "S" (Mercury, Sol)
> ! [2] New guesses at magnitudes are now given, could someone compute them?
> ! [3] fixed a nasty bug which gave wrong sign for decl between -1 deg and 0.
> !
39c48,52
< #include <sys/time.h> /* for getting current GMT */
---
> #ifndef SYSV
> #include <sys/time.h> /* for getting current GMT (generic Unix) */
> #else
> #include <time.h> /* for getting current GMT (sysV version) */
> #endif
49,51c62,64
< #define MAGSOL 0
< #define MAGMER 150
< #define MAGVEN 0
---
> #define MAGSOL -99
> #define MAGMER -10
> #define MAGVEN -20
102a116
> #ifndef SYSV
106a121,124
> #else
> long time();
> return(GMT1970 + (double)time((long *)0)/SECSPERDAY);
> #endif
111a130
> #ifndef SYSV
113a133
> #endif
135a156
>
139,144c160,169
< gettimeofday(&tv, &tz);
< time = 0.0; /* local time (0.0-23.999) */
< yy = CURYEAR; /* local year */
< mm = 0; /* local month */
< dd = 0; /* local day of month */
< timez = tz.tz_minuteswest/60.0; /* local time hrs west of Greenwich */
---
> #ifndef SYSV
> gettimeofday(&tv, &tz);
> timez = tz.tz_minuteswest/60.0; /* local time hrs west of Greenwich */
> #else
> timez = timezone/3600+(daylight?1:0);
> #endif
> time = 0.0; /* local time (0.0-23.999) */
> yy = CURYEAR; /* local year */
> mm = 0; /* local month */
> dd = 0; /* local day of month */
151c176
< die("unknown argument - %s", usage /*argv[j]*/ );
---
> die("unknown argument - %s\n%s", argv[j], usage);
159c184
< default: die("unknown switch - %s", usage /* argv[j] */ );
---
> default: die("unknown switch - %s\n%s", argv[j], usage );
428c453
< trans(r,b,ll,Stheta,Sr,epli, MAGMAR, "PM", "Mars");
---
> trans(r,b,ll,Stheta,Sr,epli, MAGMAR, "Pm", "Mars");
772c797
< trans(r,b,ll,Stheta,Sr,epli, MAGSAT, "PS", "Saturn");
---
> trans(r,b,ll,Stheta,Sr,epli, MAGSAT, "Ps", "Saturn");
1081a1107
> char decsign;
1092a1119,1124
> decsign = '+';
> if (dec<0)
> {
> dec = -dec;
> decsign = '-';
> }
1094c1126
< m =(int)((dec - deg)*60);
---
> m = (int)((dec - deg)*60);
1096,1104c1128
< if ( m < 0)
< {
< m = m * -1;
< }
< if (s < 0)
< {
< s = s * -1;
< }
< printf(" %+3ddeg %2dm %2ds ",deg,m,s);
---
> printf(" %c%2ddeg %2dm %2ds ",decsign,deg,m,s);
1106c1130
< fprintf(logfile, "%+03d%02d+%03d%s%s\n", deg, m, mag, sym, str);
---
> fprintf(logfile, "%c%02d%02d+%03d%s%s\n", decsign,deg,m,mag,sym,str);
1185,1186c1209,1210
< die(a,b)
< char *a, *b;
---
> die(a,b,c)
> char *a, *b, *c;
1189c1213
< fprintf(stderr,a,b);
---
> fprintf(stderr,a,b,c);
@//E*O*F patch-planet.c//
chmod u=rw,g=r,o=r patch-planet.c
echo x - patch-stardsp.c
sed 's/^@//' > "patch-stardsp.c" <<'@//E*O*F patch-stardsp.c//'
4a5,12
> /*
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> !
> ! [1] formal/actual parmaters for drawNebu, drawPlan.. now agree
> ! [2] "bigmaster" chart layout now added
> !
> */
>
18c26
< 3.0, 1.0, 420, 35, 480, 195, 0.0 };
---
> 3.0, 1.0, 2.05, 420, 35, 480, 195, 0.0 };
21c29
< 5.9, 2.0, 20, 265, 880, 500, 0.0 };
---
> 5.9, 2.0, 2.05, 20, 265, 880, 500, 0.0 };
22a31,33
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 5.9, 2.0, 2.05, 20, 65, 880, 700, 0.0 };
>
110c121,122
< drawPlan(x, y)
---
> drawPlan(x, y, mag, type, color)
> char type, *color;
160c172,173
< drawGalx(x, y)
---
> drawGalx(x, y, mag, type, color)
> char type, *color;
165c178,179
< drawNebu(x, y)
---
> drawNebu(x, y, mag, type, color)
> char type, *color;
170c184,185
< drawClus(x, y)
---
> drawClus(x, y, mag, type, color)
> char type, *color;
@//E*O*F patch-stardsp.c//
chmod u=rw,g=r,o=r patch-stardsp.c
echo x - patch-starhp.c
sed 's/^@//' > "patch-starhp.c" <<'@//E*O*F patch-starhp.c//'
24a25,31
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> !
> ! [1] "bigmaster" chart layout now added
> !
> */
>
> /*
29c36
< 3.2, 1.0, 420, 35, 480, 195, 0.0 };
---
> 3.2, 1.0, 2.05, 420, 35, 480, 195, 0.0 };
32c39
< 8.0, 3.0, 20, 265, 880, 500, 0.0 };
---
> 8.0, 3.0, 2.05, 20, 265, 880, 500, 0.0 };
33a41,43
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 8.0, 3.0, 2.05, 20, 65, 880, 700, 0.0 };
>
81c91
<
---
>
@//E*O*F patch-starhp.c//
chmod u=rw,g=r,o=r patch-starhp.c
echo x - patch-starimages.c
sed 's/^@//' > "patch-starimages.c" <<'@//E*O*F patch-starimages.c//'
32c32
< **
---
> **
46c46
< ** this is a two state machine - first it just gathers ptr strings
---
> ** this is a two state machine - first it just gathers ptr strings
65c65
< retarea = (int *) calloc
---
> retarea = (int *) calloc
110c110,111
< drawPlan(x, y)
---
> drawPlan(x, y, max, type, color)
> char type, *color;
133c134
< drawStar (x, y, mag, type, color)
---
> drawStar(x, y, mag, type, color)
140,145c141,146
< case 0: draw0 (x, y); break;
< case 1: draw1 (x, y); break;
< case 2: draw2 (x, y); break;
< case 3: draw3 (x, y); break;
< case 4: draw4 (x, y); break;
< default: draw5 (x, y); break;
---
> case 0: drawS0 (x, y); break;
> case 1: drawS1 (x, y); break;
> case 2: drawS2 (x, y); break;
> case 3: drawS3 (x, y); break;
> case 4: drawS4 (x, y); break;
> default: drawS5 (x, y); break;
149c150
< draw0(x, y)
---
> drawS0(x, y)
157c158
< (void) cstar (" ***** ");
---
> (void) cstar (" ***** ");
165c166
< }
---
> }
168c169
< {
---
> {
174c175
< draw1(x, y)
---
> drawS1(x, y)
182c183
< (void) cstar (" *** ");
---
> (void) cstar (" *** ");
197c198
< draw2(x, y)
---
> drawS2(x, y)
205c206
< (void) cstar (" * ");
---
> (void) cstar (" * ");
220c221
< draw3(x, y)
---
> drawS3(x, y)
241c242
< draw4(x, y)
---
> drawS4(x, y)
262c263
< draw5(x, y)
---
> drawS5(x, y)
281c282
< drawGalx(x, y)
---
> drawGalx(x, y, mag, type, color)
282a284
> char type, *color;
289c291
< (void) cstar (" *** ");
---
> (void) cstar (" *** ");
304c306
< drawClus(x, y)
---
> drawClus(x, y, mag, type, color)
305a308
> char type, *color;
312c315
< (void) cstar (" * * ");
---
> (void) cstar (" * * ");
325c328
< drawNebu(x, y)
---
> drawNebu(x, y, mag, type, color)
326a330
> char type, *color;
333c337
< (void) cstar (" ** ");
---
> (void) cstar (" ** ");
@//E*O*F patch-starimages.c//
chmod u=rw,g=r,o=r patch-starimages.c
echo x - patch-starlaser.c
sed 's/^@//' > "patch-starlaser.c" <<'@//E*O*F patch-starlaser.c//'
13a14,21
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> !
> ! [1] "bigmaster" chart layout now added
> ! [2] different XOFF and YOFF values adopted for better margins
> !
> */
>
> /*
30,31c38,39
< #define XOFF 1060 /* text centering offset (in decipoints) */
< #define YOFF (-80)
---
> #define XOFF 520 /* text centering offset (in decipoints) */
> #define YOFF (-50) /* previously, XOFF=1060; YOFF=(-80) */
41c49
< 3.2, 1.0, 420, 35, 480, 195, 0.0 };
---
> 3.2, 1.0, 2.05, 420, 35, 480, 195, 0.0 };
44c52
< 8.0, 3.0, 20, 265, 880, 500, 0.0 };
---
> 8.0, 3.0, 2.05, 20, 265, 880, 500, 0.0 };
45a54,56
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 8.0, 3.0, 2.05, 20, 65, 880, 700, 0.0 };
>
94c105
<
---
>
@//E*O*F patch-starlaser.c//
chmod u=rw,g=r,o=r patch-starlaser.c
echo x - patch-starpic.c
sed 's/^@//' > "patch-starpic.c" <<'@//E*O*F patch-starpic.c//'
4a5,12
> /*
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> !
> ! [1] formal/actual parmaters for drawNebu, drawPlan.. now agree
> ! [2] "bigmaster" chart layout now added
> !
> */
>
15c23
< static float xold, yold;
---
> static double xold, yold;
22c30
< 3.2, 1.0, 480, 0, 480, 240, 0.0 };
---
> 3.2, 1.0, 2.05, 480, 0, 480, 240, 0.0 };
25c33
< 8.0, 3.0, 0, 370, 960, 960, 0.0 };
---
> 8.0, 3.0, 2.05, 0, 370, 960, 960, 0.0 };
26a35,37
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 8.0, 3.0, 2.05, 0, 80, 960, 1250, 0.0 };
>
35c46
< float conv(i)
---
> double conv(i)
114c125,126
< drawGalx(x, y)
---
> drawGalx(x, y, mag, type, color)
> char type, *color;
120c132,133
< drawNebu(x, y)
---
> drawNebu(x, y, mag, type, color)
> char type, *color;
126c139,140
< drawClus(x, y)
---
> drawClus(x, y, mag, type, color)
> char type, *color;
132c146,147
< drawPlan(x, y)
---
> drawPlan(x, y, mag, type, color)
> char type, *color;
@//E*O*F patch-starpic.c//
chmod u=rw,g=r,o=r patch-starpic.c
echo x - patch-starpost.c
sed 's/^@//' > "patch-starpost.c" <<'@//E*O*F patch-starpost.c//'
4a5,16
> /*
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl),
> ! based on revisions by Craig Counterman (ccount@royal.mit.edu)
> !
> ! [1] "bigmaster" chart layout now added
> ! [2] extensive rework and subclassing of non-stellar objects, e.g.
> ! galaxies, now have both spiral and irregular variants.
> ! [3] star sizes now extended to magnitude 10
> ! [4] white halo-ing of text overlays (by analogy to star haloing)
> !
> */
>
13c25
< 3.2, 1.0, 480, 0, 480, 240, 0.0 };
---
> 3.2, 1.0, 2.05, 480, 0, 480, 240, 0.0 };
16c28
< 8.0, 3.0, 0, 370, 960, 960, 0.0 };
---
> 8.0, 3.0, 2.05, 0, 370, 960, 960, 0.0 };
17a30,32
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 8.0, 3.0, 2.05, 0, 30, 960, 1400, 0.0 };
>
32c47
< float conv(i)
---
> double conv(i)
66c81,84
< out("/lshow {5 0 8#040 4 3 roll widthshow} def");
---
> out("% The default lshow halos glyphs, but is slow. It is especially");
> out("% useful when both the -a and -o switches are in effect (see man page)");
> out("%/lshow {5 0 8#040 4 3 roll widthshow} def %fast version");
> out("/lshow {true charpath gsave 1 setgray stroke grestore 0 setgray fill} def");
82,87d99
< out("% non-stellar object macros (better designs most welcome)");
< out("/planet {2 copy 2.5 starcirc 3.5 starplus} def");
< out("/galaxy {2 copy 2.5 starcirc 3.5 starminus} def");
< out("/nebula {2 copy 1 setgray 2.5 starcirc 0 setgray [2] 0 setdash");
< out(" 2.5 starcirc [] 0 setdash} def");
< out("/cluster {2.5 starcirc} def");
97,111c109,138
< out("/s1 {3.8 s} def");
< out("/d1 {3.8 d} def");
< out("/v1 {3.8 v} def");
< out("/s2 {3.1 s} def");
< out("/d2 {3.1 d} def");
< out("/v2 {3.1 v} def");
< out("/s3 {2.4 s} def");
< out("/d3 {2.4 d} def");
< out("/v3 {2.4 v} def");
< out("/s4 {1.7 s} def");
< out("/d4 {1.7 d} def");
< out("/v4 {1.7 v} def");
< out("/s5 {1.0 s} def");
< out("/d5 {1.0 d} def");
< out("/v5 {1.0 v} def");
---
> out("/s1 {4.0 s} def");
> out("/d1 {4.0 d} def");
> out("/v1 {4.0 v} def");
> out("/s2 {3.5 s} def");
> out("/d2 {3.5 d} def");
> out("/v2 {3.5 v} def");
> out("/s3 {3.0 s} def");
> out("/d3 {3.0 d} def");
> out("/v3 {3.0 v} def");
> out("/s4 {2.5 s} def");
> out("/d4 {2.5 d} def");
> out("/v4 {2.5 v} def");
> out("/s5 {2.0 s} def");
> out("/d5 {2.0 d} def");
> out("/v5 {2.0 v} def");
> out("/s6 {1.7 s} def");
> out("/d6 {1.7 d} def");
> out("/v6 {1.7 v} def");
> out("/s7 {1.5 s} def");
> out("/d7 {1.5 d} def");
> out("/v7 {1.5 v} def");
> out("/s8 {1.3 s} def");
> out("/d8 {1.3 d} def");
> out("/v8 {1.3 v} def");
> out("/s9 {1.1 s} def");
> out("/d9 {1.1 d} def");
> out("/v9 {1.1 v} def");
> out("/s10 {1.0 s} def");
> out("/d10 {1.0 d} def");
> out("/v10 {1.0 v} def");
112a140,170
> out("% non-stellar object macros (better designs most welcome)");
> out("/planet {2 copy 2.5 starcirc 3.5 starplus} def");
> out("/asteroid { 2 copy newpath 1.5 0 360 arc closepath fill moveto");
> out(" 3 3 rmoveto -6 -6 rlineto 6 0 rmoveto -6 6 rlineto stroke } def");
> out("/comet { 2 copy newpath 3 0 360 arc moveto 45 rotate");
> out(" 6 3 rmoveto -6 0 rlineto 3 -3 rmoveto 3 0 rlineto 0 -3 rmoveto");
> out(" -6 0 rlineto closepath stroke -45 rotate } def");
> out("/nebulad { newpath moveto 3 0 rmoveto -3 -3 rlineto -3 3 rlineto");
> out(" 3 3 rlineto 3 -3 rlineto stroke } def");
> out("/nebulap { 2 copy newpath translate 30 rotate 1 .5 scale");
> out(" 0 0 3 0 360 arc closepath stroke");
> out(" 1 2 scale -30 rotate neg exch neg exch translate } def");
> out("/galaxye { 2 copy newpath translate -30 rotate 1 .5 scale");
> out(" 0 0 3 0 360 arc closepath fill");
> out(" 1 2 scale 30 rotate neg exch neg exch translate } def");
> out("/galaxys { 2 copy 2 copy newpath translate -30 rotate 1 .5 scale");
> out(" 0 0 3 0 360 arc closepath fill");
> out(" -4 -3 moveto -3 0 lineto 4 3 moveto 3 0 lineto ");
> out(" stroke 1 2 scale 30 rotate ");
> out(" neg exch neg exch translate } def");
> out("/galaxyq { 2 copy 2 copy newpath translate -30 rotate 1 .5 scale");
> out(" 0 0 3 0 360 arc closepath fill");
> out(" 1 2 scale 30 rotate ");
> out(" -3 0 moveto 3 0 lineto 0 -3 moveto 0 3 lineto stroke");
> out(" neg exch neg exch translate } def");
> out("/clustero { 2 copy newpath 1 setgray 3 0 360 arc fill");
> out(" [1 2] 0 setdash 0 setgray 3 0 360 arc stroke [] 0 setdash } def");
> out("/clusterg { 2 copy 2 copy newpath 1 setgray 3 0 360 arc fill");
> out(" [1 2] 0 setdash 0 setgray 3 0 360 arc stroke [] 0 setdash");
> out(" 1.5 0 360 arc closepath fill } def");
> out("%");
178c236,237
< drawPlan(x, y)
---
> drawPlan(x, y, mag, type, color)
> char type, *color;
180c239,252
< printf("%.1f %.1f planet\n", conv(x), conv(y));
---
> switch(type)
> {
> case 'A': printf("%.1f %.1f asteroid\n", conv(x), conv(y)); break;
> case 'C': printf("%.1f %.1f comet\n", conv(x), conv(y)); break;
> case 'S':
> case 'M':
> case 'V':
> case 'm':
> case 'J':
> case 's':
> case 'U':
> case 'N':
> default: printf("%.1f %.1f planet\n", conv(x), conv(y));
> }
183c255,256
< drawGalx(x, y)
---
> drawGalx(x, y, mag, type, color)
> char type, *color;
185c258,272
< printf("%.1f %.1f galaxy\n", conv(x), conv(y));
---
> switch(type)
> {
> case 'a':
> case 'b':
> case 'c':
> case 'd':
> case 'B':
> case 'S':
> case 'O': printf("%.1f %.1f galaxys\n", conv(x), conv(y)); break;
> case 'Q': printf("%.1f %.1f galaxyq\n", conv(x), conv(y)); break;
> case 'E':
> case 'I':
> case 'G':
> default: printf("%.1f %.1f galaxye\n", conv(x), conv(y));
> }
188c275,276
< drawNebu(x, y)
---
> drawNebu(x, y, mag, type, color)
> char type, *color;
190c278,283
< printf("%.1f %.1f nebula\n", conv(x), conv(y));
---
> switch(type)
> {
> case 'P': printf("%.1f %.1f nebulap\n", conv(x), conv(y)); break;
> case 'D':
> default: printf("%.1f %.1f nebulad\n", conv(x), conv(y));
> }
193c286,287
< drawClus(x, y)
---
> drawClus(x, y, mag, type, color)
> char type, *color;
195c289,294
< printf("%.1f %.1f cluster\n", conv(x), conv(y));
---
> switch(type)
> {
> case 'G': printf("%.1f %.1f clusterg\n", conv(x), conv(y)); break;
> case 'O':
> default: printf("%.1f %.1f clustero\n", conv(x), conv(y));
> }
213c312
< if (mag>5) mag = 5;
---
> if (mag>10) mag = 10;
@//E*O*F patch-starpost.c//
chmod u=rw,g=r,o=r patch-starpost.c
echo x - patch-startek.c
sed 's/^@//' > "patch-startek.c" <<'@//E*O*F patch-startek.c//'
4a5,10
> /*
> ! patched December, 1987 by Alan Paeth (awpaeth@watcgl)
> !
> ! [1] "bigmaster" chart layout now added
> !
> */
38c44
< 3.2, 1.0, 420, 35, 480, 195, 0.0 };
---
> 3.2, 1.0, 2.05, 420, 35, 480, 195, 0.0 };
41c47
< 8.0, 3.0, 20, 265, 880, 500, 0.0 };
---
> 8.0, 3.0, 2.05, 20, 265, 880, 500, 0.0 };
42a49,51
> mapblock bigmaster = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 8.0, 3.0, 2.05, 20, 65, 880, 700, 0.0 };
>
84,92d92
<
< vecsym(x, y, s)
< char s;
< {
< tekmove(x, y-11); /* center character strings */
< tekalpha();
< printf("%c",s);
< }
<
107d106
<
@//E*O*F patch-startek.c//
chmod u=rw,g=r,o=r patch-startek.c
echo x - patch-yaleformat
sed 's/^@//' > "patch-yaleformat" <<'@//E*O*F patch-yaleformat//'
37c37
< mag 12 3 {-}i magnitude*100 -dd or -ddd
---
> mag 12 3 {-}i magnitude*100 (ddd) or -magnitude*10 (-dd)
120a121,137
>
> ! Notes on Magnitude
> !
> ! Magnitudes on the range -9.9 through 9.99 are represented in the following
> ! format: "-99" though "999". Thus, the three position magnitude field is
> ! normally taken as mag*100, unless object is of negative magnitude, in which
> ! case it represents a value mag*10. This costs us the "hundredths" position
> ! for objects of negative magnitude, but this is not objectionable. For very
> ! dim objects, 9.99 represents the current limiting magnitude. As there are
> ! on the order of 1e6 stars to this brightness, the format provides adequate
> ! representation. When used to chart small asteroids or very dim non-stellar
> ! objects, magnitudes below +9.99 will occasionally be encountered; we suggest
> ! coding such entries as "999", with this value then taken to mean >=9.99.
> !
> ! The old yale format which is supported for back compatability allows for
> ! a larger four digit field, but its use is not advocated, as code operation
> ! is not defined in presense of non-digits (such as leading blanks).
@//E*O*F patch-yaleformat//
chmod u=rw,g=r,o=r patch-yaleformat
echo x - patchall
sed 's/^@//' > "patchall" <<'@//E*O*F patchall//'
#
#patch everything
#
patch moonphase.c patch-moonphase.c
patch planet.c patch-planet.c
patch stardsp.c patch-stardsp.c
patch starhp.c patch-starhp.c
patch starimages.c patch-starimages.c
patch starlaser.c patch-starlaser.c
patch starpic.c patch-starpic.c
patch starpost.c patch-starpost.c
patch startek.c patch-startek.c
patch yaleformat patch-yaleformat
@//E*O*F patchall//
chmod u=rwx,g=rwx,o=rwx patchall
exit 0