[comp.sources.bugs] Starchart printing problem

yee@ames.arpa (Peter E. Yee) (12/03/87)

I compiled and ran the starchart program.  The starpost version prints out
the outline of the chart and the legend.  Nothing more.  No stars, no planets,
no nebulas.  Nothing.  Is it just me, or has anyone else had this problem?

						-Peter Yee
						yee@ames.arc.nasa.gov
						ames!yee

bernd@actisb.UUCP (Gunter Nitzler) (12/06/87)

In article <3554@ames.arpa> yee@ames.UUCP (Peter E. Yee) writes:
>I compiled and ran the starchart program.  The starpost version prints out
>the outline of the chart and the legend.  Nothing more.  No stars, no planets,
>no nebulas.  Nothing.  Is it just me, or has anyone else had this problem?

I had the same problem and have found two bugs:

In starchart.c, line 243 old:
	char ras[2], ....
new:
	char ras[20], ...

In starchart.c, line 757 old:
	    sscanf(cbuf, "%*5s%f%f%f %[^\n]", &ra, &de, &sc, legend);
new:
	    sscanf(cbuf, "%*5s%lf%lf%lf %[^\n]", &ra, &de, &sc, legend);

This two changes fixes the bugs.
Bernd.