ACM Revision 4 Patch #2
			 Riley Rainey

APPLYING THIS PATCH:

cd to the top of the source tree (the directory that contains the "src" and
"V" subdirectories) and type:

	$ patch -p -s < PatchFilename

Then rebuild everything.

	$ ./configure
	$ make

Summary of fixes:


*** ./README@@/V4.1	Tue Dec 14 10:30:49 1993
--- ./README	Tue Dec 14 11:08:14 1993
***************
*** 1,4 ****
! ACM Flight Simulator,  revision 4.1
  
  
  What is ACM?
--- 1,4 ----
! ACM Flight Simulator,  revision 4.2
  
  
  What is ACM?
***************
*** 24,30 ****
  
  Riley Rainey (rainey@netcom.com OR riley@atria.com)
  Dallas, Texas
! November 15, 1993
  
  
  Building ACM:
--- 24,30 ----
  
  Riley Rainey (rainey@netcom.com OR riley@atria.com)
  Dallas, Texas
! December 15, 1993
  
  
  Building ACM:
***************
*** 67,72 ****
--- 67,80 ----
  
  Imakefiles have been kept for historical reasons.  xmkmf should be used only
  as a last resort in the case that `configure' fails to work properly.
+ 
+ 
+ What's different with revision 4.2:
+ -----------------------------------
+ 
+ Several nits reported by CodeCenter have been repaired by Brad Bass.
+ 
+ Makefiles now use the $(MFLAGS) macro, where needed.
  
  
  What's different with revision 4.1:
*** ./V/lib/FillPoly.c@@/V4.1	Thu May  7 09:29:37 1992
--- ./V/lib/FillPoly.c	Tue Dec 14 10:39:33 1993
***************
*** 1,6 ****
  #include <Alib.h>
  
! extern void MakeET();
  
  void FillPolygon (w, pts, npts, zinfo)
  AWindow	*w;
--- 1,6 ----
  #include <Alib.h>
  
! extern int MakeET();
  
  void FillPolygon (w, pts, npts, zinfo)
  AWindow	*w;
*** ./V/lib/FillRect.c@@/V4.1	Thu Oct 15 17:02:34 1992
--- ./V/lib/FillRect.c	Tue Dec 14 10:39:42 1993
***************
*** 1,6 ****
  #include <Alib.h>
  
! extern void MakeET();
  
  void FillRectangle (w, x, y, width, height, zinfo)
  AWindow	*w;
--- 1,6 ----
  #include <Alib.h>
  
! extern int MakeET();
  
  void FillRectangle (w, x, y, width, height, zinfo)
  AWindow	*w;
*** ./V/lib/InitAWin.c@@/V4.1	Wed Sep 29 17:19:16 1993
--- ./V/lib/InitAWin.c	Tue Dec 14 10:39:50 1993
***************
*** 152,158 ****
  	return w;
  }
  
! void
  ResizeAWindow (w, height, width)
  AWindow *w;
  int	height, width;
--- 152,158 ----
  	return w;
  }
  
! void /*ARGSUSED*/
  ResizeAWindow (w, height, width)
  AWindow *w;
  int	height, width;
*** ./V/lib/VClipPoly.c@@/V4.1	Mon Sep 13 13:38:55 1993
--- ./V/lib/VClipPoly.c	Tue Dec 14 10:39:59 1993
***************
*** 106,112 ****
      return p;
  }
  
! VPolygon *
  VClipSidedPolygon (v, poly, clipPoly)
  Viewport	*v;
  VPolygon	*poly, *clipPoly;
--- 106,112 ----
      return p;
  }
  
! VPolygon * /*ARGSUSED*/
  VClipSidedPolygon (v, poly, clipPoly)
  Viewport	*v;
  VPolygon	*poly, *clipPoly;
*** ./V/lib/VDrawStroke.c@@/V4.1	Thu May  7 09:30:20 1992
--- ./V/lib/VDrawStroke.c	Tue Dec 14 10:40:13 1993
***************
*** 1,7 ****
  #include <Vlib.h>
  #include <VFont.h>
  #include <VRoman.h>
! 
  int VFontWidthPixels (v, scale)
  Viewport	*v;
  int		scale; {
--- 1,7 ----
  #include <Vlib.h>
  #include <VFont.h>
  #include <VRoman.h>
! /*ARGSUSED*/
  int VFontWidthPixels (v, scale)
  Viewport	*v;
  int		scale; {
*** ./V/lib/VFillPoly.c@@/V4.1	Mon Sep 13 13:39:06 1993
--- ./V/lib/VFillPoly.c	Tue Dec 14 10:40:24 1993
***************
*** 1,7 ****
  #include "Vlib.h"
  
  #define COLLAPSEUNUSEDPOINTS
! 
  void VFillPolygon(v, win, gc, poly)
  Viewport *v;
  Window	 win;
--- 1,7 ----
  #include "Vlib.h"
  
  #define COLLAPSEUNUSEDPOINTS
! /*ARGSUSED*/
  void VFillPolygon(v, win, gc, poly)
  Viewport *v;
  Window	 win;
*** ./V/lib/VReadObject.c@@/V4.1	Tue Sep 21 10:24:40 1993
--- ./V/lib/VReadObject.c	Tue Dec 14 10:40:33 1993
***************
*** 249,255 ****
  		token[token_length] = '\0';
  		state = STATE_INITIAL;
  		return TOKEN_RGB_VALUE;
! 		break;
  			
  
  	    }
--- 249,255 ----
  		token[token_length] = '\0';
  		state = STATE_INITIAL;
  		return TOKEN_RGB_VALUE;
! /*NOTREACHED*/	break;
  			
  
  	    }
*** ./V/Makefile.in@@/V4.1	Tue Dec 14 10:30:55 1993
--- ./V/Makefile.in	Tue Dec 14 10:42:46 1993
***************
*** 9,20 ****
  all install uninstall clean mostlyclean realclean tags info dvi dist check:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $@ ) ; \
  	done
  
  distclean:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $@ ) ; \
  	done
  	rm -f Makefile
--- 9,20 ----
  all install uninstall clean mostlyclean realclean tags info dvi dist check:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $(MFLAGS) $@ ) ; \
  	done
  
  distclean:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $(MFLAGS) $@ ) ; \
  	done
  	rm -f Makefile
*** ./src/alarm.c@@/V4.1	Fri Sep  3 11:24:35 1993
--- ./src/alarm.c	Tue Dec 14 10:36:01 1993
***************
*** 109,115 ****
  }
  
  /* NOT YET IMPLEMENTED ... */
! void
  cancelAlarm (id)
  alarm_id_t id;
  {
--- 109,115 ----
  }
  
  /* NOT YET IMPLEMENTED ... */
! void /*ARGSUSED*/
  cancelAlarm (id)
  alarm_id_t id;
  {
*** ./src/box.c@@/V4.1	Mon Oct 19 15:19:40 1992
--- ./src/box.c	Tue Dec 14 10:36:11 1993
***************
*** 18,28 ****
--- 18,31 ----
  #include "pm.h"
  #include "box.h"
  #include <stdio.h>
+ #include <string.h>
  
  static FILE *bbin = 0, *bbout = 0;
  
  extern craftType *lookupCraft();
  extern int newPlane();
+ extern void buildEulerMatrix();
+ extern void transpose();
  
  short rp_map[MAXPLAYERS], rm_map[MAXPROJECTILES];
  short pp_map[MAXPLAYERS], pm_map[MAXPROJECTILES];
***************
*** 30,36 ****
  static char *no_room =
  	"No room in player table to add another black box object.\n";
  
! craft *
  newBlackBoxCraft(id, type, name)
  int	id;
  int	type;
--- 33,39 ----
  static char *no_room =
  	"No room in player table to add another black box object.\n";
  
! void
  newBlackBoxCraft(id, type, name)
  int	id;
  int	type;
***************
*** 56,62 ****
  			fprintf (stderr, no_room);
  		}
  		return;
! 		break;
  
  	case CT_MISSILE:
  	case CT_CANNON:
--- 59,65 ----
  			fprintf (stderr, no_room);
  		}
  		return;
! /*NOTREACHED*/	break;
  
  	case CT_MISSILE:
  	case CT_CANNON:
*** ./src/chaser.c@@/V4.1	Mon Oct 18 08:54:42 1993
--- ./src/chaser.c	Tue Dec 14 10:36:21 1993
***************
*** 25,30 ****
--- 25,33 ----
  #define MAX_POPUP_STRING_LEN	40
  
  extern int debug;
+ extern void startBlackBoxRecording();
+ extern void endBlackBoxRecording();
+ extern void startBlackBoxPlayback();
  
  int
  newChaser (who, me)
***************
*** 71,80 ****
  	XComposeStatus	compose;
  	char		buffer[MAX_MAPPED_STRING_LEN];
  	int		buflen = MAX_MAPPED_STRING_LEN;
- #ifdef SPECIAL_KEYS
- 	FILE		*fp;
- 	craft		pentry;
- #endif
  
  	(void) XLookupString (ev, buffer, buflen, &keysym, &compose);
  
--- 74,79 ----
***************
*** 185,191 ****
  		case XK_p:
  			killChaser (c);
  			return -1;
! 			break;
  
  		case XK_braceleft:
  			startBlackBoxRecording();
--- 184,190 ----
  		case XK_p:
  			killChaser (c);
  			return -1;
! /*NOTREACHED*/		break;
  
  		case XK_braceleft:
  			startBlackBoxRecording();
***************
*** 253,259 ****
    return 0;
  }
  
! void
  resizeChaserWindow (c, u, width, height, initial_flag)
  craft	*c;
  viewer	*u;
--- 252,258 ----
    return 0;
  }
  
! void /*ARGSUSED*/
  resizeChaserWindow (c, u, width, height, initial_flag)
  craft	*c;
  viewer	*u;
*** ./src/doEvents.c@@/V4.1	Fri Oct  8 16:22:48 1993
--- ./src/doEvents.c	Tue Dec 14 10:36:40 1993
***************
*** 32,37 ****
--- 32,38 ----
  
  extern void startBlackBoxRecording(), endBlackBoxRecording();
  extern void startBlackBoxPlayback();
+ extern void radioFrequencyChanged();
  
  void doEvents(c)
  craft *c; 
***************
*** 510,516 ****
  		case XK_p:
  			killPlayer (c);
  			return -1;
! 			break;
  
  		case XK_braceleft:
  			startBlackBoxRecording();
--- 511,517 ----
  		case XK_p:
  			killPlayer (c);
  			return -1;
! /*NOTREACHED*/		break;
  
  		case XK_braceleft:
  			startBlackBoxRecording();
*** ./src/doViews.c@@/V4.1	Mon Oct 18 08:54:46 1993
--- ./src/doViews.c	Tue Dec 14 10:36:53 1993
***************
*** 25,31 ****
  extern void doDroneRadar(), doTEWS();
  extern void placeCraft();
  extern void doScale(), doCompassScale();
! extern void doHUD();
  
  #define lim	((double) -1052500.0)
  
--- 25,32 ----
  extern void doDroneRadar(), doTEWS();
  extern void placeCraft();
  extern void doScale(), doCompassScale();
! extern void doHUD(), doHSI();
! extern void doPanel();
  
  #define lim	((double) -1052500.0)
  
*** ./src/effects.c@@/V4.1	Tue Sep 21 11:09:11 1993
--- ./src/effects.c	Tue Dec 14 10:37:05 1993
***************
*** 167,173 ****
  
  }
  
! int
  placeExplosion (v, obj, mtx, poly, cnt)
  Viewport	*v;
  craft		*obj;
--- 167,173 ----
  
  }
  
! int /*ARGSUSED*/
  placeExplosion (v, obj, mtx, poly, cnt)
  Viewport	*v;
  craft		*obj;
*** ./src/gear.c@@/V4.1	Thu Oct  7 15:39:03 1993
--- ./src/gear.c	Tue Dec 14 10:37:23 1993
***************
*** 19,24 ****
--- 19,26 ----
  #include <math.h>
  #include "pm.h"
  
+ extern void euler(), buildEulerMatrix(), transpose();
+ 
  /*
   *  Determine the time, relative to the beginning of this time interval,
   *  that the landing gear first make contact with the ground.  Return -1
*** ./src/hsi.c@@/V4.1	Thu Sep  2 17:05:20 1993
--- ./src/hsi.c	Tue Dec 14 10:37:33 1993
***************
*** 34,39 ****
--- 34,40 ----
  extern double radial();
  extern double glideSlopeOffset();
  extern void ShortTransform();
+ extern void VMatrixToShortMatrix();
  
  void
  doHSI (c, u)
*** ./src/hud.c@@/V4.1	Thu Sep  2 17:05:22 1993
--- ./src/hud.c	Tue Dec 14 10:37:45 1993
***************
*** 24,29 ****
--- 24,30 ----
  extern void doScale(), doCompassScale();
  extern void ShortTransform();
  void doLadder();
+ extern void VMatrixToShortMatrix();
  
  #define FLIGHTDEBUG
  
*** ./src/m61a1.c@@/V4.1	Fri Oct 15 14:39:17 1993
--- ./src/m61a1.c	Tue Dec 14 10:37:58 1993
***************
*** 35,40 ****
--- 35,41 ----
  int release_m61a1();
  extern craftType * lookupCraft();
  extern FILE * acm_fopen();
+ extern void newExplosion();
  void lcos();
  
  int	cdebug = 0;		/* set to 1 to debug cannon fire */
***************
*** 388,394 ****
   { -1.0, 0.0 },
   { -0.866, -0.5 },
   { -0.5, -0.866 } };
! 
  void plotReticle (c, u, x, y, range)
  craft	*c;
  viewer	*u;
--- 389,395 ----
   { -1.0, 0.0 },
   { -0.866, -0.5 },
   { -0.5, -0.866 } };
! /*ARGSUSED*/
  void plotReticle (c, u, x, y, range)
  craft	*c;
  viewer	*u;
*** ./src/missile.c@@/V4.1	Fri Dec  4 15:45:56 1992
--- ./src/missile.c	Tue Dec 14 10:38:08 1993
***************
*** 32,37 ****
--- 32,39 ----
  extern int mdebug;
  extern void lookForCannonImpacts();
  extern void euler();
+ extern void transpose();
+ extern void buildEulerMatrix();
  extern void newExplosion();
  
  int	fireMissile (c, ind)
*** ./src/newObserver.c@@/V4.1	Tue Oct  5 16:03:13 1993
--- ./src/newObserver.c	Tue Dec 14 10:38:18 1993
***************
*** 18,24 ****
   
  #include "pm.h"
  
! int
  newObserver(who)
  int who;
  {
--- 18,24 ----
   
  #include "pm.h"
  
! int /*ARGSUSED*/
  newObserver(who)
  int who;
  {
*** ./src/newPlane.c@@/V4.1	Tue Nov  2 16:58:05 1993
--- ./src/newPlane.c	Tue Dec 14 10:38:28 1993
***************
*** 31,36 ****
--- 31,37 ----
  
  extern int radioReceptionCheck();
  extern void initRadio();
+ extern void initDamage();
  
  craftType *
  lookupCraft (name)
*** ./src/newPlayer.c@@/V4.1	Tue Dec 14 10:31:10 1993
--- ./src/newPlayer.c	Tue Dec 14 10:38:40 1993
***************
*** 35,43 ****
--- 35,46 ----
  #include <X11/cursorfont.h>
  
  extern void resizePlayerWindow ();
+ extern void resizeChaserWindow();
  extern void newExplosion ();
  extern void blackBoxKillPlayer ();
  extern void printValidAircraft ();
+ extern void buildEulerMatrix();
+ extern void transpose();
  
  #define BORDER	1
  
***************
*** 202,208 ****
      int		chaser = -1;
      int		width, height;	/* dimensions of main window */
      double	scale;
!     int		depth, mono = 0;
      long	win_attr_mask;
      Visual	*theVisual;
      XSetWindowAttributes window_attributes;
--- 205,211 ----
      int		chaser = -1;
      int		width, height;	/* dimensions of main window */
      double	scale;
!     unsigned	depth, mono = 0;
      long	win_attr_mask;
      Visual	*theVisual;
      XSetWindowAttributes window_attributes;
*** ./src/server.c@@/V4.1	Tue Dec 14 10:31:14 1993
--- ./src/server.c	Tue Dec 14 10:38:47 1993
***************
*** 25,30 ****
--- 25,31 ----
  #include "patchlevel.h"
  #include <sys/types.h>
  #include <stdio.h>
+ #include <string.h>
  #include <pwd.h>
  #include <signal.h>
  #include <sys/socket.h>
*** ./src/transpose.c@@/V4.1	Thu Oct 15 16:52:46 1992
--- ./src/transpose.c	Tue Dec 14 10:38:57 1993
***************
*** 18,24 ****
   
  #include <Vlib.h>
  
! int	transpose (m, r)
  VMatrix *m, *r; {
  
  	int	i, j;
--- 18,24 ----
   
  #include <Vlib.h>
  
! void	transpose (m, r)
  VMatrix *m, *r; {
  
  	int	i, j;
***************
*** 26,30 ****
  	for (i=0; i<4; ++i)
  		for (j=0; j<4; ++j)
  			r->m[i][j] = m->m[j][i];
- 	return 0;
  }
--- 26,29 ----
*** ./src/patchlevel.h@@/V4.1	Tue Dec 14 10:31:12 1993
--- ./src/patchlevel.h	Tue Dec 14 11:05:39 1993
***************
*** 1,4 ****
  #define REVISION	4
! #define PATCHLEVEL	1
  
! #define REVISION_STRING "4.1"
--- 1,4 ----
  #define REVISION	4
! #define PATCHLEVEL	2
  
! #define REVISION_STRING "4.2"
*** ./Makefile.in@@/V4.1	Tue Dec 14 10:30:43 1993
--- ./Makefile.in	Tue Dec 14 10:42:25 1993
***************
*** 10,16 ****
  all install uninstall clean mostlyclean realclean tags info dvi dist check:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $@ ) ; \
  	done
  
  Makefile: Makefile.in config.status
--- 10,16 ----
  all install uninstall clean mostlyclean realclean tags info dvi dist check:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $(MFLAGS) $@ ) ; \
  	done
  
  Makefile: Makefile.in config.status
***************
*** 25,30 ****
  distclean:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $@ ) ; \
  	done
  	rm -f Makefile config.status
--- 25,30 ----
  distclean:
  	@for i in $(SUBDIRS) ; do \
  		echo Making $@ in ./$${i} ... ; \
! 		( cd $$i ; $(MAKE) $(MFLAGS) $@ ) ; \
  	done
  	rm -f Makefile config.status