home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / sfs / part21 < prev    next >
Encoding:
Text File  |  1991-12-27  |  51.1 KB  |  1,752 lines

  1. Newsgroups: comp.sources.misc
  2. From: tcamp@hercules.acpub.duke.edu (Ted Campbell)
  3. Subject:  v27i021:  sfs - Space Flight Simulator, Part21/21
  4. Message-ID: <1991Dec24.192043.21341@sparky.imd.sterling.com>
  5. X-Md4-Signature: 015902acfffc307fa654290260b4b496
  6. Date: Tue, 24 Dec 1991 19:20:43 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: tcamp@hercules.acpub.duke.edu (Ted Campbell)
  10. Posting-number: Volume 27, Issue 21
  11. Archive-name: sfs/part21
  12. Environment: IBMPC && EGA/VGA, UNIX-PC && MGR, UNIX && X11
  13.  
  14. #!/bin/sh
  15. # do not concatenate these parts, unpack them in order with /bin/sh
  16. # file sfs/sfs/sfsx.c continued
  17. #
  18. if test ! -r _shar_seq_.tmp; then
  19.     echo 'Please unpack part 1 first!'
  20.     exit 1
  21. fi
  22. (read Scheck
  23.  if test "$Scheck" != 21; then
  24.     echo Please unpack part "$Scheck" next!
  25.     exit 1
  26.  else
  27.     exit 0
  28.  fi
  29. ) < _shar_seq_.tmp || exit 1
  30. if test ! -f _shar_wnt_.tmp; then
  31.     echo 'x - still skipping sfs/sfs/sfsx.c'
  32. else
  33. echo 'x - continuing file sfs/sfs/sfsx.c'
  34. sed 's/^X//' << 'SHAR_EOF' >> 'sfs/sfs/sfsx.c' &&
  35. X   int display;
  36. X   int n;
  37. X   double lat, lon;
  38. X   double radius, distance;
  39. X   long int orbit_n;
  40. X   struct sfs_orbit **sorbit_array;
  41. X   {
  42. X
  43. X   sprintf( sfsx_tbuf, "sfsx_test() display %d, n %d, orbit_n %ld",
  44. X      display, n, orbit_n );
  45. X   bw_debug( sfsx_tbuf );
  46. X   sprintf( sfsx_tbuf, "sfsx_test() lat %.1lf lon %.1lf, rad %.1lf dis %.1lf",
  47. X      lat, lon,
  48. X      radius, distance );
  49. X   bw_debug( sfsx_tbuf );
  50. X   sprintf( sfsx_tbuf, "sfsx_test() focal radius %.1lf",
  51. X      sorbit_array[ 0 ]->aorbit->focus->radius );
  52. X   bw_debug( sfsx_tbuf );
  53. X   }
  54. #endif
  55. X
  56. /****************************************************************
  57. X
  58. X    sfsx_update()          Update Simulation Display
  59. X
  60. ****************************************************************/
  61. X
  62. sfsx_update( n_orbits,
  63. X   sorbit_array, x_displays, n_displays, newtime, 
  64. X   zoom, d_zoom, d_upper, d_lower )
  65. X   int n_orbits;
  66. X   struct sfs_orbit **sorbit_array;
  67. X   struct sfs_display **x_displays;
  68. X   int n_displays;
  69. X   long newtime;
  70. X   int zoom, d_zoom, d_upper, d_lower;
  71. X   {
  72. X   static int redraw = TRUE;            /* redraw Ground Track? */
  73. X   static int old_zoom = 0xff;
  74. X   static int old_zd = 0xff;
  75. X   static int old_ud = 0xff;
  76. X   static int old_ld = 0xff;
  77. X
  78. #ifdef  OLD_DEBUG
  79. X   sprintf( sfsx_tbuf, "sfsx_update() display %d, n %d, orbit_n %ld",
  80. X      display, n, orbit_n );
  81. X   bw_debug( sfsx_tbuf );
  82. X   sprintf( sfsx_tbuf, "sfsx_update() lat %.1lf lon %.1lf, rad %.1lf dis %.1lf",
  83. X      lat, lon,
  84. X      radius, distance );
  85. X   bw_debug( sfsx_tbuf );
  86. X   sprintf( sfsx_tbuf, "sfsx_update() focal radius %.1lf",
  87. X      sorbit_array[ 0 ]->aorbit->focus->radius );
  88. X   bw_debug( sfsx_tbuf );
  89. X   return TRUE;
  90. #endif
  91. X
  92. #ifdef  OLD_DEBUG
  93. X   if ( distance == 0.0 )
  94. X      {
  95. X      sprintf( sfsx_tbuf, "[pr: sfsx_update() received distance = %.2lf",
  96. X     distance );
  97. X      bw_error( sfsx_tbuf );
  98. X      return;
  99. X      }
  100. X   if ( radius == 0.0 )
  101. X      {
  102. X      sprintf( sfsx_tbuf, "[pr: sfsx_update() received radius = %.2lf",
  103. X     radius );
  104. X      bw_error( sfsx_tbuf );
  105. X      return;
  106. X      }
  107. #endif
  108. X
  109. #ifdef  OLD_DEBUG
  110. X   bw_message( "DEBUG: update control panel..." );
  111. #endif
  112. X
  113. X   /***  Update timing panel */
  114. X
  115. X   cp_sti();
  116. X
  117. X   /***  Call the appropriate display routine */
  118. X
  119. X   if ( zoom == TRUE )
  120. X      {
  121. X      if ( ( zoom != old_zoom ) || ( d_zoom != old_zd )) /* Redraw the screen(s)? */
  122. X         {
  123. X     cp_lwin( &z_window, "  " );
  124. X         old_zoom = zoom;
  125. X     old_zd = d_zoom;
  126. X     e_wind = z_window;
  127. X     redraw = TRUE;
  128. X         }
  129. X      sfsx_draw( z_window, sorbit_array, x_displays, d_zoom, n_orbits,
  130. X     newtime, redraw );
  131. X      redraw = FALSE;
  132. X      }
  133. X   else
  134. X      {
  135. X      if ( zoom != old_zoom ) /* Redraw the screen(s)? */
  136. X     {
  137. X     ui_fbox( fo_window->u_x1, fo_window->u_y1,
  138. X        fo_window->u_x2, fo_window->u_y2, BLACK, SOLID );
  139. X     cp_twin( &t_window, " " );
  140. X     old_ud = d_upper;
  141. X     cp_bwin( &b_window, " " );
  142. X     old_ld = d_lower;
  143. X     old_zoom = zoom;
  144. X     e_wind = t_window;
  145. X     redraw = TRUE;
  146. X     }
  147. X      else if ( d_upper != old_ud )
  148. X     {
  149. X     cp_twin( &t_window, " " );
  150. X     old_ud = d_upper;
  151. X     redraw = TRUE;
  152. X     }
  153. X      else if ( d_lower != old_ld )
  154. X     {
  155. X     cp_bwin( &b_window, " " );
  156. X     old_ld = d_lower;
  157. X     redraw = TRUE;
  158. X     }
  159. X      sfsx_draw( t_window, sorbit_array, x_displays, d_upper, n_orbits,
  160. X     newtime, redraw );
  161. X      sfsx_draw( b_window, sorbit_array, x_displays, d_lower, n_orbits,
  162. X     newtime, redraw );
  163. X      redraw = FALSE;
  164. X      }
  165. X   }
  166. X
  167. /****************************************************************
  168. X
  169. X    sfsx_draw()           draw display in a single window
  170. X
  171. ****************************************************************/
  172. X
  173. sfsx_draw( uiwind, sorbit_array, x_displays, display, n_orbits, newtime, redraw )
  174. X   struct uiwindow *uiwind;
  175. X   struct sfs_orbit **sorbit_array;
  176. X   struct sfs_display **x_displays;
  177. X   int display, n_orbits;
  178. X   long newtime;
  179. X   int redraw;
  180. X   {
  181. X   int orbit;
  182. X
  183. X   orbit = x_displays[ display ]->orbit;
  184. X
  185. X   switch( x_displays[ display ]->type )
  186. X      {
  187. X      case SFSD_VISUAL:
  188. X     vi_draw( uiwind, sorbit_array[ orbit ]->aorbit->focus,
  189. X        x_displays[ display ]->elements,
  190. X        &(sorbit_array[ orbit ]->g_start),
  191. X        &(sorbit_array[ orbit ]->g_end),
  192. X        &(sorbit_array[ orbit ]->s_start),
  193. X        &(sorbit_array[ orbit ]->s_end),
  194. X        &(sorbit_array[ orbit ]->o_start),
  195. X        &(sorbit_array[ orbit ]->o_end),
  196. X        sorbit_array[ orbit ]->aorbit->focus->radius,
  197. X        (double) sorbit_array[ orbit ]->ssp_r,
  198. X        sorbit_array, orbit );
  199. X     break;
  200. X      case SFSD_GROUND:
  201. #ifdef  OLD_DEBUG
  202. X     sprintf( sfsx_tbuf, "sfsx_draw() received redraw %d", redraw );
  203. X     bw_debug( sfsx_tbuf );
  204. #endif
  205. X     gt_draw( x_displays[ display ], uiwind,
  206. X        sorbit_array[ orbit ]->aorbit->focus,
  207. X        x_displays[ display ]->elements, redraw,
  208. X        &(sorbit_array[ orbit ]->s_start),
  209. X        &(sorbit_array[ orbit ]->s_end),
  210. X        sorbit_array, n_orbits );
  211. X     break;
  212. X      case SFSD_PERSP:
  213. X     pe_draw( uiwind, sorbit_array[ orbit ]->aorbit->focus,
  214. X        sorbit_array, n_orbits,
  215. X        &(sorbit_array[ orbit ]->o_start),
  216. X        &(sorbit_array[ orbit ]->o_end), newtime, 
  217. X            x_displays[ display ]->elements );
  218. X     break;
  219. X      default:
  220. #ifdef  DEBUG
  221. X     sprintf( sfsx_tbuf, "sfsx_draw() received display %d", display );
  222. X     bw_error( sfsx_tbuf );
  223. #endif
  224. X     return BW_ERROR;
  225. X     break;
  226. X      }
  227. X   }
  228. X
  229. /****************************************************************
  230. X
  231. X    sfsx_sigint()           Interrupt signal handler
  232. X
  233. ****************************************************************/
  234. X
  235. sfsx_sigint()
  236. X   {
  237. X   sfs_exit();
  238. X   exit( 0 );
  239. X   }
  240. X
  241. /****************************************************************
  242. X
  243. X    sfsx_curel()           Return current elements to poll
  244. X
  245. ****************************************************************/
  246. X
  247. int *
  248. sfsx_curel()
  249. X   {
  250. X   if ( x_zoom == TRUE )
  251. X      {
  252. X      return &( x_displays[ d_zoom ]->elements );
  253. X      }
  254. X   else
  255. X      {
  256. X      return &( x_displays[ d_upper ]->elements );
  257. X      }
  258. X   }
  259. X
  260. /****************************************************************
  261. X
  262. X    ui_poll()               Null poll for ui compatibility
  263. X
  264. ****************************************************************/
  265. X
  266. ui_poll()
  267. X   {
  268. X   ;
  269. X   }
  270. X
  271. SHAR_EOF
  272. echo 'File sfs/sfs/sfsx.c is complete' &&
  273. chmod 0644 sfs/sfs/sfsx.c ||
  274. echo 'restore of sfs/sfs/sfsx.c failed'
  275. Wc_c="`wc -c < 'sfs/sfs/sfsx.c'`"
  276. test 26740 -eq "$Wc_c" ||
  277.     echo 'sfs/sfs/sfsx.c: original size 26740, current size' "$Wc_c"
  278. rm -f _shar_wnt_.tmp
  279. fi
  280. # ============= sfs/sfs/sfsx.h ==============
  281. if test -f 'sfs/sfs/sfsx.h' -a X"$1" != X"-c"; then
  282.     echo 'x - skipping sfs/sfs/sfsx.h (File already exists)'
  283.     rm -f _shar_wnt_.tmp
  284. else
  285. > _shar_wnt_.tmp
  286. echo 'x - extracting sfs/sfs/sfsx.h (Text)'
  287. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx.h' &&
  288. /***************************************************************
  289. X
  290. X    sfsx.h          General header file for
  291. X            Space Flight Simulator,
  292. X            Simulation Module
  293. X
  294. X            Copyright (c) 1991, Ted A. Campbell
  295. X
  296. X            Bywater Software
  297. X            P. O. Box 4023 
  298. X            Duke Station 
  299. X            Durham, NC  27706
  300. X
  301. X            email: tcamp@hercules.acpub.duke.edu
  302. X
  303. X    Copyright and Permissions Information:
  304. X
  305. X    All U.S. and international copyrights are claimed by the
  306. X    author. The author grants permission to use this code
  307. X    and software based on it under the following conditions:
  308. X    (a) in general, the code and software based upon it may be 
  309. X    used by individuals and by non-profit organizations; (b) it
  310. X    may also be utilized by governmental agencies in any country,
  311. X    with the exception of military agencies; (c) the code and/or
  312. X    software based upon it may not be sold for a profit without
  313. X    an explicit and specific permission from the author, except
  314. X    that a minimal fee may be charged for media on which it is
  315. X    copied, and for copying and handling; (d) the code must be 
  316. X    distributed in the form in which it has been released by the
  317. X    author; and (e) the code and software based upon it may not 
  318. X    be used for illegal activities. 
  319. X
  320. ***************************************************************/
  321. X
  322. /***    Include Files */
  323. X
  324. #include "bw.h"         /* header for generic Bywater handlers */
  325. #include "as.h"         /* header for astronomy routines */
  326. #include "gr.h"         /* header for graphics routines */
  327. #include "dr.h"         /* header for directory routines */
  328. #include "ui.h"         /* header for user interface routines */
  329. #include "sfs.h"        /* header for sfs specific information */
  330. X
  331. /***    Program-specific definitions */
  332. X
  333. #ifndef SFSX
  334. #define SFSX
  335. #endif
  336. X
  337. #define sfsx_   X       /* This will allow us to use longer names */
  338. X
  339. #define    EL_EPOCH    315532800    /* Epoch for calculating elapsed
  340. X                       time, = 1980/01/01 00:00:00     */
  341. #define FT_POINTS       64              /* Points in forward track buffer */
  342. #define GT_POINTS       512             /* Size of ground track buffer  */
  343. #define PE_POINTS       64              /* Size of Perspective buffer   */
  344. #define EM_TITLES       6               /* Titles in Escape Menu */
  345. X
  346. /***************************************************************
  347. X
  348. X    language-specific definitions
  349. X
  350. X    English is taken as a default, and if SFSXNAME
  351. X    has not been defined, the English definitions will be
  352. X    utilized. To translate into other languages, we suggest
  353. X    that the following section be copied, a language name
  354. X    defined as one, and then each of the definitions rendered
  355. X    into the language. Example:
  356. X
  357. X    ;#define        LATIN   1
  358. X    ;
  359. X    ;
  360. X    ;#if    LATIN
  361. X    ;#define        SFSXNAME        " Pars in Astronautica Simulanda "
  362. X    ;......etc.
  363. X    ;#endif
  364. X
  365. X    SFSXNAME will then be defined, and the English language
  366. X    tags will not be called.
  367. X
  368. ***************************************************************/
  369. X
  370. #ifndef SFSXNAME
  371. #define SFSXNAME        " Simulation Module "
  372. #define SFSX_TITLE      "SFS ver. %s, Orbital Simulation"
  373. #define SFSX_PROG       "Program: "
  374. #define SFSX_TIME       "Timing: "
  375. #define SFSX_SYS        "System: "
  376. #define ESCTITLE        " Escape Options "
  377. #define EXITTITLE       " Exit to Main SFS Menu"
  378. #define ABORTTITLE      " Leave SFS Completely"
  379. #define ZOOMTITLE       " Set and Activate Zoom Window"
  380. #define UPPERTITLE      " Set and Activate Upper Window"
  381. #define LOWERTITLE      " Set and Activate Lower Window"
  382. #define SYSTITLE        " Set System Parameters"
  383. #define VISSIM          " Visual Simulation Display "
  384. #define GTRACK          " Ground Track Display "
  385. #define DPERSP          " Distant Perspective Display "
  386. #define ERR_GRINIT      "Failed to intialize graphics system\n"
  387. #define MEMERR_ESC      "Cannot allocate memory for ESCAPE Menu "
  388. #define SFSX_PRERR      "Error in interpretation of program file <%s>"
  389. #define SFSX_INIT       "Please Wait: Initializing"
  390. #define SFSX_HELP       "Press ESC or Click Here for Menu"
  391. #define CALCSD          "Calculating surface data points for orbit %d"
  392. #define CALCGR          "Calculating grid data points for orbit %d"
  393. #define CALCORB         "Calculating orb data points for orbit %d"
  394. #define SFSX_WAIT       "Waiting for time lapse"
  395. #define ERR_CHAIN       "Failed to open chain file.\n"
  396. #define SFSX_MM         "Escape Menu:  Select a Menu Item"
  397. #define SFSX_MET        "MET"
  398. #define SFSX_DAYS       "day(s)"
  399. #define ERR_PROMPT      "ERROR:  %s; Do you want to continue? "
  400. #define ERRP_NO         "N - ABORT"
  401. #define ERRP_YES        "Y - Continue"
  402. #define ERR_MATH        "Mathematics error, %s"
  403. #define SSP_TITLE       "Set System Parameters"
  404. #define MEMERR_SSP      "Cannot allocate memory for System Parameters Menu "
  405. #define SSP_TF          " Time Factor [%ld x real time]"
  406. #define SSP_UI          " Screen Update Interval [%ld seconds]"
  407. #define SSP_TPL         " Trig Precision Level [%d]"
  408. #define SSP_EXIT        " Return to Program"
  409. #endif
  410. X
  411. /***    Declaration of external data and routines */
  412. X
  413. extern  long sfsx_getmet();
  414. X
  415. extern struct spj_pt spd_start, spd_end;        /* surface data pointers */
  416. extern struct spj_pt gr_start, gr_end;          /* grid data pointers */
  417. extern struct spj_pt pd_start, pd_end;          /* point data pointers */
  418. extern struct spj_pt or_start, or_end;          /* orb data pointers */
  419. X
  420. extern struct as_focus sfsx_focus;              /* orbital focus structure */
  421. extern char sfsx_gridfile[ 32 ];                /* grid spd file */
  422. extern long sfsx_epoch;                         /* Orbital epoch in seconds since begining */
  423. extern int sfsx_display;        /* Screen:  0 = visual simulation in top   */
  424. X                /*          1 = distant perspective in top */
  425. X                /*          2 = zoom (full) visual         */
  426. X
  427. extern struct sfs_orbit *sfsx_orbits[ ORBITS ];
  428. X                /* Structures for orbital data */
  429. extern  char    sfsx_tbuf[ 256 ];
  430. X
  431. extern    char    fdfile[ 45 ];
  432. extern  int     cell_width, char_width, cell_height, char_height;
  433. extern  int     al_hor, al_vert;
  434. extern  long    sfsx_dp;
  435. extern  long    or_aa, or_ap;
  436. X
  437. extern  int     gt_color;       /* Color for ground track plot          */
  438. X
  439. extern  char    pr_name[ 128 ];
  440. X
  441. extern struct   uiwindow *main_window;          /* structure for main window    */
  442. extern struct   uiwindow *po_window;            /* structure for focus panel    */
  443. extern struct   uiwindow *ti_window;            /* structure for relation window */
  444. extern struct   uiwindow *sy_window;            /* structure for timing window  */
  445. extern struct   uiwindow *cp_window;            /* structure for control panel box */
  446. extern struct   uiwindow *fo_window;            /* structure for focus window   */
  447. extern struct   uiwindow *z_window;             /* structure for zoom window   */
  448. extern  struct  uiwindow *t_window;             /* top window */
  449. extern  struct  uiwindow *b_window;             /* bottom window */
  450. X
  451. extern int      help_y1;                        /* line for help display      */
  452. extern int      help_y2;                        /* top of help display        */
  453. extern int      help_x1;                        /* column for help display    */
  454. extern int      help_x2;                        /* max col for help display   */
  455. X
  456. SHAR_EOF
  457. chmod 0644 sfs/sfs/sfsx.h ||
  458. echo 'restore of sfs/sfs/sfsx.h failed'
  459. Wc_c="`wc -c < 'sfs/sfs/sfsx.h'`"
  460. test 7157 -eq "$Wc_c" ||
  461.     echo 'sfs/sfs/sfsx.h: original size 7157, current size' "$Wc_c"
  462. rm -f _shar_wnt_.tmp
  463. fi
  464. # ============= sfs/sfs/sfsx.mak ==============
  465. if test -f 'sfs/sfs/sfsx.mak' -a X"$1" != X"-c"; then
  466.     echo 'x - skipping sfs/sfs/sfsx.mak (File already exists)'
  467.     rm -f _shar_wnt_.tmp
  468. else
  469. > _shar_wnt_.tmp
  470. echo 'x - extracting sfs/sfs/sfsx.mak (Text)'
  471. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx.mak' &&
  472. PROJ    =SFSX
  473. DEBUG    =0
  474. CC    =qcl
  475. CFLAGS_G        = /AL /W1 /Ze /DDEBUG /I..\..\include
  476. CFLAGS_D    = /Zi /Zr /Gi$(PROJ).mdt /Od 
  477. CFLAGS_R    = /O /Ot /DNDEBUG 
  478. CFLAGS    =$(CFLAGS_G) $(CFLAGS_R)
  479. LFLAGS_G    = /CP:0xffff /NOI /NOE /SE:0x80 /ST:0x1000 
  480. LFLAGS_D    = /CO /M /INCR 
  481. LFLAGS_R    = 
  482. LFLAGS    =$(LFLAGS_G) $(LFLAGS_R)
  483. RUNFLAGS    =
  484. OBJS_EXT =      ..\..\lib\dr_ibmpc.obj ..\..\lib\gr_ibmpc.obj ..\..\lib\kb_ibmpc.obj ..\..\lib\ui_boxes.obj ..\..\lib\ui_pbm.obj \
  485. X    ..\..\lib\ui_dial.obj ..\..\lib\ui_gets.obj ..\..\lib\ui_init.obj ..\..\lib\ui_list.obj ..\..\lib\ui_text.obj
  486. LIBS_EXT =     
  487. X
  488. all:    $(PROJ).exe
  489. X
  490. sfsx_cp.obj:    sfsx_cp.c
  491. X
  492. sfsx_sp.obj:    sfsx_sp.c
  493. X
  494. sfsx_var.obj:    sfsx_var.c
  495. X
  496. as_orbit.obj:    ..\as\as_orbit.c
  497. X
  498. as_vpt.obj:    ..\as\as_vpt.c
  499. X
  500. as_spj.obj:    ..\as\as_spj.c
  501. X
  502. sfsx.obj:    sfsx.c
  503. X
  504. as_focus.obj:    ..\as\as_focus.c
  505. X
  506. sfs_ft.obj:    sfs_ft.c
  507. X
  508. sfs_gt.obj:    sfs_gt.c
  509. X
  510. sfs_pe.obj:    sfs_pe.c
  511. X
  512. sfs_pr.obj:    sfs_pr.c
  513. X
  514. sfs_vi.obj:    sfs_vi.c
  515. X
  516. sfs_di.obj:    sfs_di.c
  517. X
  518. $(PROJ).exe:    sfsx_cp.obj sfsx_sp.obj sfsx_var.obj as_orbit.obj as_vpt.obj as_spj.obj \
  519. X    sfsx.obj as_focus.obj sfs_ft.obj sfs_gt.obj sfs_pe.obj sfs_pr.obj sfs_vi.obj sfs_di.obj $(OBJS_EXT)
  520. X    echo >NUL @<<$(PROJ).crf
  521. sfsx_cp.obj +
  522. sfsx_sp.obj +
  523. sfsx_var.obj +
  524. as_orbit.obj +
  525. as_vpt.obj +
  526. as_spj.obj +
  527. sfsx.obj +
  528. as_focus.obj +
  529. sfs_ft.obj +
  530. sfs_gt.obj +
  531. sfs_pe.obj +
  532. sfs_pr.obj +
  533. sfs_vi.obj +
  534. sfs_di.obj +
  535. $(OBJS_EXT)
  536. $(PROJ).exe
  537. X
  538. $(LIBS_EXT);
  539. <<
  540. X    link $(LFLAGS) @$(PROJ).crf
  541. X
  542. run: $(PROJ).exe
  543. X    $(PROJ) $(RUNFLAGS)
  544. X
  545. SHAR_EOF
  546. chmod 0644 sfs/sfs/sfsx.mak ||
  547. echo 'restore of sfs/sfs/sfsx.mak failed'
  548. Wc_c="`wc -c < 'sfs/sfs/sfsx.mak'`"
  549. test 1444 -eq "$Wc_c" ||
  550.     echo 'sfs/sfs/sfsx.mak: original size 1444, current size' "$Wc_c"
  551. rm -f _shar_wnt_.tmp
  552. fi
  553. # ============= sfs/sfs/sfsx_cp.c ==============
  554. if test -f 'sfs/sfs/sfsx_cp.c' -a X"$1" != X"-c"; then
  555.     echo 'x - skipping sfs/sfs/sfsx_cp.c (File already exists)'
  556.     rm -f _shar_wnt_.tmp
  557. else
  558. > _shar_wnt_.tmp
  559. echo 'x - extracting sfs/sfs/sfsx_cp.c (Text)'
  560. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx_cp.c' &&
  561. /****************************************************************
  562. X
  563. X    sfsx_cp.c    Screen Setup and
  564. X            Control Panel Routines for SFS,
  565. X            Simulation Module
  566. X
  567. X            Copyright (c) 1991, Ted A. Campbell
  568. X
  569. X            Bywater Software
  570. X            P. O. Box 4023 
  571. X            Duke Station 
  572. X            Durham, NC  27706
  573. X
  574. X            email: tcamp@hercules.acpub.duke.edu
  575. X
  576. X    Copyright and Permissions Information:
  577. X
  578. X    All U.S. and international copyrights are claimed by the
  579. X    author. The author grants permission to use this code
  580. X    and software based on it under the following conditions:
  581. X    (a) in general, the code and software based upon it may be 
  582. X    used by individuals and by non-profit organizations; (b) it
  583. X    may also be utilized by governmental agencies in any country,
  584. X    with the exception of military agencies; (c) the code and/or
  585. X    software based upon it may not be sold for a profit without
  586. X    an explicit and specific permission from the author, except
  587. X    that a minimal fee may be charged for media on which it is
  588. X    copied, and for copying and handling; (d) the code must be 
  589. X    distributed in the form in which it has been released by the
  590. X    author; and (e) the code and software based upon it may not 
  591. X    be used for illegal activities. 
  592. X
  593. ****************************************************************/
  594. X
  595. #define SIDE_SPACE      (gr_strlen("S"))       /* spacing for side of boxes */
  596. /* #define SMALL_DEBUG */
  597. #define MAXYSIZE    375
  598. X
  599. #include "stdio.h"
  600. #include "math.h"
  601. X
  602. #ifdef   __STDC__
  603. #include "stdlib.h"
  604. #include "malloc.h"
  605. #else
  606. extern char *malloc();
  607. #define    time_t long
  608. #define    size_t int
  609. #endif
  610. X
  611. #include "time.h"
  612. #include "sfsx.h"
  613. X
  614. struct tm *tp;
  615. X
  616. sfsx_screen()
  617. X   {
  618. X
  619. #ifdef  OLD_DEBUG
  620. X   fprintf( stderr, "sfsx_screen(): enter function\n" );
  621. #endif
  622. X
  623. X   /* Clear the screen */
  624. X
  625. X   gr_cls( GR_PRIMARY );
  626. X
  627. X   /* Draw the main screen */
  628. X
  629. X   cp_ms();
  630. X
  631. X   /* Draw control panel boxes */
  632. X
  633. X   cp_boxes();
  634. X
  635. X   }
  636. X
  637. cp_prog( progfile )
  638. X   char *progfile;
  639. X   {
  640. X   sprintf( sfsx_tbuf, "%s: %s", progfile, pr_name );
  641. X
  642. X   ui_text( po_window->u_x1 + SIDE_SPACE,
  643. X      po_window->u_y1,
  644. X      po_window->u_x2,
  645. X      po_window->u_y2,
  646. X      256,
  647. X      cl_mback, cl_mfore, sfsx_tbuf );
  648. X   }
  649. X
  650. cp_sti()
  651. X   {
  652. X   static char clock_buf[ 36 ];
  653. X   static char env_buf[ 48 ];
  654. X   static time_t ticks;
  655. X   register int c;
  656. X
  657. X   ticks = (time_t) ( sfsx_epoch + sfsx_getmet());
  658. X   tp = gmtime( &ticks );
  659. X
  660. #ifdef  DEBUG
  661. X   if ( tp == NULL )
  662. X      {
  663. X      bw_error( "[pr:] cp_sti(): tp returns NULL" );
  664. X      return BW_ERROR;
  665. X      }
  666. #endif
  667. X
  668. X   sprintf( clock_buf, "UTC: %02d:%02d:%02d",
  669. X      tp->tm_hour, tp->tm_min, tp->tm_sec );
  670. X   ui_str( ti_window->u_x1 + SIDE_SPACE,
  671. X      ti_window->u_y2 - ui_grwind->fysize,
  672. X      ti_window->u_x2,
  673. X      cl_mback, cl_mfore, clock_buf );
  674. X   tp = localtime( &ticks );
  675. X   if ( getenv( "TZ" ) == NULL )
  676. X      {
  677. X      strcpy( env_buf, "LOC" );
  678. X      }
  679. X   else
  680. X      {
  681. X      strcpy( env_buf, getenv( "TZ" ) );
  682. X      }
  683. X   if ( tp->tm_isdst == 0 )
  684. X      {
  685. X      env_buf[ 3 ] = 0;
  686. X      }
  687. X   else
  688. X      {
  689. X      for ( c = 0; c < 4; ++c )
  690. X         {
  691. X         env_buf[ c ] = env_buf[ c + 4 ];
  692. X         }
  693. X      }
  694. X   sprintf( clock_buf, ": %02d:%02d:%02d",
  695. X      tp->tm_hour, tp->tm_min, tp->tm_sec );
  696. X   strcat( env_buf, clock_buf );
  697. X   ui_str( ti_window->u_x1 + SIDE_SPACE,
  698. X      ti_window->u_y2 - ( 2 * ui_grwind->fysize ),
  699. X      ti_window->u_x2,
  700. X      cl_mback, cl_mfore, env_buf );
  701. X   sprintf( clock_buf, "%s: %ld %s", SFSX_MET,
  702. X      sfsx_getmet() / (long) 86400, SFSX_DAYS );
  703. X   ui_str( ti_window->u_x1 + SIDE_SPACE,
  704. X      ti_window->u_y2 - ( 3 * ui_grwind->fysize ),
  705. X      ti_window->u_x2,
  706. X      cl_mback, cl_mfore, clock_buf );
  707. X   ticks = sfsx_getmet() + EL_EPOCH;
  708. X   if ( ( tp = gmtime( &ticks )) == NULL )
  709. X      {
  710. X      sprintf( clock_buf, " " );
  711. X      }
  712. X   else
  713. X      {
  714. X      sprintf( clock_buf, "%s: %02d:%02d:%02d ", SFSX_MET,
  715. X         tp->tm_hour, tp->tm_min, tp->tm_sec );
  716. X      }
  717. X   ui_str( ti_window->u_x1 + SIDE_SPACE,
  718. X      ti_window->u_y2 - ( 4 * ui_grwind->fysize ),
  719. X      ti_window->u_x2,
  720. X      cl_mback, cl_mfore, clock_buf );
  721. X   }
  722. X
  723. /*      Main SFS Screen         */
  724. X
  725. cp_ms()
  726. X   {
  727. X
  728. X   /* Draw the window itself */
  729. X
  730. X   sprintf( sfsx_tbuf, SFSX_TITLE, VERSION );
  731. X   main_window = ui_window( 0, 0, ui_grwind->xmax, ui_grwind->ymax,
  732. X      TRUE, cl_marker, cl_mfore, sfsx_tbuf,
  733. X      FALSE, cl_mback, FALSE, BLACK, cl_mback, GRID, BUT_CLOSE );
  734. X
  735. #ifdef  OLD_DEBUG
  736. X   kb_rx();
  737. #endif
  738. X
  739. X   /* Draw two lines demarcating help area */
  740. X
  741. X   gr_line( GR_PRIMARY, ui_grwind->xmax / 2, main_window->tbar_y1,
  742. X      ui_grwind->xmax / 2, main_window->y2, cl_mfore, SOLID );
  743. X   gr_line( GR_PRIMARY, ( ui_grwind->xmax / 2 ) + 2,
  744. X      main_window->tbar_y1,
  745. X      ( ui_grwind->xmax / 2 ) + 2,
  746. X      main_window->y2, cl_mfore, SOLID );
  747. X
  748. X   /* Record the help area */
  749. X
  750. X
  751. X   help_y1 = main_window->tbar_y1;
  752. X   help_y2 = main_window->y2 + ( ( ui_grwind->fysize ) * 0.3 );
  753. X   help_x1 = ( main_window->x2 / 2 ) + 5;
  754. X   help_x2 = main_window->tbar_x2;
  755. X
  756. X   }
  757. X
  758. /*      SFS Help Display */
  759. X
  760. sfsx_help( mes )
  761. X   char *mes;
  762. X   {
  763. X   ui_fbox( help_x1, main_window->tbar_y1,
  764. X      main_window->tbar_x2, main_window->tbar_y2,
  765. X      cl_marker, SOLID );
  766. X
  767. X   ui_str( help_x1, help_y1, help_x2,
  768. X      cl_marker, BLACK, mes );
  769. X
  770. X   }
  771. X
  772. /*      Set up Control Panel Windows */
  773. X
  774. cp_boxes()
  775. X   {
  776. X   int x1, x2, y1, y2, height, cp_side, decrement;
  777. X   cp_side = ( ui_grwind->xmax / 9 ) * 2;
  778. X
  779. X   /* blank the box area */
  780. X
  781. X   cp_window = ui_window( main_window->u_x1, main_window->u_y1,
  782. X      cp_side, main_window->u_y2,
  783. X      FALSE, cl_mback, cl_mfore, "",
  784. X      FALSE, cl_mback, FALSE, BLACK, BLACK, SOLID, FALSE );
  785. X
  786. X   fo_window = ui_window( cp_side, main_window->u_y1,
  787. X      main_window->u_x2, main_window->u_y2,
  788. X      FALSE, cl_mback, cl_mfore, "",
  789. X      TRUE, cl_mback, FALSE, BLACK, cl_mback, GRID, FALSE );
  790. X
  791. X   ui_fbox( fo_window->u_x1, fo_window->u_y1, fo_window->u_x2,
  792. X      fo_window->u_y2, WHITE, GRID );
  793. X
  794. X   decrement = ( ( cp_window->u_y2 - cp_window->u_y1 ) / 3 ) - 8;
  795. X
  796. X   y2 = cp_window->u_y2 - 2;
  797. X   y1 = cp_window->u_y2 - decrement;
  798. X   x1 = cp_window->u_x1 + 2;
  799. X   x2 = cp_window->u_x2 - 2;
  800. X
  801. X   po_window = ui_window( x1, y1, x2, y2, TRUE, cl_marker, BLACK,
  802. X      SFSX_PROG, FALSE, cl_mback, FALSE, BLACK, cl_mback, SOLID, FALSE );
  803. X
  804. X   y2 = y1 - 2;
  805. X   y1 = y2 - decrement;
  806. X
  807. X   ti_window = ui_window( x1, y1, x2, y2, TRUE, cl_marker, BLACK,
  808. X      SFSX_TIME, FALSE, BLACK, FALSE, BLACK, WHITE, SOLID, FALSE );
  809. X
  810. X   y2 = y1 - 2;
  811. X   y1 = cp_window->u_y1 + 2;
  812. X
  813. X   sy_window = ui_window( x1, y1, x2, y2, TRUE, cl_marker, BLACK,
  814. X      SFSX_SYS, FALSE, BLACK, FALSE, BLACK, WHITE, SOLID, FALSE );
  815. X
  816. X   }
  817. X
  818. /****************************************************************
  819. X
  820. X    cp_lwin()       Draw large focus window
  821. X
  822. ****************************************************************/
  823. X
  824. cp_lwin( uiwind, title )
  825. X   struct uiwindow **uiwind;
  826. X   char *title;
  827. X   {
  828. X
  829. X   if ( *uiwind == NULL )
  830. X      {
  831. X      *uiwind = ui_window( fo_window->u_x1, fo_window->u_y1,
  832. X     fo_window->u_x2, fo_window->u_y2, TRUE, cl_marker, FALSE,
  833. X     title, FALSE, BLACK, FALSE, BLACK, BLACK, SOLID, FALSE );
  834. X      }
  835. X   else
  836. X      {
  837. X      ui_rewindow( *uiwind, title );
  838. X      }
  839. X
  840. X   }
  841. X
  842. /****************************************************************
  843. X
  844. X    cp_twin()       Draw small top focus window
  845. X
  846. ****************************************************************/
  847. X
  848. cp_twin( uiwind, title )
  849. X   struct uiwindow **uiwind;
  850. X   char *title;
  851. X   {
  852. X   int midx, midy;
  853. X
  854. X   if ( *uiwind == NULL )
  855. X      {
  856. X
  857. X      midx = fo_window->u_x1 + ( ( fo_window->u_x2 - fo_window->u_x1 ) / 2 );
  858. X      midy = fo_window->u_y1 + ( ( fo_window->u_y2 - fo_window->u_y1 ) / 2 );
  859. X
  860. X      *uiwind = ui_window(
  861. X     fo_window->u_x1 + 1,
  862. X     midy + 1,
  863. X     fo_window->u_x2 - 1,
  864. X     fo_window->u_y2 - 1,
  865. X     TRUE, cl_marker, BLACK,
  866. X     title, TRUE, WHITE, FALSE, BLACK, BLACK, SOLID, FALSE );
  867. X
  868. X      }
  869. X   else
  870. X      {
  871. X      ui_rewindow( *uiwind, title );
  872. X      }
  873. X
  874. X   }
  875. X
  876. /****************************************************************
  877. X
  878. X    cp_bwin()       Draw small bottom focus window
  879. X
  880. ****************************************************************/
  881. X
  882. cp_bwin( uiwind, title )
  883. X   struct uiwindow **uiwind;
  884. X   char *title;
  885. X   {
  886. X   int midx, midy;
  887. X
  888. X   if ( *uiwind == NULL )
  889. X      {
  890. X
  891. X      midx = fo_window->u_x1 + ( ( fo_window->u_x2 - fo_window->u_x1 ) / 2 );
  892. X      midy = fo_window->u_y1 + ( ( fo_window->u_y2 - fo_window->u_y1 ) / 2 );
  893. X
  894. X      *uiwind = ui_window(
  895. X     fo_window->u_x1 + 1,
  896. X     fo_window->u_y1 + 1,
  897. X     fo_window->u_x2 - 1,
  898. X     midy - 1,
  899. X     TRUE, cl_marker, FALSE,
  900. X     title, TRUE, WHITE, FALSE, BLACK, BLACK, SOLID, FALSE );
  901. X      }
  902. X   else
  903. X      {
  904. X      ui_rewindow( *uiwind, title );
  905. X      }
  906. X   }
  907. X
  908. sfsx_font( size )
  909. X   int size;
  910. X   {
  911. X   static int oldsize = 159;
  912. X   int rq_height, calcy;
  913. X
  914. X   if ( size == oldsize )
  915. X      {
  916. X      return;
  917. X      }
  918. X
  919. X   if ( ui_grwind->ymax > MAXYSIZE )
  920. X      {
  921. X      calcy = MAXYSIZE;
  922. X      }
  923. X   else
  924. X      {
  925. X      calcy = ui_grwind->ymax;
  926. X      }
  927. X
  928. X   switch( size )
  929. X      {
  930. X      case 1:
  931. X     rq_height = calcy / 25;
  932. X         break;
  933. X      case 2:
  934. X     rq_height = calcy / 15;
  935. X         break;
  936. X      default:
  937. X     rq_height = calcy / 30;
  938. X         break;
  939. X      }
  940. X
  941. X   gr_font( GR_PRIMARY, F_DEFAULT, rq_height );
  942. X   }
  943. X
  944. bw_message( mes )
  945. X   char *mes;
  946. X   {
  947. X   ui_fbox( sy_window->u_x1, sy_window->u_y1, sy_window->u_x2,
  948. X      sy_window->u_y2,
  949. X      cl_mback, SOLID );
  950. X   ui_text( sy_window->u_x1 + SIDE_SPACE, sy_window->u_y1,
  951. X      sy_window->u_x2, sy_window->u_y2,
  952. X      5, cl_mback, cl_mfore, mes );
  953. X   }
  954. X
  955. err_init()
  956. X   {
  957. X   static size_t x_size;
  958. X   static int x1, x2, y1, y2, height, length, midx, midy, c;
  959. X
  960. #ifdef OLD_DEBUG
  961. X   fprintf( stderr, "err_init(): enter function\n" );
  962. #endif
  963. X
  964. X   midx = main_window->u_x1 + ( ( main_window->u_x2 - main_window->u_x1 ) / 2 );
  965. X   midy = main_window->u_y1 + ( ( main_window->u_y2 - main_window->u_y1 ) / 2 );
  966. X
  967. #ifdef OLD_DEBUG
  968. X   fprintf( stderr, "err_init(): calculate length\n" );
  969. #endif
  970. X
  971. X   length = main_window->u_x2 / 2;
  972. X   x1 = midx - length / 2;
  973. X   x2 = midx + length / 2;
  974. X   height = main_window->u_y2 / 2;
  975. X   y1 = midy - height / 2;
  976. X   y2 = midy + height / 2;
  977. X
  978. #ifdef OLD_DEBUG
  979. X   fprintf( stderr, "err_init(): call imsize\n" );
  980. #endif
  981. X
  982. X   }
  983. X
  984. bw_error( mes )
  985. X   char *mes;
  986. X   {
  987. X   static char buffer[ BW_EBUFSIZE ];
  988. X   static int x1 = 0, x2, y1, y2, height, length, midx, midy, c;
  989. X   static struct  uiwindow *err_window;           /* structure for error window   */
  990. X   static int err_mem;
  991. X
  992. X   if ( err_mem == NULL )
  993. X      {
  994. X      fprintf( stderr, "ERROR: %s\n", mes );
  995. X      kb_rx();
  996. X      return 0;
  997. X      }
  998. X
  999. X   if ( x1 == 0 )
  1000. X      {
  1001. X
  1002. X      midx = main_window->u_x1 + ( ( main_window->u_x2 - main_window->u_x1 ) / 2 );
  1003. X      midy = main_window->u_y1 + ( ( main_window->u_y2 - main_window->u_y1 ) / 2 );
  1004. X
  1005. X      length = main_window->u_x2 / 2;
  1006. X      x1 = midx - length / 2;
  1007. X      x2 = midx + length / 2;
  1008. X      height = main_window->u_y2 / 2;
  1009. X      y1 = midy - height / 2;
  1010. X      y2 = midy + height / 2;
  1011. X
  1012. X      }
  1013. X
  1014. X   ui_push();                           /* save ui screen */
  1015. X   ui_setscreen( GR_PRIMARY );
  1016. X   gr_imsave( GR_PRIMARY, TRUE, x1, y1, x2, y2, &err_mem );
  1017. X   buffer[ 0 ] = 0;
  1018. X   sprintf( buffer, ERR_PROMPT, mes );
  1019. X   c = ui_yn( x1, y1, x2, y2, cl_mback, cl_mfore, cl_marker, TRUE,
  1020. X      buffer, ERRP_NO, ERRP_YES, &err_window );
  1021. X   gr_imsave( GR_PRIMARY, FALSE, x1, y1, x2, y2, &err_mem );
  1022. X   gr_imfree( err_mem );
  1023. X
  1024. X   if ( c == FALSE )
  1025. X      {
  1026. X      sfs_exit();
  1027. X      exit( 1 );
  1028. X      }
  1029. X   sfsx_help( SFSX_HELP );
  1030. X   ui_pop();
  1031. X   }
  1032. X
  1033. #ifdef  DEBUG
  1034. bw_debug( mes )
  1035. X   char *mes;
  1036. X   {
  1037. X   static char buffer[ 256 ];
  1038. X   static int x_mem;
  1039. X   static size_t x_size;
  1040. X   static int x1 = 0, x2, y1, y2, height, length, midx, midy, c;
  1041. X   static struct  uiwindow *d_window;      /* structure for debug window   */
  1042. X
  1043. #ifdef  SMALL_DEBUG
  1044. X   sprintf( buffer, "DEBUG: %s     ", mes );
  1045. X   gr_text( GR_PRIMARY, 5, 5, buffer, BLACK, WHITE );
  1046. X   ui_wait();
  1047. #else
  1048. X   if ( x1 == 0 )
  1049. X      {
  1050. X
  1051. X      midx = main_window->u_x1 + ( ( main_window->u_x2 - main_window->u_x1 ) / 2 );
  1052. X      midy = main_window->u_y1 + ( ( main_window->u_y2 - main_window->u_y1 ) / 2 );
  1053. X
  1054. X      length = main_window->u_x2 / 2;
  1055. X      x1 = midx - length / 2;
  1056. X      x2 = midx + length / 2;
  1057. X      height = main_window->u_y2 / 2;
  1058. X      y1 = midy - height / 2;
  1059. X      y2 = midy + height / 2;
  1060. X
  1061. X      }
  1062. X
  1063. X   ui_push();                           /* save ui screen */
  1064. X   ui_setscreen( GR_PRIMARY );
  1065. X   gr_imsave( GR_PRIMARY, TRUE, x1, y1, x2, y2, &x_mem );
  1066. X   buffer[ 0 ] = 0;
  1067. X   sprintf( buffer, "DEBUG: %s", mes );
  1068. X   c = ui_alarm( x1, y1, x2, y2, cl_mback, cl_mfore, cl_marker, TRUE,
  1069. X      buffer, " OK ", &d_window );
  1070. X   gr_imsave( GR_PRIMARY, FALSE, x1, y1, x2, y2, &x_mem );
  1071. X   gr_imfree( x_mem );
  1072. X
  1073. X   ui_pop();
  1074. X
  1075. #endif
  1076. X   }
  1077. #endif
  1078. X
  1079. ui_error( m )
  1080. X   char *m;
  1081. X   {
  1082. X   bw_error( m );
  1083. X   }
  1084. X
  1085. matherr( xstruct )
  1086. X   struct exception *xstruct;
  1087. X   {
  1088. X   sprintf( bw_ebuf, ERR_MATH, xstruct->name );
  1089. X   bw_error( bw_ebuf );
  1090. X   }
  1091. X
  1092. X
  1093. SHAR_EOF
  1094. chmod 0644 sfs/sfs/sfsx_cp.c ||
  1095. echo 'restore of sfs/sfs/sfsx_cp.c failed'
  1096. Wc_c="`wc -c < 'sfs/sfs/sfsx_cp.c'`"
  1097. test 12780 -eq "$Wc_c" ||
  1098.     echo 'sfs/sfs/sfsx_cp.c: original size 12780, current size' "$Wc_c"
  1099. rm -f _shar_wnt_.tmp
  1100. fi
  1101. # ============= sfs/sfs/sfsx_n.mak ==============
  1102. if test -f 'sfs/sfs/sfsx_n.mak' -a X"$1" != X"-c"; then
  1103.     echo 'x - skipping sfs/sfs/sfsx_n.mak (File already exists)'
  1104.     rm -f _shar_wnt_.tmp
  1105. else
  1106. > _shar_wnt_.tmp
  1107. echo 'x - extracting sfs/sfs/sfsx_n.mak (Text)'
  1108. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx_n.mak' &&
  1109. PROJ    =SFSX
  1110. DEBUG    =0
  1111. CC    =qcl
  1112. CFLAGS_G        = /AL /W1 /Ze /DDEBUG /I..\..\include
  1113. CFLAGS_D    = /Zi /Zr /Gi$(PROJ).mdt /Od 
  1114. CFLAGS_R    = /O /Ot /DNDEBUG 
  1115. CFLAGS    =$(CFLAGS_G) $(CFLAGS_R)
  1116. LFLAGS_G    = /CP:0xffff /NOI /NOE /SE:0x80 /ST:0x1000 
  1117. LFLAGS_D    = /CO /M /INCR 
  1118. LFLAGS_R    = 
  1119. LFLAGS    =$(LFLAGS_G) $(LFLAGS_R)
  1120. RUNFLAGS    =
  1121. OBJS_A =      ..\..\lib\dr_ibmpc.obj ..\..\lib\gr_ibmpc.obj \
  1122. X    ..\..\lib\kb_ibmpc.obj ..\..\lib\ui_boxes.obj
  1123. OBJS_B =        ..\..\lib\ui_dial.obj ..\..\lib\ui_gets.obj \
  1124. X    ..\..\lib\ui_init.obj
  1125. OBJS_C =        ..\..\lib\ui_list.obj ..\..\lib\ui_text.obj ..\..\lib\ui_pbm.obj
  1126. LIBS_EXT =     
  1127. X
  1128. all:    $(PROJ).exe
  1129. X
  1130. sfsx_cp.obj:    sfsx_cp.c
  1131. X
  1132. sfsx_sp.obj:    sfsx_sp.c
  1133. X
  1134. sfsx_var.obj:    sfsx_var.c
  1135. X
  1136. sfsx.obj:    sfsx.c
  1137. X
  1138. as_orbit.obj:   
  1139. X                $(CC) $(CFLAGS) -c ..\as\as_orbit.c
  1140. X
  1141. as_vpt.obj:     
  1142. X                $(CC) $(CFLAGS) -c ..\as\as_vpt.c
  1143. X
  1144. as_spj.obj:     
  1145. X                $(CC) $(CFLAGS) -c ..\as\as_spj.c
  1146. X
  1147. as_focus.obj:   
  1148. X                $(CC) $(CFLAGS) -c ..\as\as_focus.c
  1149. X
  1150. sfs_ft.obj:    sfs_ft.c
  1151. X
  1152. sfs_gt.obj:    sfs_gt.c
  1153. X
  1154. sfs_pe.obj:    sfs_pe.c
  1155. X
  1156. sfs_pr.obj:    sfs_pr.c
  1157. X
  1158. sfs_vi.obj:    sfs_vi.c
  1159. X
  1160. sfs_di.obj:    sfs_di.c
  1161. X
  1162. $(PROJ).exe:    sfsx_cp.obj sfsx_sp.obj sfsx_var.obj as_orbit.obj \
  1163. X        as_vpt.obj as_spj.obj \
  1164. X    sfsx.obj as_focus.obj sfs_ft.obj sfs_gt.obj sfs_pe.obj \
  1165. X        sfs_pr.obj sfs_vi.obj sfs_di.obj \
  1166. X        $(OBJS_A) \
  1167. X        $(OBJS_B) \
  1168. X        $(OBJS_C)
  1169. X    echo >NUL @<<$(PROJ).crf
  1170. sfsx_cp.obj +
  1171. sfsx_sp.obj +
  1172. sfsx_var.obj +
  1173. as_orbit.obj +
  1174. as_vpt.obj +
  1175. as_spj.obj +
  1176. sfsx.obj +
  1177. as_focus.obj +
  1178. sfs_ft.obj +
  1179. sfs_gt.obj +
  1180. sfs_pe.obj +
  1181. sfs_pr.obj +
  1182. sfs_vi.obj +
  1183. sfs_di.obj +
  1184. $(OBJS_A) +
  1185. $(OBJS_B) +
  1186. $(OBJS_C)
  1187. $(PROJ).exe
  1188. X
  1189. $(LIBS_EXT);
  1190. <<
  1191. X    link $(LFLAGS) @$(PROJ).crf
  1192. X
  1193. run: $(PROJ).exe
  1194. X    $(PROJ) $(RUNFLAGS)
  1195. X
  1196. SHAR_EOF
  1197. chmod 0644 sfs/sfs/sfsx_n.mak ||
  1198. echo 'restore of sfs/sfs/sfsx_n.mak failed'
  1199. Wc_c="`wc -c < 'sfs/sfs/sfsx_n.mak'`"
  1200. test 1726 -eq "$Wc_c" ||
  1201.     echo 'sfs/sfs/sfsx_n.mak: original size 1726, current size' "$Wc_c"
  1202. rm -f _shar_wnt_.tmp
  1203. fi
  1204. # ============= sfs/sfs/sfsx_sp.c ==============
  1205. if test -f 'sfs/sfs/sfsx_sp.c' -a X"$1" != X"-c"; then
  1206.     echo 'x - skipping sfs/sfs/sfsx_sp.c (File already exists)'
  1207.     rm -f _shar_wnt_.tmp
  1208. else
  1209. > _shar_wnt_.tmp
  1210. echo 'x - extracting sfs/sfs/sfsx_sp.c (Text)'
  1211. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx_sp.c' &&
  1212. /****************************************************************
  1213. X
  1214. X    sfsx_sp.c       Set Orbital Parameters Routines
  1215. X            for Space Flight Simulator,
  1216. X            Simulation Module
  1217. X
  1218. X            Copyright (c) 1991, Ted A. Campbell
  1219. X
  1220. X            Bywater Software
  1221. X            P. O. Box 4023 
  1222. X            Duke Station 
  1223. X            Durham, NC  27706
  1224. X
  1225. X            email: tcamp@hercules.acpub.duke.edu
  1226. X
  1227. X    Copyright and Permissions Information:
  1228. X
  1229. X    All U.S. and international copyrights are claimed by the
  1230. X    author. The author grants permission to use this code
  1231. X    and software based on it under the following conditions:
  1232. X    (a) in general, the code and software based upon it may be 
  1233. X    used by individuals and by non-profit organizations; (b) it
  1234. X    may also be utilized by governmental agencies in any country,
  1235. X    with the exception of military agencies; (c) the code and/or
  1236. X    software based upon it may not be sold for a profit without
  1237. X    an explicit and specific permission from the author, except
  1238. X    that a minimal fee may be charged for media on which it is
  1239. X    copied, and for copying and handling; (d) the code must be 
  1240. X    distributed in the form in which it has been released by the
  1241. X    author; and (e) the code and software based upon it may not 
  1242. X    be used for illegal activities. 
  1243. X
  1244. ****************************************************************/
  1245. X
  1246. #include "stdio.h"
  1247. #include "sfsx.h"
  1248. X
  1249. #ifdef   __STDC__
  1250. #include "malloc.h"
  1251. #include "stdlib.h"
  1252. #else
  1253. extern char * malloc();
  1254. #define    size_t    int
  1255. #endif
  1256. X
  1257. #define SYS_TITLES      4
  1258. X
  1259. extern int fo_xcenter, fo_ycenter;
  1260. extern long get_long();
  1261. static char *sys_titles[ SYS_TITLES ];
  1262. static char set_buffer[ 128 ];
  1263. static struct menu_box ssp_box;
  1264. X
  1265. fw_grid()
  1266. X   {
  1267. X   ui_fbox( fo_window->u_x1, fo_window->u_y1,
  1268. X      fo_window->u_x2, fo_window->u_y2, BLACK, SOLID );
  1269. X   ui_fbox( fo_window->u_x1, fo_window->u_y1,
  1270. X      fo_window->u_x2, fo_window->u_y2, WHITE, GRID );
  1271. X   }
  1272. X
  1273. /****************************************************************
  1274. X
  1275. X   ssp()      Set System Parameters
  1276. X
  1277. ****************************************************************/
  1278. X
  1279. ssp()
  1280. X   {
  1281. X   register int c, y;
  1282. X   static int sysp_init = FALSE;
  1283. X   static int x_x1 = 0, x_y1 = 0, x_x2 = 0, x_y2 = 0;
  1284. X   int test, item;
  1285. X   static int x_ebuf;
  1286. X
  1287. X   if ( x_x1 == 0 )
  1288. X      {
  1289. X      x_x1 = (int) fo_xcenter - ( ui_grwind->xmax / 4 );
  1290. X      x_y1 = (int) fo_ycenter - ( ui_grwind->fysize * 6 );
  1291. X      x_x2 = (int) fo_xcenter + ( ui_grwind->xmax / 4 );
  1292. X      x_y2 = (int) fo_ycenter + ( ui_grwind->fysize * 5 );
  1293. X      }
  1294. X
  1295. X   if ( sysp_init == FALSE )
  1296. X      {
  1297. X      for ( c = 0; c < SYS_TITLES; ++c )
  1298. X         {
  1299. X         if ( ( sys_titles[ c ] = malloc( 64 ) ) == NULL )
  1300. X            {
  1301. X        bw_error( MEMERR_SSP );
  1302. X            return;
  1303. X            }
  1304. X         }
  1305. X      sysp_init = TRUE;
  1306. X      }
  1307. X
  1308. X   gr_imsave( GR_PRIMARY, TRUE, x_x1, x_y1, x_x2, x_y2, &x_ebuf );
  1309. X
  1310. X   y = TRUE;
  1311. X   while( y == TRUE )
  1312. X      {
  1313. X
  1314. X      /* set up titles for menu */
  1315. X
  1316. X      sprintf( sys_titles[ 0 ], SSP_TF,
  1317. X         (long) sfs_tfactor );
  1318. X      sprintf( sys_titles[ 1 ], SSP_UI,
  1319. X     (long) sfs_inc );
  1320. X      sprintf( sys_titles[ 2 ], SSP_TPL,
  1321. X         vpt_level );
  1322. X      sprintf( sys_titles[ 3 ], SSP_EXIT );
  1323. X
  1324. X      item = ui_list( MENU_SLIDERS, x_x1, x_y1, x_x2, x_y2,
  1325. X     SSP_TITLE, SYS_TITLES,
  1326. X     sys_titles, cl_mfore, cl_mback, cl_marker,
  1327. X     &ssp_box );
  1328. X
  1329. X      /* Process the argument */
  1330. X
  1331. X      switch( item )
  1332. X     {
  1333. X     case 0:
  1334. X        sfs_tfactor = get_long( TF_TITLE,
  1335. X           TF_LEGEND,
  1336. X           TF_PROMPT,
  1337. X           (long) sfs_tfactor,
  1338. X           (long) 1, (long) 0 );
  1339. X        ssp_box.is_drawn = FALSE;
  1340. X        break;
  1341. X     case 1:
  1342. X        sfs_inc = get_long( UI_TITLE,
  1343. X           UI_LEGEND,
  1344. X           UI_PROMPT,
  1345. X           (long) sfs_inc,
  1346. X           (long) 1, (long) 0 );
  1347. X        ssp_box.is_drawn = FALSE;
  1348. X        break;
  1349. X     case 2:
  1350. X        vpt_level = get_int( TPL_TITLE,
  1351. X           TPL_LEGEND,
  1352. X           TPL_PROMPT,
  1353. X           vpt_level, 1, 2 );
  1354. X        ssp_box.is_drawn = FALSE;
  1355. X        break;
  1356. X     case TK_EXIT:
  1357. X     case 3:
  1358. X        y = FALSE;
  1359. X        break;
  1360. X     }
  1361. X      }
  1362. X
  1363. X   gr_imsave( GR_PRIMARY, FALSE, x_x1, x_y1, x_x2, x_y2, &x_ebuf );
  1364. X   gr_imfree( x_ebuf );
  1365. X
  1366. X   }
  1367. X
  1368. /****************************************************************
  1369. X
  1370. X   sdi()      Set Display
  1371. X
  1372. ****************************************************************/
  1373. X
  1374. sdi( d_titles, n_titles, title )
  1375. X   char **d_titles;
  1376. X   int n_titles;
  1377. X   char *title;
  1378. X   {
  1379. X   register int c, y;
  1380. X   static struct menu_box sdi_box;
  1381. X   int test, item;
  1382. X   static int x_x1 = 0, x_y1 = 0, x_x2 = 0, x_y2 = 0;
  1383. X   static int x_ebuf;
  1384. X
  1385. X   if ( x_x1 == 0 )
  1386. X      {
  1387. X      x_x1 = (int) fo_xcenter - ( ui_grwind->xmax / 4 );
  1388. X      x_y1 = (int) fo_ycenter - ( ui_grwind->fysize * 7 );
  1389. X      x_x2 = (int) fo_xcenter + ( ui_grwind->xmax / 4 );
  1390. X      x_y2 = (int) fo_ycenter + ( ui_grwind->fysize * 5 );
  1391. X      }
  1392. X
  1393. X   gr_imsave( GR_PRIMARY, TRUE, x_x1, x_y1, x_x2, x_y2, &x_ebuf );
  1394. X
  1395. X   sdi_box.is_drawn = FALSE;
  1396. X   item = ui_list( MENU_SLIDERS, x_x1, x_y1, x_x2, x_y2,
  1397. X     title, n_titles,
  1398. X     d_titles, cl_mfore, cl_mback, cl_marker,
  1399. X     &sdi_box );
  1400. X
  1401. X   gr_imsave( GR_PRIMARY, FALSE, x_x1, x_y1, x_x2, x_y2, &x_ebuf );
  1402. X   gr_imfree( x_ebuf );
  1403. X
  1404. X   return item;
  1405. X
  1406. X   }
  1407. X
  1408. get_int( title, text, prompt, oldvalue, minimum, maximum )
  1409. X   char *title, *text, *prompt;
  1410. X   int oldvalue, minimum, maximum;
  1411. X   {
  1412. X   char *_text;
  1413. X   int y;
  1414. X   static int n;
  1415. X
  1416. X   _text = text;
  1417. X   y = 1;
  1418. X   while( y == 1 )
  1419. X      {
  1420. X      ui_dial( ssp_box.window->x1, ssp_box.window->y1, ssp_box.window->x2, ssp_box.window->y2, cl_mback, cl_mfore,
  1421. X     cl_marker, 1, title,
  1422. X     _text, prompt, set_buffer, &ssp_box.window );
  1423. X      if ( set_buffer[ 0 ] == 0 )
  1424. X     {
  1425. X     return oldvalue;
  1426. X     }
  1427. X
  1428. X      sscanf( set_buffer, "%d",  &n );
  1429. X      y = 0;
  1430. X      if ( n < minimum )
  1431. X     {
  1432. X     sprintf( sfsx_tbuf, "%s %ld; %s.", MINERR, minimum - 1, PTA );
  1433. X     _text = sfsx_tbuf;
  1434. X     y = 1;
  1435. X     }
  1436. X      if ( ( maximum != 0 ) && ( n > maximum ))
  1437. X     {
  1438. X     y = 1;
  1439. X     sprintf( sfsx_tbuf, "%s %ld; %s.", MAXERR, maximum + 1, PTA );
  1440. X     _text = sfsx_tbuf;
  1441. X     }
  1442. X      }
  1443. X
  1444. X   return n;
  1445. X   }
  1446. X
  1447. long
  1448. get_long( title, text, prompt, oldvalue, minimum, maximum )
  1449. X   char *title, *text, *prompt;
  1450. X   long oldvalue, minimum, maximum;
  1451. X   {
  1452. X   char *_text;
  1453. X   int y;
  1454. X   static long n;
  1455. X
  1456. X   _text = text;
  1457. X   y = 1;
  1458. X   while( y == 1 )
  1459. X      {
  1460. X      ui_dial( ssp_box.window->x1, ssp_box.window->y1, ssp_box.window->x2, ssp_box.window->y2, cl_mback, cl_mfore,
  1461. X     cl_marker, 1, title,
  1462. X     _text, prompt, set_buffer, &ssp_box.window );
  1463. X
  1464. X      if ( set_buffer[ 0 ] == 0 )
  1465. X     {
  1466. X     return oldvalue;
  1467. X     }
  1468. X
  1469. X      sscanf( set_buffer, "%ld",  &n );
  1470. X      y = 0;
  1471. X      if ( n < minimum )
  1472. X     {
  1473. X     sprintf( sfsx_tbuf, "%s %ld; %s.", MINERR, minimum - 1, PTA );
  1474. X     _text = sfsx_tbuf;
  1475. X     y = 1;
  1476. X     }
  1477. X      if ( ( maximum != 0 ) && ( n > maximum ))
  1478. X     {
  1479. X     y = 1;
  1480. X     sprintf( sfsx_tbuf, "%s %ld; %s.", MAXERR, maximum + 1, PTA );
  1481. X     _text = sfsx_tbuf;
  1482. X     }
  1483. X      }
  1484. X
  1485. X   return n;
  1486. X   }
  1487. X
  1488. SHAR_EOF
  1489. chmod 0644 sfs/sfs/sfsx_sp.c ||
  1490. echo 'restore of sfs/sfs/sfsx_sp.c failed'
  1491. Wc_c="`wc -c < 'sfs/sfs/sfsx_sp.c'`"
  1492. test 6678 -eq "$Wc_c" ||
  1493.     echo 'sfs/sfs/sfsx_sp.c: original size 6678, current size' "$Wc_c"
  1494. rm -f _shar_wnt_.tmp
  1495. fi
  1496. # ============= sfs/sfs/sfsx_var.c ==============
  1497. if test -f 'sfs/sfs/sfsx_var.c' -a X"$1" != X"-c"; then
  1498.     echo 'x - skipping sfs/sfs/sfsx_var.c (File already exists)'
  1499.     rm -f _shar_wnt_.tmp
  1500. else
  1501. > _shar_wnt_.tmp
  1502. echo 'x - extracting sfs/sfs/sfsx_var.c (Text)'
  1503. sed 's/^X//' << 'SHAR_EOF' > 'sfs/sfs/sfsx_var.c' &&
  1504. /****************************************************************
  1505. X
  1506. X    sfsx_var.c      Global Variables
  1507. X            for Space Flight Simulator,
  1508. X            Simulation Module
  1509. X
  1510. X            Copyright (c) 1991, Ted A. Campbell
  1511. X
  1512. X            Bywater Software
  1513. X            P. O. Box 4023 
  1514. X            Duke Station 
  1515. X            Durham, NC  27706
  1516. X
  1517. X            email: tcamp@hercules.acpub.duke.edu
  1518. X
  1519. X    Copyright and Permissions Information:
  1520. X
  1521. X    All U.S. and international copyrights are claimed by the
  1522. X    author. The author grants permission to use this code
  1523. X    and software based on it under the following conditions:
  1524. X    (a) in general, the code and software based upon it may be 
  1525. X    used by individuals and by non-profit organizations; (b) it
  1526. X    may also be utilized by governmental agencies in any country,
  1527. X    with the exception of military agencies; (c) the code and/or
  1528. X    software based upon it may not be sold for a profit without
  1529. X    an explicit and specific permission from the author, except
  1530. X    that a minimal fee may be charged for media on which it is
  1531. X    copied, and for copying and handling; (d) the code must be 
  1532. X    distributed in the form in which it has been released by the
  1533. X    author; and (e) the code and software based upon it may not 
  1534. X    be used for illegal activities. 
  1535. X
  1536. ****************************************************************/
  1537. X
  1538. #include "sfsx.h"
  1539. X
  1540. long    sfs_insertion;          /* Moment of orbital insertion */
  1541. long    sfsx_epoch;             /* Orbital epoch in seconds since beginning */
  1542. long    sfs_tfactor;            /* time factor  */
  1543. int     sfs_display = 0;        /* Screen:  0 = visual simulation at top   */
  1544. X                /*          1 = distant perspective at top */
  1545. X                /*          2 = zoom (full) visual         */
  1546. X
  1547. struct sfs_orbit *sfsx_orbits[ ORBITS ];
  1548. X                /* Structures for orbital data */
  1549. char    sfsx_tbuf[ 256 ];       /* a scratch buffer */
  1550. X
  1551. char    bw_ebuf[ BW_EBUFSIZE ];
  1552. X
  1553. int     al_hor, al_vert;
  1554. long    sfsx_dp;
  1555. long    sfs_inc;
  1556. X
  1557. struct spj_pt spd_start, spd_end;       /* surface data pointers */
  1558. struct spj_pt gr_start, gr_end;         /* grid data pointers */
  1559. struct spj_pt pd_start, pd_end;         /* point data pointers */
  1560. struct spj_pt or_start, or_end;         /* orb data pointers */
  1561. X
  1562. struct as_focus sfsx_focus;             /* orbital focus structure */
  1563. char sfsx_gridfile[ 32 ];               /* grid spd file */
  1564. X
  1565. int cp_height, cp_space, cp_center;
  1566. X
  1567. char sp_tbuf[ 64 ];
  1568. X
  1569. int     gt_color;       /* Color for ground track plot          */
  1570. X
  1571. char    pd_name[ 128 ];
  1572. char    pd_file[ 32 ];
  1573. X
  1574. char    pr_name[ 128 ];
  1575. int     sfsx_display = 0;       /* Screen:  0 = visual simulation in top   */
  1576. X                /*          1 = distant perspective in top */
  1577. X                /*          2 = zoom (full) visual         */
  1578. X
  1579. X
  1580. struct  uiwindow *main_window;          /* structure for main window    */
  1581. struct  uiwindow *po_window;            /* structure for focus panel    */
  1582. struct  uiwindow *ti_window;            /* structure for relation window */
  1583. struct  uiwindow *sy_window;            /* structure for timing window  */
  1584. struct  uiwindow *cp_window;            /* structure for control panel box */
  1585. struct  uiwindow *fo_window;            /* structure for focus window   */
  1586. struct  uiwindow *z_window;             /* structure for zoom window   */
  1587. struct  uiwindow *t_window;             /* top window */
  1588. struct  uiwindow *b_window;             /* bottom window */
  1589. X
  1590. int     help_y1;                        /* line for help display      */
  1591. int     help_y2;                        /* top of help display        */
  1592. int     help_x1;                        /* column for help display    */
  1593. int     help_x2;                        /* max col for help display   */
  1594. X
  1595. /*    Colors */
  1596. X
  1597. int    cl_mback;        /* Main background color    */
  1598. int    cl_mfore;        /* Main foreground color    */
  1599. int    cl_marker;        /* Color for prompt markers    */
  1600. int    cl_grid;        /* Color for planetary grid    */
  1601. int    cl_surface;        /* Color for planetary surface    */
  1602. int    cl_orbits[ 6 ];        /* Colors for different orbits    */
  1603. X
  1604. X
  1605. SHAR_EOF
  1606. chmod 0644 sfs/sfs/sfsx_var.c ||
  1607. echo 'restore of sfs/sfs/sfsx_var.c failed'
  1608. Wc_c="`wc -c < 'sfs/sfs/sfsx_var.c'`"
  1609. test 3875 -eq "$Wc_c" ||
  1610.     echo 'sfs/sfs/sfsx_var.c: original size 3875, current size' "$Wc_c"
  1611. rm -f _shar_wnt_.tmp
  1612. fi
  1613. # ============= smallfont/read.me ==============
  1614. if test ! -d 'smallfont'; then
  1615.     echo 'x - creating directory smallfont'
  1616.     mkdir 'smallfont'
  1617. fi
  1618. if test -f 'smallfont/read.me' -a X"$1" != X"-c"; then
  1619.     echo 'x - skipping smallfont/read.me (File already exists)'
  1620.     rm -f _shar_wnt_.tmp
  1621. else
  1622. > _shar_wnt_.tmp
  1623. echo 'x - extracting smallfont/read.me (Binary)'
  1624. sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
  1625. begin 600 smallfont/read.me
  1626. M1G)O;2!D=6ME86,A96-S=F%X+G5N8V5C<RYE9'4A;6-N8R%R=71G97)S(6-S
  1627. M+G5T97AA<RYE9'4A>6%L92%C<RYY86QE+F5D=2%Y87)V:6XM;F]R;6%N(%-U
  1628. M;B!-87(@,3@@,34Z,S<Z,C<@15-4(#$Y.3`*07)T:6-L92`R.34S(&]F(&-O
  1629. M;7`N<WES+F%T=#H*4&%T:#H@;G5M96XA9'5K96%C(65C<W9A>"YU;F-E8W,N
  1630. M961U(6UC;F,A<G5T9V5R<R%C<RYU=&5X87,N961U(7EA;&4A8W,N>6%L92YE
  1631. M9'4A>6%R=FEN+6YO<FUA;@H^1G)O;3H@>6%R=FEN+6YO<FUA;D!#4RY986QE
  1632. M+D5$52`H;F]R;6%N('EA<G9I;BD*3F5W<V=R;W5P<SH@8V]M<"YS>7,N871T
  1633. M"E-U8FIE8W0Z(%1H92`S-G@Q,#(@9F]N="`H56YI>"!00RD*365S<V%G92U)
  1634. M1#H@/#$X-S<Y0&-S+GEA;&4N961U/@I$871E.B`Q,B!-87(@.3`@,#(Z-38Z
  1635. M,#@@1TU4"E-E;F1E<CH@;F5W<T!C<RYY86QE+F5D=0I/<F=A;FEZ871I;VXZ
  1636. M(%EA;&4@56YI=F5R<VET>2!#;VUP=71E<B!38VEE;F-E($1E<'0L($YE=R!(
  1637. M879E;B!#5"`@,#8U,C`M,C$U.`I,:6YE<SH@,38U.`H*5&AI<R!I<R!T:&4@
  1638. M,S9X,3`R("@X(&)I=',@:&EG:"!B>2`W(&)I=',@=VED92D@9F]N="!T:&%T
  1639. M('=A<R!P;W-T960@82!W:&EL90IA9V\N("!)(&AA=F4@;6%D92!S979E<F%L
  1640. M(&-H86YG97,@=&\@:70N("!)(&UU8V@@<')E9F5R('1H:7,@9F]N="!T;R!E
  1641. M:71H97(*=&AE(#(X>#$R,"!O<B!T:&4@,S9X,30T(&9O;G1S+"!W:&EC:"!P
  1642. M96]P;&4@:&%V92!A9'9O8V%T960@=7-I;F<N("!(;W=E=F5R+`IS;VUE('!E
  1643. M;W!L92!H879E(&EN9&EC871E9"!T:&%T('1H:7,@9F]N="!I<R!T;V\@<VUA
  1644. M;&P@9F]R('1H96TN"@I&;W(@=&AO<V4@=6YA<75A:6YT960@=VET:"!F;VYT
  1645. M<R!O;B!T:&4@56YI>"!00RP@=&AE(')E;&5V86YT(&-O;6UA;F1S(&%R90IC
  1646. M9F]N="@Q*2!A;F0@<V5T9B@Q*2]S9F]N="@Q*2X@($]N92!C86X@;6%K92!A
  1647. M(&9O;G0@=&AE(&1E9F%U;'0@<WES=&5M(&9O;G0*8GD@<'5T=&EN9R!T:&4@
  1648. M;&EN90H*"7-F;VYT("US(#QF;VYT9FEL93X@,`H*:6X@+V5T8R\N9F]N=&QO
  1649. M860N"@I4:&4@8V]M;6%N9"`B<V5T9B!F;VYT9FEL92`P(B!R97!L86-E<R!T
  1650. M:&4@9&5F875L="!F;VYT+"!I;B!T:&4@8W5R<F5N=`IW:6YD;W<N("!(;W=E
  1651. M=F5R+"!I9B!A('-M86QL97(@9F]N="!I<R!L;V%D960L('5N9&5R(&-E<G1A
  1652. M:6X@8V]N9&ET:6]N<R!T:&4*8W5R<V]R('-I>F4@=VEL;"!N;W0@8F4@=7!D
  1653. M871E9"X@(%1H92!F;VQL;W=I;F<@<V5Q=65N8V4@;V8@8V]M;6%N9',@:&%S
  1654. M(&)E96X*9F]U;F0@=&\@=V]R:RX@($ET('=A<R!H:70@=7!O;B!B>2!A8V-I
  1655. M9&5N="P@86YD($D@:&%V92!N;R!I9&5A('=H>2!I="!W;W)K<RX*"G-E=&8@
  1656. M-SL@<V5T9B`\9F]N=&9I;&4^(#<[('-E=&8@,#L@<V5T9B`\9F]N=&9I;&4^
  1657. %(#`*"@IT
  1658. `
  1659. end
  1660. SHAR_EOF
  1661. echo 'uudecoding file smallfont/read.me' &&
  1662. uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
  1663. chmod 0644 smallfont/read.me ||
  1664. echo 'restore of smallfont/read.me failed'
  1665. Wc_c="`wc -c < 'smallfont/read.me'`"
  1666. test 1400 -eq "$Wc_c" ||
  1667.     echo 'smallfont/read.me: original size 1400, current size' "$Wc_c"
  1668. rm -f _shar_wnt_.tmp
  1669. fi
  1670. # ============= smallfont/smallfont ==============
  1671. if test -f 'smallfont/smallfont' -a X"$1" != X"-c"; then
  1672.     echo 'x - skipping smallfont/smallfont (File already exists)'
  1673.     rm -f _shar_wnt_.tmp
  1674. else
  1675. > _shar_wnt_.tmp
  1676. echo 'x - extracting smallfont/smallfont (Binary)'
  1677. sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
  1678. begin 600 smallfont/smallfont
  1679. M```!C@`'"`<````````````````````````````````%"`'Y!P`"^@4(`?D'
  1680. M``,"!0@!^0<``PH%"`'Y!P`#$@4(`?D'``,:!0@!^0<``R(%"`'Y!P`#*@4(
  1681. M`?D'``,R!0@!^0<``SH%"`'Y!P`#0@4(`?D'``-*!0@!^0<``U(%"`'Y!P`#
  1682. M6@4(`?D'``-B!0@!^0<``VH%"`'Y!P`#<@4(`?D'``-Z!0@!^0<``X(%"`'Y
  1683. M!P`#B@4(`?D'``.2!0@!^0<``YH%"`'Y!P`#H@4(`?D'``.J!0@!^0<``[(%
  1684. M"`'Y!P`#N@4(`?D'``/"!0@!^0<``\H%"`'Y!P`#T@4(`?D'``/:!0@!^0<`
  1685. M`^(%"`'Y!P`#Z@4(`?D'``/R!0@!^0<``_H%"`'Y!P`$`@4(`?D'``0*!0@!
  1686. M^0<`!!(%"`'Y!P`$&@4(`?D'``0B!0@!^0<`!"H%"`'Y!P`$,@4(`?D'``0Z
  1687. M!0@!^0<`!$(%"`'Y!P`$2@4(`?D'``12!0@!^0<`!%H%"`'Y!P`$8@4(`?D'
  1688. M``1J!0@!^0<`!'(%"`'Y!P`$>@4(`?D'``2"!0@!^0<`!(H%"`'Y!P`$D@4(
  1689. M`?D'``2:!0@!^0<`!*(%"`'Y!P`$J@4(`?D'``2R!0@!^0<`!+H%"`'Y!P`$
  1690. MP@4(`?D'``3*!0@!^0<`!-(%"`'Y!P`$V@4(`?D'``3B!0@!^0<`!.H%"`'Y
  1691. M!P`$\@4(`?D'``3Z!0@!^0<`!0(%"`'Y!P`%"@4(`?D'``42!0@!^0<`!1H%
  1692. M"`'Y!P`%(@4(`?D'``4J!0@!^0<`!3(%"`'Y!P`%.@4(`?D'``5"!0@!^0<`
  1693. M!4H%"`'Y!P`%4@4(`?D'``5:!0@!^0<`!6(%"`'Y!P`%:@4(`?D'``5R!0@!
  1694. M^0<`!7H%"`'Y!P`%@@4(`?D'``6*!0@!^0<`!9(%"`'Y!P`%F@4(`?D'``6B
  1695. M!0@!^0<`!:H%"`'Y!P`%L@4(`?D'``6Z!0@!^0<`!<(%"`'Y!P`%R@4(`?D'
  1696. M``72!0@!^0<`!=H%"`'Y!P`%X@4(`?D'``7J!0@!^0<`!?(`````````````
  1697. M``````````0`!``$``0`!`````0````*``H`"@``````````````"@`*`!\`
  1698. M"@`?``H`"@````0`'@`%``X`%``/``0````3`!,`"``$``(`&0`9`````@`%
  1699. M``4``@`5``D`%@````8`!``"```````````````$``(``0`!``$``@`$````
  1700. M!``(`!``$``0``@`!```````!``5``X`#@`5``0```````0`!``?``0`!```
  1701. M``````````````````8`!``"`````````!\`````````````````````````
  1702. M!``$````$``0``@`!``"``$``0````X`$0`9`!4`$P`1``X````$``8`!0`$
  1703. M``0`!``?````#@`1`!``#@`!``$`'P```!\`$``(``P`$``1``X````(``P`
  1704. M"@`)`!\`"``(````'P`!``$`#P`0`!$`#@````X`$0`!``\`$0`1``X````?
  1705. M`!``"``$``0`!``$````#@`1`!$`#@`1`!$`#@````X`$0`1`!X`$``1``X`
  1706. M``````0`!```````!``$```````$``0```````0`!``"``@`!``"``$``@`$
  1707. M``@`````````'P```!\``````````@`$``@`$``(``0``@````X`$0`0``P`
  1708. M!`````0````.`!$`%0`=``T``0`>````!``*`!$`$0`?`!$`$0````\`$0`1
  1709. M``\`$0`1``\````.`!$``0`!``$`$0`.````#P`1`!$`$0`1`!$`#P```!\`
  1710. M`0`!``\``0`!`!\````?``$``0`/``$``0`!````#@`1``$``0`9`!$`'@``
  1711. M`!$`$0`1`!\`$0`1`!$````.``0`!``$``0`!``.````&``0`!``$``0`!$`
  1712. M#@```!$`"0`%``,`!0`)`!$````!``$``0`!``$``0`?````$0`;`!4`%0`5
  1713. M`!$`$0```!$`$0`3`!4`&0`1`!$````.`!$`$0`1`!$`$0`.````#P`1`!$`
  1714. M#P`!``$``0````X`$0`1`!$`%0`)`!8````/`!$`$0`/``4`"0`1````#@`1
  1715. M``$`#@`0`!$`#@```!\`%0`$``0`!``$``0````1`!$`$0`1`!$`$0`.````
  1716. M$0`1`!$`"@`*``0`!````!$`$0`1`!4`%0`5``H````1`!$`"@`$``H`$0`1
  1717. M````$0`1`!$`"@`$``0`!````!\`$``(``0``@`!`!\````/``$``0`!``$`
  1718. M`0`/`````0`!``(`!``(`!``$````!X`$``0`!``$``0`!X````$``H`$0``
  1719. M````````````````````````````'P````0`!``(````````````````````
  1720. M%@`9`!$`&0`6`````0`!``T`$P`1`!,`#0`````````.``$``0`!``X````0
  1721. M`!``%@`9`!$`&0`6``````````X`$0`?``$`'@````@`%``$``X`!``$``0`
  1722. M````````%@`9`!$`%@`0``X``0`!``T`$P`1`!$`$0````0````&``0`!``$
  1723. M``X````(````#``(``@`"``)``8``0`!`!$`"0`'``D`$0````8`!``$``0`
  1724. M!``$``X`````````"P`5`!4`%0`1``````````T`$P`1`!$`$0`````````.
  1725. M`!$`$0`1``X`````````#0`3`!,`#0`!``$``````!8`&0`1`!8`$``0````
  1726. M```-`!,``0`!``$`````````'@`!``X`$``/````!``$``X`!``$`!0`"```
  1727. M```````1`!$`$0`9`!8`````````$0`1``H`"@`$`````````!$`%0`5`!4`
  1728. M"@`````````1``H`!``*`!$`````````$0`1`!D`%@`0``X``````!\`"``$
  1729. M``(`'P````@`!``$``,`!``$``@````$``0`!``$``0`!``$``0``@`$``0`
  1730. I&``$``0``@`````````"`!4`"``````````?`!\`'P`?`!\`'P`?`!\$
  1731. `
  1732. end
  1733. SHAR_EOF
  1734. echo 'uudecoding file smallfont/smallfont' &&
  1735. uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
  1736. chmod 0644 smallfont/smallfont ||
  1737. echo 'restore of smallfont/smallfont failed'
  1738. Wc_c="`wc -c < 'smallfont/smallfont'`"
  1739. test 2336 -eq "$Wc_c" ||
  1740.     echo 'smallfont/smallfont: original size 2336, current size' "$Wc_c"
  1741. rm -f _shar_wnt_.tmp
  1742. fi
  1743. rm -f _shar_seq_.tmp
  1744. echo You have unpacked the last part
  1745. exit 0
  1746. exit 0 # Just in case...
  1747. -- 
  1748. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1749. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1750. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1751. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1752.