home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / star.lzh / star.16 < prev    next >
Encoding:
Text File  |  1990-04-06  |  31.2 KB  |  1,082 lines

  1.  
  2. #! /bin/sh
  3. # This is a shell archive.  Remove anything before this line, then unpack
  4. # it by saving it into a file and typing "sh file".  To overwrite existing
  5. # files, type "sh file -c".  You can also feed this as standard input via
  6. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  7. # will see the following message at the end:
  8. #        "End of archive 16 (of 32)."
  9. # Contents:  starchart/spo.c.ab
  10. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  11. if test -f 'starchart/spo.c.ab' -a "${1}" != "-c" ; then 
  12.   echo shar: Will not clobber existing file \"'starchart/spo.c.ab'\"
  13. else
  14. echo shar: Extracting \"'starchart/spo.c.ab'\" \(29553 characters\)
  15. sed "s/^X//" >'starchart/spo.c.ab' <<'END_OF_FILE'
  16. X/*  0 */    { 1.0, 1.0, 1.0 },   /* BLACK */
  17. X/*  1 */    {   0,   0,   0 },   /* WHITE */
  18. X/*  2 */    { 1.0,   0,   0 },   /* RED */
  19. X/*  3 */    { 1.0, 0.4,   0 },   /* ORANGE */
  20. X/*  4 */    { 1.0, 1.0,   0 },   /* YELLOW */
  21. X/*  5 */    {   0, 1.0,   0 },   /* GREEN */
  22. X/*  6 */    {   0, 1.0, 1.0 },   /* CYAN */
  23. X/*  7 */    {   0,   0, 1.0 },   /* BLUE */
  24. X/*  8 */    { 1.0,   0, 1.0 },   /* VIOLET */
  25. X/*  9 */    { .5, .5, 1.0 },   /* BLUE_WHITE */
  26. X    /*         Red             Green           Blue          Nameby which
  27. X                                                         type is known */
  28. X/* 10 */    { 0.38937,        0.46526,        0.79493 },    /* B0 */
  29. X/* 11 */    { 0.39501,        0.47146,        0.78847 },    /* B1 */
  30. X/* 12 */    { 0.40103,        0.47792,        0.78151 },    /* B2 */
  31. X/* 13 */    { 0.40640,        0.48355,        0.77526 },    /* B3 */
  32. X/* 14 */    { 0.41341,        0.49071,        0.76701 },    /* B5 */
  33. X/* 15 */    { 0.43251,        0.50914,        0.74412 },    /* B8 */
  34. X/* 16 */    { 0.44342,        0.51897,        0.73079 },    /* B9 */
  35. X/* 17 */    { 0.45181,        0.52618,        0.72042 },    /* A0 */
  36. X/* 18 */    { 0.46931,        0.54026,        0.69847 },    /* A2 */
  37. X/* 19 */    { 0.47958,        0.54792,        0.68541 },    /* A3 */
  38. X/* 20 */    { 0.48538,        0.55205,        0.67797 },    /* A5 */
  39. X/* 21 */    { 0.50879,        0.56731,        0.64752 },    /* F0 */
  40. X/* 22 */    { 0.51732,        0.57231,        0.63627 },    /* F2 */
  41. X/* 23 */    { 0.52348,        0.57573,        0.62810 },    /* F5 */
  42. X/* 24 */    { 0.54076,        0.58447,        0.60496 },    /* F8 */
  43. X/* 25 */    { 0.54853,        0.58799,        0.59446 },    /* G0 */
  44. X/* 26 */    { 0.56951,        0.59623,        0.56584 },    /* G5 */
  45. X/* 27 */    { 0.58992,        0.60244,        0.53765 },    /* K0 */
  46. X/* 28 */    { 0.61098,        0.60693,        0.50828 },    /* K2 */
  47. X/* 29 */    { 0.63856,        0.60977,        0.46950 },    /* K5 */
  48. X/* 30 */    { 0.68698,        0.60595,        0.40110 },    /* M0 */
  49. X/* 31 */    { 0.72528,        0.59434,        0.34744 },    /* M2 */
  50. X/* 32 */    { 0.75182,        0.58144,        0.31097 },    /* M3 */
  51. X/* 33 */    { 0.78033,        0.56272,        0.27282 },    /* M4 */
  52. X/* 34 */    { 0.81066,        0.53676,        0.23394 },    /* M5 */
  53. X/* 35 */    { 0.84247,        0.50195,        0.19570 },    /* M6 */
  54. X/* 36 */    { 0.87512,        0.45667,        0.16004 },    /* M7 */
  55. X/* 37 */    { 0.71033,        0.59983,        0.36829 },    /* N0 */
  56. X/* 38 */    { 0.78625,        0.55816,        0.26507 },    /* N3 */
  57. X/* 39 */    { 0.93792,        0.33011,        0.10649 },    /* N8 */
  58. X/* 40 */    { 0.94897,        0.29906,        0.10012 },    /* N9 */
  59. X/* 41 */    { 0.79832,        0.54811,        0.24950 },    /* S4 */
  60. X/* 42 */    { 0.38241,        0.45743,        0.80282 },    /* O  */
  61. X
  62. X/* 43 */    { 0.500, 0, 0},              /* r0 */
  63. X/* 44 */    { 0.750, 0, 0},              /* r3 */
  64. X/* 45 */    { 0.875, 0, 0},              /* r6 */
  65. X/* 46 */    { 1.000, 0, 0},              /* r9 */
  66. X/* 47 */    { 0, 0.500, 0},              /* g0 */
  67. X/* 48 */    { 0, 0.750, 0},              /* g3 */
  68. X/* 49 */    { 0, 0.875, 0},              /* g6 */
  69. X/* 50 */    { 0, 1.000, 0},              /* g9 */
  70. X/* 51 */    { 0, 0, 0.500},              /* b0 */
  71. X/* 52 */    { 0, 0, 0.750},              /* b3 */
  72. X/* 53 */    { 0, 0, 0.875},              /* b6 */
  73. X/* 54 */    { 0, 0, 1.000},              /* b9 */
  74. X/* 55 */    { 0.500, 0.500, 0},          /* y0 */
  75. X/* 56 */    { 0.750, 0.750, 0},          /* y3 */
  76. X/* 57 */    { 0.875, 0.875, 0},          /* y6 */
  77. X/* 58 */    { 1.000, 1.000, 0},          /* y9 */
  78. X/* 59 */    { 0, 0.500, 0.500},          /* c0 */
  79. X/* 60 */    { 0, 0.750, 0.750},          /* c3 */
  80. X/* 61 */    { 0, 0.875, 0.875},          /* c6 */
  81. X/* 62 */    { 0, 1.000, 1.000},          /* c9 */
  82. X/* 63 */    { 0.500, 0, 0.500},          /* p0 */
  83. X/* 64 */    { 0.750, 0, 0.750},          /* p3 */
  84. X/* 65 */    { 0.875, 0, 0.875},          /* p6 */
  85. X/* 66 */    { 1.000, 0, 1.000},          /* p9 */
  86. X/* 67 */    { 0.500, 0.250, 0.000},      /* o0 */
  87. X/* 68 */    { 0.750, 0.375, 0.000},      /* o3 */
  88. X/* 69 */    { 0.875, 0.4375, 0.000},     /* o6 */
  89. X/* 70 */    { 1.000, 0.500, 0.000},      /* o9 */
  90. X/* 71 */    { 0.500, 0.500, 0.500},      /* w0 */
  91. X/* 72 */    { 0.750, 0.750, 0.750},      /* w3 */
  92. X/* 73 */    { 0.875, 0.875, 0.875},      /* w6 */
  93. X/* 74 */    { 1.000, 1.000, 1.000},      /* w9 */
  94. X  };
  95. X
  96. X  if (!color_postscript) return;
  97. X
  98. X  class = 0;
  99. X  while (table[class] && (table[class] != color_str[0])) class++;
  100. X
  101. X  subclass = isdigit(color_str[1]) ? color_str[1] - '0' : 0;
  102. X  colr = table[class] ? 10 + super_spectra[class][subclass] : WHITE;
  103. X
  104. X/*
  105. X    fprintf(outf, "%d '%s' scolor\n", colr, color_str);
  106. X*/
  107. X  if (colr != cur_colr)
  108. X    if (colr == WHITE)
  109. X      fprintf(outf, "0 0 0 srgb\n");
  110. X    else
  111. X      fprintf(outf, "%f %f %f srgb\n",
  112. X         ctab[colr].r, ctab[colr].g, ctab[colr].b); 
  113. X/*
  114. X      fprintf(outf, "%f %f %f setrgbcolor\n%% %s\n",
  115. X         ctab[colr].r, ctab[colr].g, ctab[colr].b, color_str); 
  116. X*/
  117. X
  118. X  cur_colr = colr;
  119. X}
  120. X
  121. X/*
  122. Xstatic int c_font = -1, c_size = -1;
  123. Xstatic char *c_fname = "/Times-Roman";
  124. X*/
  125. X/* Set the font and font size to be used for text. */
  126. X/* Note order of args */
  127. XD_fontsize(fsize, font)
  128. X     int fsize;    /* Size of font */
  129. X     int font;    /* e.g. TIMES, HELV, TIMES+ITALIC */
  130. X{
  131. X
  132. X/*  fprintf(outf, "%%fontsize %d %d\n", font, fsize);*/
  133. X
  134. X  /* override some requests */
  135. X  switch(cur_function) {
  136. X  case CHRTOUTLN:
  137. X    break;
  138. X  case CHRTHTICK:
  139. X  case CHRTVTICK:
  140. X    font = TIMESBOLD;
  141. X    break;
  142. X  case GRID_RA:
  143. X  case GRID_DEC:
  144. X  case ECLIPT:
  145. X    break;
  146. X  case CONSTBOUND:
  147. X  case CONSTPATTRN:
  148. X    break;
  149. X  case CONSTNAME:
  150. X    font = HELVITAL;
  151. X    break;
  152. X  case CHARTFILE:
  153. X    break;
  154. X  }
  155. X
  156. X  if ((fsize == c_size) && (font == c_font)) return;
  157. X
  158. X  switch(font) {
  159. X  case TIMESROMAN:
  160. X    c_fname = "/Times-Roman";
  161. X    break;
  162. X  case TIMESBOLD:
  163. X    c_fname = "/Times-Bold";
  164. X    break;
  165. X  case TIMESITAL:
  166. X    c_fname = "/Times-Italic";
  167. X    break;
  168. X  case TIMESBOLDITAL:
  169. X    c_fname = "/Times-BoldItalic";
  170. X    break;
  171. X  case HELV:
  172. X    c_fname = "/Helvetica";
  173. X    break;
  174. X  case HELVBOLD:
  175. X    c_fname = "/Helvetica-Bold";
  176. X    break;
  177. X  case HELVITAL:
  178. X    c_fname = "/Helvetica-Oblique";
  179. X    break;
  180. X  case HELVBOLDITAL:
  181. X    c_fname = "/Helvetica-BoldOblique";
  182. X    break;
  183. X  case COURIER:
  184. X    c_fname = "/Courier";
  185. X    break;
  186. X  case COURBOLD:
  187. X    c_fname = "/Courier-Bold";
  188. X    break;
  189. X  case COURITAL:
  190. X    c_fname = "/Courier-Oblique";
  191. X    break;
  192. X  case COURITALBOLD:
  193. X    c_fname = "/Courier-BoldOblique";
  194. X    break;
  195. X  default:
  196. X    font = CURNTFONT;
  197. X    break;
  198. X  };
  199. X
  200. X/* This doesn't work, since currentfont is already scaled
  201. X  if (font == CURNTFONT)
  202. X    fprintf(outf, "%d cfsize\n", fsize);
  203. X  else
  204. X    fprintf(outf, "%d %s fontsz\n", fsize, c_fname);
  205. X*/
  206. X
  207. X  fprintf(outf, "%d %s fontsz\n", fsize, c_fname);
  208. X  c_size = fsize;
  209. X  c_font = font;
  210. X}
  211. X/* This routine is encouraged to look at the extern cur_funtion
  212. X   and change the font used as desired */
  213. X
  214. X/*
  215. X * Additions for Greek fonts
  216. X */
  217. Xstatic char  *intable = " abgdezh@iklmnEoprstu0x%w";
  218. Xstatic char *outtable = " abgdezhqiklmnxoprstujcyw";
  219. X
  220. X/* Display text string str at x,y, in current font and font size.
  221. X   if star_lbl is TRUE, string is a star label, use
  222. X      greek characters (if possible) */
  223. XD_text(x, y, str, star_lbl)
  224. X     int x, y;
  225. X     char *str;
  226. X     int star_lbl;
  227. X{
  228. X  char ch;
  229. X  int i, j, k;
  230. X
  231. X
  232. X  /* Note: this ends current line */
  233. X  D_move(x,y);
  234. X
  235. X  /* Always issue a moveto.  D_move won't if current point is the point
  236. X     to move to.  For text which follows a previous text, this is wrong.
  237. X     e.g. "100 100 mt (asdf) lbshw (jkl) lbshw" produces "asdfjkl" instead
  238. X     of overwriting asdf with jkl. */
  239. X  fprintf(outf, "%d %d mt\n", x, y);
  240. X
  241. X  if (!star_lbl) {
  242. X    fprintf(outf, "(%s) lbshw\n", str);
  243. X  } else {
  244. X    if (isgreek(str[0]) && (isdigit(str[1]) || (str[1] == ' '))) {
  245. X      /* Greek if first character is greek encoded,
  246. X     and the second is space or a digit */
  247. X      /* Translate yaleformat greek encoding to Symbol font encoding */
  248. X#ifdef OLD_GREEK
  249. X      i = 0;
  250. X      while (ch = str[i])
  251. X    {
  252. X      j = 0;
  253. X      while (intable[j] && (intable[j] != ch)) j++;
  254. X      str[i] = intable[j] ? outtable[j] : str[i];
  255. X      /* If not in translation table, leave it alone */
  256. X      i++;
  257. X    }
  258. X#endif
  259. X      fprintf(outf, "(%s) gshow\n", str);
  260. X    } else { /* Star label, but not greek */
  261. X    /* remove leading spaces */
  262. X    while (*str == ' ') str++;
  263. X    fprintf(outf, "(%s) obshw\n", str);
  264. X    }
  265. X  }
  266. X
  267. X  vecstate = S_UNDEF;
  268. X}
  269. X
  270. Xisgreek(c)
  271. Xchar c;
  272. X{
  273. X  char *cp;
  274. X
  275. X#ifdef OLD_GREEK
  276. X  cp = "abgdezh@iklmnEoprstuOx%w";
  277. X#else
  278. X  cp = "abgdezhqiklmnxoprstujcywf"; /* f and j are both phi */ 
  279. X#endif
  280. X  while (*cp && (*cp != c)) cp++;
  281. X  return (*cp != '\0'); /* True if letter was in greek string */
  282. X}
  283. X
  284. X
  285. X
  286. X/* Return input coordinate in device coords where there are pointing devices */
  287. XD_inxy(x, y)
  288. X     int *x, *y;
  289. X{
  290. X}
  291. X
  292. X
  293. X/* Put non-displayed comment in output.  Allowed in postscript, but
  294. X   few other drivers will be able to support this. */ 
  295. XD_comment(str)
  296. X     char *str;
  297. X{
  298. X  fprintf(outf, "%%%s\n", str);
  299. X}
  300. X
  301. X
  302. X/**
  303. XHigher level functions
  304. X**/
  305. X
  306. X/* Point sizes for font calls */
  307. X#define TITLESIZE 16
  308. X#define SUBTLSIZE 12
  309. X#define NAMESIZE 10
  310. X#define LBLSIZE 8
  311. X#define MAGSIZE 8
  312. X
  313. X/* Fonts for font calls */
  314. X#define NAMEFNT TIMESROMAN
  315. X#define LBLFNT HELV
  316. X#define MAGFNT COURIER
  317. X#define TITLEFNT TIMESBOLD
  318. X#define SUBTLFNT TIMESROMAN
  319. X
  320. Xint x_nameoffset = MAG0_RAD+ResPT, y_nameoffset = 0;
  321. Xint x_lbloffset = MAG3_RAD, y_lbloffset = MAG3_RAD+ResPT/2;
  322. Xint x_magoffset = MAG3_RAD+ResPT, y_magoffset = -MAG3_RAD-ResPT;
  323. X
  324. X/* Interface Function */
  325. X/* Draw object at x, y.  properties set by other parameters */
  326. Xdrawobj(x, y, mag, type, color_str, label_field, con_str, obj_name,
  327. X    comment_str, file_line,
  328. X    draw_glyph, draw_text, use_lbl, use_name, use_mag)
  329. X
  330. X     int x, y;
  331. X     double mag;    /* Magnitude of object */
  332. X     char *type;    /* 2 chars, object code and subcode */
  333. X     char *color_str;    /* 2 chars, spectral type for stars, 
  334. X               color code otherwise */
  335. X     char *label_field;    /* 2 chars, Bayer or flamsteed for stars,
  336. X               size in seconds for nebulae and
  337. X               planets */
  338. X     char *con_str;    /* 3 chars, the constellation the object is in */
  339. X     char *obj_name;    /* Name of object */
  340. X     char *comment_str;    /* Comment field */
  341. X     char *file_line;    /* The full line from the file,
  342. X               containing the above if it is in
  343. X               standard format */
  344. X     int draw_glyph;    /* Draw object symbol */
  345. X     int draw_text;    /* Draw text */
  346. X     int use_lbl;    /* Label object with the label_field string */
  347. X     int use_name;    /* Label object with the obj_name string */
  348. X     int use_mag;    /* Label object with a 2 or 3 character string
  349. X               containing the magnitude * 10 without
  350. X               decimal point */
  351. X{
  352. X  char magstr[10];
  353. X
  354. X/*fprintf(stderr, "%d %d %f <%s> <%s> <%s> <%s> <%s> <%s> <%s>\n", x, y, mag,
  355. X    type, color_str, label_field, con_str, obj_name, comment_str,
  356. X    file_line);*/
  357. X
  358. X  if (draw_glyph)
  359. X    switch(type[0]) {
  360. X    case 'S':    drawStar(x,y,mag,type[1],color_str);
  361. X      break;
  362. X    case 'P':    drawPlan(x,y,mag,type[1],color_str, size_obj(label_field),
  363. X             comment_str);
  364. X      break;
  365. X    case 'N':    drawNebu(x,y,mag,type[1],color_str, size_obj(label_field));
  366. X      break;
  367. X    case 'G':    drawGalx(x,y,mag,type[1],color_str, size_obj(label_field));
  368. X      break;
  369. X    case 'C':    drawClus(x,y,mag,type[1],color_str, size_obj(label_field));
  370. X      break;
  371. X    case 'U':
  372. X      drawUnknown(x,y,mag,type[1],color_str, size_obj(label_field));
  373. X      break;
  374. X    case 'O':
  375. X      drawOther(x,y,mag,type[1],color_str, size_obj(label_field));
  376. X      break;
  377. X    case 'V':
  378. X    case 'A':
  379. X    case 'I':
  380. X      break;
  381. X    case '#':
  382. X    default:
  383. X      break;
  384. X    };
  385. X
  386. X
  387. X/*
  388. X * use name or label
  389. X */
  390. X  if (draw_text) {
  391. X    if (type[0] == 'I')
  392. X      D_color(color_str);
  393. X    else
  394. X      D_color("  ");
  395. X
  396. X    if (use_name && obj_name[0]) {
  397. X      D_fontsize(NAMESIZE, NAMEFNT);
  398. X      D_text(x+x_nameoffset, y+y_nameoffset, obj_name, FALSE);
  399. X    } else if (use_lbl &&
  400. X           ((label_field[0] != ' ') || (label_field[1] != ' '))) {
  401. X      D_fontsize(LBLSIZE, LBLFNT);
  402. X      D_text(x+x_lbloffset, y+y_lbloffset, label_field, TRUE);
  403. X    }
  404. X/* If you want to mag label other objects, change this */
  405. X    if (use_mag && (type[0] == 'S')) {
  406. X      sprintf(magstr, "%02d", (int)(mag*10.0+0.5));
  407. X      D_fontsize(MAGSIZE, MAGFNT);
  408. X      D_text(x+x_magoffset, y+y_magoffset, magstr, FALSE);
  409. X    }
  410. X  }
  411. X}
  412. X
  413. XdrawStar(x, y, mag, type, color)
  414. X     int x, y;
  415. X     double mag;
  416. X     char type, *color;
  417. X{
  418. X  char *code;
  419. X  double truemag = mag;
  420. X
  421. X/* Not used anymore, all labels are the same size.
  422. X  switch ((int)(mag+0.5))
  423. X    {
  424. X    case -1: D_fontsize(18, CURNTFONT); break;
  425. X    case  0: D_fontsize(18, CURNTFONT); break;
  426. X    case  1: D_fontsize(16, CURNTFONT); break;
  427. X    case  2: D_fontsize(14, CURNTFONT); break;
  428. X    case  3: D_fontsize(12, CURNTFONT); break;
  429. X    case  4: D_fontsize(8, CURNTFONT); break;
  430. X    default: D_fontsize(6, CURNTFONT); break;
  431. X    }
  432. X*/
  433. X
  434. X  if (cur_map_type == THUMBNAIL) mag += thumbshift;
  435. X                /* Shrink stars for thumbnail */
  436. X  else {
  437. X    if (mag < brightest_used) brightest_used = mag;
  438. X    if (mag > faintest_used) faintest_used = mag;
  439. X  }
  440. X
  441. X  if (mag<MAG_BRIGHT) mag = MAG_BRIGHT;
  442. X  if (mag>MAG_DIM) mag = MAG_DIM;
  443. X
  444. X  switch (type)
  445. X    {
  446. X    default:
  447. X    case 'S': code = "s"; break;
  448. X    case 'D': code = "d"; break;
  449. X    case 'V': code = "v"; break;
  450. X    }
  451. X
  452. X  /* Note: this ends current line */
  453. X  D_move(x,y);
  454. X
  455. X  D_color(color);
  456. X  if (use_fine_mag) {
  457. X    /* use fine magnitude scale */
  458. X#ifdef USE_FINE_MACROS
  459. X    if ((mag*10+0.5) < 0)
  460. X      fprintf(outf, "%d %d s%s_%02d\n", x, y, code, - (int) (mag*10+0.5));
  461. X    else
  462. X      fprintf(outf, "%d %d s%s%02d\n", x, y, code, (int) (mag*10+0.5));
  463. X#else
  464. X    fprintf(outf, "%d %d %d %s %% %.2f\n", x, y,
  465. X       mag10sizes[(int) ((mag - MAG_BRIGHT)*10.0)], code, truemag);
  466. X#endif
  467. X  }else {
  468. X    if (mag < -0.5) /* rounded mag is less than 0 */
  469. X      fprintf(outf, "%d %d %s_1\n", x, y, code); /* MAG_BRIGHT == -1 */
  470. X    else
  471. X      fprintf(outf, "%d %d %s%d\n", x, y, code, (int) (mag+0.5));
  472. X  }
  473. X
  474. X  vecstate = S_UNDEF;
  475. X}
  476. X
  477. XdrawPlan(x, y, mag, type, color, plansize, comment_str)
  478. X     int x,y;
  479. X     double mag;
  480. X     char type, *color;
  481. X     long plansize;
  482. X     char *comment_str;
  483. X{
  484. X  int diam;
  485. X  int n;
  486. X  double phase, chi;
  487. X
  488. X  /* Note: this ends current line */
  489. X  D_move(x,y);
  490. X
  491. X  D_color(color);
  492. X  fprintf(outf, "%%diam %.3f\n", (plansize/(3600.*xf_c_scale)+.5));
  493. X  diam = (int) (plansize/(3600.*xf_c_scale)+.5);
  494. X  if (diam < 12*ResPT)
  495. X    diam = 12*ResPT;
  496. X/*
  497. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  498. Xfprintf(outf, "%%size %d\n", plansize);
  499. Xfprintf(outf, "%%points %f\n", plansize/(3600.*xf_c_scale));
  500. Xfprintf(outf, "%%diam %d\n", diam);*/
  501. X
  502. X  switch(type)
  503. X    {
  504. X    case 'A': fprintf(outf, "%d %d %d asteroid\n", x, y, diam); break;
  505. X    case 'C':
  506. X      phase = 45.0;
  507. X      n = sscanf(comment_str, "%lf", &phase);
  508. X      fprintf(outf, "%%phase %f\n", phase);
  509. X      if (cur_win->invert) phase = 180 - phase;
  510. X      fprintf(outf, "%d %d %f %d comet\n", x, y, phase, diam);
  511. X      break;
  512. X
  513. X    case 'S': fprintf(outf, "%d %d %d sun\n", x, y, diam); break;
  514. X    case 'L':
  515. X      phase = 0.0;
  516. X      chi = 90.0;
  517. X      n = sscanf(comment_str, "%lf %lf", &phase, &chi);
  518. X      fprintf(outf, "%%phase: %f chi: %f\n", phase, chi);
  519. X      if (cur_win->invert) chi = 180 - chi;
  520. X      fprintf(outf, "%d %d %d %f %f moon\n", x, y, diam, phase, chi);
  521. X      break;
  522. X
  523. X    case 'M': fprintf(outf, "%d %d %d mercury\n", x, y, diam); break;
  524. X    case 'V': fprintf(outf, "%d %d %d venus\n", x, y, diam); break;
  525. X    case 'm': fprintf(outf, "%d %d %d mars\n", x, y, diam); break;
  526. X    case 'J': fprintf(outf, "%d %d %d jupiter\n", x, y, diam); break;
  527. X    case 's': fprintf(outf, "%d %d %d saturn\n", x, y, diam); break;
  528. X    case 'U': fprintf(outf, "%d %d %d uranus\n", x, y, diam); break;
  529. X    case 'N': fprintf(outf, "%d %d %d neptune\n", x, y, diam); break;
  530. X    case 'P': fprintf(outf, "%d %d %d pluto\n", x, y, diam); break;
  531. X    default:  fprintf(outf, "%d %d %d planet\n", x, y, diam);
  532. X    }
  533. X
  534. X  vecstate = S_UNDEF;
  535. X  D_color("  ");
  536. X}
  537. X
  538. XdrawGalx(x, y, mag, type, color, nebsize)
  539. X     int x,y;
  540. X     double mag;
  541. X     char type, *color;
  542. X     long nebsize;        /* -1 should give default size */
  543. X{
  544. X  int diam;
  545. X
  546. X  /* Note: this ends current line */
  547. X  D_move(x,y);
  548. X  D_color(color);
  549. X
  550. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  551. X  if (diam < 6*ResPT)
  552. X    diam = 6*ResPT;
  553. X/*
  554. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  555. Xfprintf(outf, "%%size %d\n", nebsize);
  556. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  557. Xfprintf(outf, "%%diam %d\n", diam);*/
  558. X
  559. X  switch(type)
  560. X    {
  561. X    case 'a':
  562. X    case 'b':
  563. X    case 'c':
  564. X    case 'd':
  565. X    case 'B':
  566. X    case 'S':
  567. X    case 'O':
  568. X      fprintf(outf, "%d %d %d galaxys\n", x, y, diam);
  569. X      break;
  570. X    case 'Q':
  571. X      fprintf(outf, "%d %d %d galaxyq\n", x, y, diam);
  572. X      break;
  573. X    case 'E':
  574. X    case 'I':
  575. X    case 'G':
  576. X      fprintf(outf, "%d %d %d galaxye\n", x, y, diam);
  577. X      break;
  578. X    default:
  579. X      fprintf(outf, "%d %d %d galaxy\n", x, y, diam);
  580. X    }
  581. X
  582. X  vecstate = S_UNDEF;
  583. X  D_color("  ");
  584. X}
  585. X
  586. XdrawNebu(x, y, mag, type, color, nebsize)
  587. X     int x,y;
  588. X     double mag;
  589. X     char type, *color;
  590. X     long nebsize;        /* -1 should give default size */
  591. X{
  592. X  int diam;
  593. X
  594. X  /* Note: this ends current line */
  595. X  D_move(x,y);
  596. X  D_color(color);
  597. X
  598. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  599. X  if (diam < 6*ResPT)
  600. X    diam = 6*ResPT;
  601. X/*
  602. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  603. Xfprintf(outf, "%%size %d\n", nebsize);
  604. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  605. Xfprintf(outf, "%%diam %d\n", diam);*/
  606. X
  607. X  switch(type)
  608. X    {
  609. X    case 'P': fprintf(outf, "%d %d %d nebulap\n", x, y, diam); break;
  610. X    case 'D': fprintf(outf, "%d %d %d nebulad\n", x, y, diam); break;
  611. X    default:  fprintf(outf, "%d %d %d nebula\n", x, y, diam);
  612. X    }
  613. X
  614. X  vecstate = S_UNDEF;
  615. X  D_color("  ");
  616. X}
  617. X
  618. XdrawClus(x, y, mag, type, color, nebsize)
  619. X     int x,y;
  620. X     double mag;
  621. X     char type, *color;
  622. X     long nebsize;        /* -1 should give default size */
  623. X{
  624. X  int diam;
  625. X
  626. X  /* Note: this ends current line */
  627. X  D_move(x,y);
  628. X  D_color(color);
  629. X
  630. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  631. X  if (diam < 6*ResPT)
  632. X    diam = 6*ResPT;
  633. X/*
  634. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  635. Xfprintf(outf, "%%size %d\n", nebsize);
  636. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  637. Xfprintf(outf, "%%diam %d\n", diam);*/
  638. X  switch(type)
  639. X    {
  640. X    case 'G': fprintf(outf, "%d %d %d clusterg\n", x, y, diam); break;
  641. X    case 'O': fprintf(outf, "%d %d %d clustero\n", x, y, diam); break;
  642. X    default: fprintf(outf, "%d %d %d cluster\n", x, y, diam);
  643. X    }
  644. X
  645. X  vecstate = S_UNDEF;
  646. X  D_color("  ");
  647. X}
  648. X
  649. XdrawUnknown(x, y, mag, type, color, nebsize)
  650. X     int x,y;
  651. X     double mag;
  652. X     char type, *color;
  653. X     long nebsize;        /* -1 should give default size */
  654. X{
  655. X  int diam;
  656. X
  657. X  /* Note: this ends current line */
  658. X  D_move(x,y);
  659. X  D_color(color);
  660. X
  661. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  662. X  if (diam < 6*ResPT)
  663. X    diam = 6*ResPT;
  664. X/*
  665. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  666. Xfprintf(outf, "%%size %d\n", nebsize);
  667. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  668. Xfprintf(outf, "%%diam %d\n", diam);*/
  669. X
  670. X  switch(type)
  671. X    {
  672. X    default:  fprintf(outf, "%d %d %d unknown_u\n", x, y, diam);
  673. X    }
  674. X
  675. X  vecstate = S_UNDEF;
  676. X  D_color("  ");
  677. X}
  678. X
  679. X
  680. XdrawOther(x, y, mag, type, color, nebsize)
  681. X     int x,y;
  682. X     double mag;
  683. X     char type, *color;
  684. X     long nebsize;        /* -1 should give default size */
  685. X{
  686. X  int diam;
  687. X
  688. X  /* Note: this ends current line */
  689. X  D_move(x,y);
  690. X  D_color(color);
  691. X
  692. X  diam = (int) (nebsize/(3600.*xf_c_scale)+.5);
  693. X  if (diam < 6*ResPT)
  694. X    diam = 6*ResPT;
  695. X/*
  696. Xfprintf(outf, "%%xf_c_scale %f\n", xf_c_scale);
  697. Xfprintf(outf, "%%size %d\n", nebsize);
  698. Xfprintf(outf, "%%points %f\n", nebsize/(3600.*xf_c_scale));
  699. Xfprintf(outf, "%%diam %d\n", diam);*/
  700. X  switch(type)
  701. X    {
  702. X    default:  fprintf(outf, "%d %d %d other_o\n", x, y, diam);
  703. X    }
  704. X
  705. X  vecstate = S_UNDEF;
  706. X  D_color("  ");
  707. X}
  708. X
  709. X
  710. X/* Want three legend columns, in 10 rows, with a title and subtitle above:
  711. Xtitle
  712. Xsubtitle (ra, dec, lim)
  713. X
  714. X    -1                0                1
  715. X     2                3                4
  716. X     5                6                7
  717. X     8                9               10
  718. X     double           variable
  719. X     planet           asteroid        comet
  720. X     cluster          globular        open
  721. X     nebula           planetary       diffuse
  722. X     galaxy           elliptical      spiral
  723. X     unknown          other           quasar
  724. X
  725. Xstar columns x coordinates are at star_x_col[];
  726. Xstar row y coordinates are star_y_row[];
  727. Xother at oth_x_col[] and oth_y_row[];
  728. X
  729. Xtitle and subtitle coordinates are defined by L_TIL_{X,Y} and L_STIL_{X,Y}
  730. XLabels are placed as in drawobj().
  731. X
  732. Xfor fullpage map, only the title and subtitle are displayed, on one line. */
  733. X
  734. Xstatic int star_x_col[] = {
  735. X  36*ResPT,
  736. X  108*ResPT,
  737. X  180*ResPT,
  738. X  36*ResPT,
  739. X  108*ResPT,
  740. X  180*ResPT,
  741. X  36*ResPT,
  742. X  108*ResPT,
  743. X  180*ResPT,
  744. X  36*ResPT,
  745. X  108*ResPT,
  746. X  180*ResPT,
  747. X  36*ResPT,
  748. X  108*ResPT,
  749. X  180*ResPT};
  750. X
  751. Xstatic int oth_x_col[] = {
  752. X  36*ResPT,
  753. X  108*ResPT,
  754. X  180*ResPT,
  755. X  36*ResPT,
  756. X  108*ResPT,
  757. X  180*ResPT,
  758. X  36*ResPT,
  759. X  108*ResPT,
  760. X  180*ResPT,
  761. X  36*ResPT,
  762. X  108*ResPT,
  763. X  180*ResPT,
  764. X  36*ResPT,
  765. X  108*ResPT,
  766. X  180*ResPT};
  767. X
  768. X
  769. X#define L_TIL_X 36*ResPT
  770. X#define L_TIL_Y 180*ResPT
  771. X#define L_STIL_X 36*ResPT
  772. X#define L_STIL_Y (L_TIL_Y - 18*ResPT)
  773. X
  774. X/* (let ((i 0))
  775. X  (while (< i 10)
  776. X    (princ (format "\n  %d*ResPT," (+ 36 (* (- 9 i) 12))))
  777. X    (setq i (1+ i)))
  778. X    nil) */
  779. X
  780. Xstatic int star_y_row[] = {
  781. X  144*ResPT,
  782. X  144*ResPT,
  783. X  144*ResPT,
  784. X  132*ResPT,
  785. X  132*ResPT,
  786. X  132*ResPT,
  787. X  120*ResPT,
  788. X  120*ResPT,
  789. X  120*ResPT,
  790. X  108*ResPT,
  791. X  108*ResPT,
  792. X  108*ResPT,
  793. X  96*ResPT,
  794. X  96*ResPT,
  795. X  96*ResPT
  796. X};
  797. X
  798. Xstatic int oth_y_row[] = {
  799. X  84*ResPT,
  800. X  84*ResPT,
  801. X  84*ResPT,
  802. X  72*ResPT,
  803. X  72*ResPT,
  804. X  72*ResPT,
  805. X  60*ResPT,
  806. X  60*ResPT,
  807. X  60*ResPT,
  808. X  48*ResPT,
  809. X  48*ResPT,
  810. X  48*ResPT,
  811. X  36*ResPT,
  812. X  36*ResPT,
  813. X  36*ResPT};
  814. X
  815. Xstatic int starmags[12];
  816. Xstatic int magbright, magfaint;
  817. X#define L_X_FULLPAGE_CAPT 18*ResPT
  818. X#define L_Y_FULLPAGE_CAPT 25*ResPT
  819. X
  820. Xchartlegend(win)
  821. X     mapwindow *win;
  822. X{
  823. X  char ras[20], dls[20], outstr[40], magstr[20];
  824. X  int i, j, xcen, ycen;
  825. X  int nummags;
  826. X
  827. X  if (!title[0]) title = "LEGEND";
  828. X  rastr(ras, win->racen);
  829. X  declstr(dls, win->dlcen);
  830. X
  831. X  if (win->map_type != FULLPAGEMAP) {
  832. X    sprintf(outstr, "(%s,%s lim: %2.1f)", ras, dls, win->maglim);
  833. X    D_fontsize(TITLESIZE, TITLEFNT); D_text(L_TIL_X, L_TIL_Y, title, FALSE);
  834. X    D_fontsize(SUBTLSIZE, SUBTLFNT); D_text(L_STIL_X, L_STIL_Y, outstr, FALSE);
  835. X
  836. X    D_fontsize(10, NAMEFNT);
  837. X
  838. X    /* set magnitudes in legend */
  839. X
  840. X    if (brightest_used > faintest_used) {
  841. X      brightest_used = 0.0;
  842. X      faintest_used = 10.0;
  843. X    }
  844. X
  845. X    magbright = brightest_used - 0.5;
  846. X    magfaint = faintest_used + 0.5;
  847. X    if (magfaint > MAG_DIM) magfaint = MAG_DIM;
  848. X    if (magbright < MAG_BRIGHT) magbright = MAG_BRIGHT;
  849. X    if (magbright < (magfaint - 11)) magbright = (magfaint - 11);
  850. X    nummags = magfaint - magbright + 1;
  851. X    for (i = magbright; i <= magfaint; i++) {
  852. X      starmags[i-magbright] = i;
  853. X    }
  854. X
  855. X    for (i = 0; i < nummags; i++) {
  856. X      drawStar(star_x_col[i], star_y_row[i], (double) starmags[i], 'S', "  ");
  857. X      sprintf(magstr, " %d", starmags[i]);
  858. X      D_text(star_x_col[i]+x_nameoffset, star_y_row[i]+y_nameoffset,
  859. X         magstr, FALSE);
  860. X    }
  861. X
  862. X    drawStar(star_x_col[13], star_y_row[13],
  863. X         ((magbright+magfaint)/2.0),
  864. X         'D', "  ");
  865. X    D_text(star_x_col[13]+x_nameoffset, star_y_row[13]+y_nameoffset,
  866. X       "double", FALSE);
  867. X
  868. X    drawStar(star_x_col[14], star_y_row[14],
  869. X         ((magbright+magfaint)/2.0),
  870. X         'V', "  ");
  871. X    D_text(star_x_col[14]+x_nameoffset, star_y_row[14]+y_nameoffset,
  872. X       "variable", FALSE);
  873. X
  874. X
  875. X
  876. X    i = 0;
  877. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1, "");
  878. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  879. X       "Planet", FALSE);
  880. X    i++;
  881. X
  882. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'A', "  ", (long) -1, "");
  883. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  884. X       "Asteroid", FALSE);
  885. X    i++;
  886. X
  887. X    drawPlan(oth_x_col[i], oth_y_row[i], 1.0, 'C', "  ", (long) -1, "");
  888. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  889. X       "Comet", FALSE);
  890. X    i++;
  891. X
  892. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  893. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  894. X       "Cluster", FALSE);
  895. X    i++;
  896. X
  897. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'G', "  ", (long) -1);
  898. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  899. X       "Globular", FALSE);
  900. X    i++;
  901. X
  902. X    drawClus(oth_x_col[i], oth_y_row[i], 1.0, 'O', "  ", (long) -1);
  903. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  904. X       "Open", FALSE);
  905. X    i++;
  906. X
  907. X
  908. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  909. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  910. X       "Nebula", FALSE);
  911. X    i++;
  912. X
  913. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'P', "  ", (long) -1);
  914. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  915. X       "Planetary", FALSE);
  916. X    i++;
  917. X
  918. X    drawNebu(oth_x_col[i], oth_y_row[i], 1.0, 'D', "  ", (long) -1);
  919. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  920. X       "Diffuse", FALSE);
  921. X    i++;
  922. X
  923. X
  924. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  925. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  926. X       "Galaxy", FALSE);
  927. X    i++;
  928. X
  929. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'E', "  ", (long) -1);
  930. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  931. X       "Elliptical", FALSE);
  932. X    i++;
  933. X
  934. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'S', "  ", (long) -1);
  935. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  936. X       "Spiral", FALSE);
  937. X    i++;
  938. X
  939. X
  940. X    drawUnknown(oth_x_col[i], oth_y_row[i], 1.0, 'u', "  ", (long) -1);
  941. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  942. X       "Unknown", FALSE);
  943. X    i++;
  944. X
  945. X    drawOther(oth_x_col[i], oth_y_row[i], 1.0, 'o', "  ", (long) -1);
  946. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  947. X       "Other", FALSE);
  948. X    i++;
  949. X
  950. X    drawGalx(oth_x_col[i], oth_y_row[i], 1.0, 'Q', "  ", (long) -1);
  951. X    D_text(oth_x_col[i]+x_nameoffset, oth_y_row[i]+y_nameoffset,
  952. X       "Quasar", FALSE);
  953. X    i++;
  954. X
  955. X    /* Notebook mode */
  956. X#define NOTE_LEFT_COL 306
  957. X#define NOTE_RIGHT_COL 486
  958. X#define NOTE_TOP_ROW 144
  959. X#define NOTE_ROW_SPACE 14*ResPT
  960. X    i = 0;
  961. X    if (notebook_mode) {
  962. X      /* draw views */
  963. X      out("gsave");
  964. X      out("1 setlinewidth 2 setlinecap");
  965. X      out("[] 0 setdash 0 setgray");
  966. X      xcen = win->width/2 + win->x_offset;
  967. X      ycen = win->height/2 + win->y_offset;
  968. X      for (j = 0; j< numviews; j++) {
  969. X    fprintf(outf, "    newpath %d %d %f 0 360 arc stroke\n",
  970. X           xcen, ycen, viewrad[j]/win->c_scale);
  971. X      };
  972. Xout("grestore");
  973. X      out("12 /Helvetica fontsz");
  974. X      out("/rjust { dup stringwidth pop neg 0 rmoveto show} def");
  975. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  976. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  977. X      out("(Date:) rjust");
  978. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  979. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  980. X      out("(Time:) rjust");
  981. X      i++;
  982. X
  983. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  984. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  985. X      out("(Object Altitude:) rjust");
  986. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  987. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  988. X      out("() rjust");
  989. X      i++;
  990. X
  991. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  992. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  993. X      out("(Instrument:) rjust");
  994. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  995. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  996. X      out("() rjust");
  997. X      i++;
  998. X
  999. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1000. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1001. X      out("(Eyepiece:) rjust");
  1002. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1003. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1004. X      out("(Filter:) rjust");
  1005. X      i++;
  1006. X
  1007. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1008. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1009. X      out("(Site:) rjust");
  1010. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1011. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1012. X      out("() rjust");
  1013. X      i++;
  1014. X
  1015. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1016. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1017. X      out("(Seeing:) rjust");
  1018. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1019. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1020. X      out("(Transparency:) rjust");
  1021. X      i++;
  1022. X
  1023. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1024. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1025. X      out("(Darkness:) rjust");
  1026. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1027. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1028. X      out("(Magnitude limit:) rjust");
  1029. X      i++;
  1030. X
  1031. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1032. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1033. X      out("(Wind:) rjust");
  1034. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1035. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1036. X      out("() rjust");
  1037. X      i++;
  1038. X
  1039. X      fprintf(outf, "%d %d mt", NOTE_LEFT_COL*ResPT,
  1040. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1041. X      out("(Temperature:) rjust");
  1042. X      fprintf(outf, "%d %d mt", NOTE_RIGHT_COL*ResPT,
  1043. X         NOTE_TOP_ROW*ResPT - i*NOTE_ROW_SPACE);
  1044. X      out("(Dew:) rjust");
  1045. X      i++;
  1046. X    };
  1047. X
  1048. X  } else {
  1049. X    D_fontsize(8, NAMEFNT);
  1050. X    sprintf(outstr, "%s: %s,%s lim: %2.1f", title, ras, dls, win->maglim);
  1051. X    D_text(L_X_FULLPAGE_CAPT, L_Y_FULLPAGE_CAPT, outstr, FALSE);
  1052. X  }
  1053. X}
  1054. X
  1055. X
  1056. X
  1057. END_OF_FILE
  1058. if test 29553 -ne `wc -c <'starchart/spo.c.ab'`; then
  1059.     echo shar: \"'starchart/spo.c.ab'\" unpacked with wrong size!
  1060. fi
  1061. # end of 'starchart/spo.c.ab'
  1062. fi
  1063. echo shar: End of archive 16 \(of 32\).
  1064. cp /dev/null ark16isdone
  1065. MISSING=""
  1066. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ; do
  1067.     if test ! -f ark${I}isdone ; then
  1068.     MISSING="${MISSING} ${I}"
  1069.     fi
  1070. done
  1071. if test "${MISSING}" = "" ; then
  1072.     echo You have unpacked all 32 archives.
  1073.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1074. else
  1075.     echo You still need to unpack the following archives:
  1076.     echo "        " ${MISSING}
  1077. fi
  1078. ##  End of shell archive.
  1079. exit 0
  1080.  
  1081.  
  1082.