oneko dumps core! BUG FIX + System V port

Keith "Cheese Whiz" Gabryelski ag at amix.commodore.com
Thu Mar 7 08:39:11 AEST 1991


In article <MICHEL.91Mar5164822 at eutes3.es.ele.tue.nl> michel at es.ele.tue.nl
(Michel Berkelaar) writes:
>The oneko version I took from alt.sources dumps core on Apollo workstations
>and an Alliant FX/8 computer in our group, whether compiled with cc or gcc.
>It looks as if it can only work with compilers which allow NULL pointer
>dereferencing ... Or else something is going wrong completely.

Not a NULL pointer bug per se'.  It was due to a questionable
structure array definition.  The diffs:

*** oneko.c-	Wed Mar  6 12:09:37 1991
--- oneko.c	Wed Mar  6 17:26:33 1991
***************
*** 187,228 ****
  
  Animation	AnimationPattern[][2] =
  {
!     { &Mati2GC, &Mati2Msk },
!     { &Mati2GC, &Mati2Msk },		/* NekoState == NEKO_STOP */
!     { &Jare2GC, &Jare2Msk },
!     { &Mati2GC, &Mati2Msk },		/* NekoState == NEKO_JARE */
!     { &Kaki1GC, &Kaki1Msk },
!     { &Kaki2GC, &Kaki2Msk },		/* NekoState == NEKO_KAKI */
!     { &Mati3GC, &Mati3Msk },
!     { &Mati3GC, &Mati3Msk },		/* NekoState == NEKO_AKUBI */
!     { &Sleep1GC, &Sleep1Msk },
!     { &Sleep2GC, &Sleep2Msk },		/* NekoState == NEKO_SLEEP */
!     { &AwakeGC, &AwakeMsk },
!     { &AwakeGC, &AwakeMsk },		/* NekoState == NEKO_AWAKE */
!     { &Up1GC, &Up1Msk },
!     { &Up2GC, &Up2Msk },		/* NekoState == NEKO_U_MOVE */
!     { &Down1GC, &Down1Msk },
!     { &Down2GC, &Down2Msk },		/* NekoState == NEKO_D_MOVE */
!     { &Left1GC, &Left1Msk },
!     { &Left2GC, &Left2Msk },		/* NekoState == NEKO_L_MOVE */
!     { &Right1GC, &Right1Msk },
!     { &Right2GC, &Right2Msk },		/* NekoState == NEKO_R_MOVE */
!     { &UpLeft1GC, &UpLeft1Msk },
!     { &UpLeft2GC, &UpLeft2Msk },	/* NekoState == NEKO_UL_MOVE */
!     { &UpRight1GC, &UpRight1Msk },
!     { &UpRight2GC, &UpRight2Msk },	/* NekoState == NEKO_UR_MOVE */
!     { &DownLeft1GC, &DownLeft1Msk },
!     { &DownLeft2GC, &DownLeft2Msk },	/* NekoState == NEKO_DL_MOVE */
!     { &DownRight1GC, &DownRight1Msk },
!     { &DownRight2GC, &DownRight2Msk },	/* NekoState == NEKO_DR_MOVE */
!     { &UpTogi1GC, &UpTogi1Msk },
!     { &UpTogi2GC, &UpTogi2Msk },	/* NekoState == NEKO_U_TOGI */
!     { &DownTogi1GC, &DownTogi1Msk },
!     { &DownTogi2GC, &DownTogi2Msk },	/* NekoState == NEKO_D_TOGI */
!     { &LeftTogi1GC, &LeftTogi1Msk },
!     { &LeftTogi2GC, &LeftTogi2Msk },	/* NekoState == NEKO_L_TOGI */
!     { &RightTogi1GC, &RightTogi1Msk },
!     { &RightTogi2GC, &RightTogi2Msk },	/* NekoState == NEKO_R_TOGI */
  };
  
  
--- 187,228 ----
  
  Animation	AnimationPattern[][2] =
  {
!     { { &Mati2GC, &Mati2Msk },
!       { &Mati2GC, &Mati2Msk }, },	/* NekoState == NEKO_STOP */
!     { { &Jare2GC, &Jare2Msk },
!       { &Mati2GC, &Mati2Msk }, },	/* NekoState == NEKO_JARE */
!     { { &Kaki1GC, &Kaki1Msk },
!       { &Kaki2GC, &Kaki2Msk }, },	/* NekoState == NEKO_KAKI */
!     { { &Mati3GC, &Mati3Msk },
!       { &Mati3GC, &Mati3Msk }, },	/* NekoState == NEKO_AKUBI */
!     { { &Sleep1GC, &Sleep1Msk },
!       { &Sleep2GC, &Sleep2Msk }, },	/* NekoState == NEKO_SLEEP */
!     { { &AwakeGC, &AwakeMsk },
!       { &AwakeGC, &AwakeMsk }, },	/* NekoState == NEKO_AWAKE */
!     { { &Up1GC, &Up1Msk },
!       { &Up2GC, &Up2Msk }, },		/* NekoState == NEKO_U_MOVE */
!     { { &Down1GC, &Down1Msk },
!       { &Down2GC, &Down2Msk }, },	/* NekoState == NEKO_D_MOVE */
!     { { &Left1GC, &Left1Msk },
!       { &Left2GC, &Left2Msk }, },	/* NekoState == NEKO_L_MOVE */
!     { { &Right1GC, &Right1Msk },
!       { &Right2GC, &Right2Msk }, },	/* NekoState == NEKO_R_MOVE */
!     { { &UpLeft1GC, &UpLeft1Msk },
!       { &UpLeft2GC, &UpLeft2Msk }, },	/* NekoState == NEKO_UL_MOVE */
!     { { &UpRight1GC, &UpRight1Msk },
!       { &UpRight2GC, &UpRight2Msk }, },	/* NekoState == NEKO_UR_MOVE */
!     { { &DownLeft1GC, &DownLeft1Msk },
!       { &DownLeft2GC, &DownLeft2Msk }, }, /* NekoState == NEKO_DL_MOVE */
!     { { &DownRight1GC, &DownRight1Msk },
!       { &DownRight2GC, &DownRight2Msk }, }, /* NekoState == NEKO_DR_MOVE */
!     { { &UpTogi1GC, &UpTogi1Msk },
!       { &UpTogi2GC, &UpTogi2Msk }, },	/* NekoState == NEKO_U_TOGI */
!     { { &DownTogi1GC, &DownTogi1Msk },
!       { &DownTogi2GC, &DownTogi2Msk }, }, /* NekoState == NEKO_D_TOGI */
!     { { &LeftTogi1GC, &LeftTogi1Msk },
!       { &LeftTogi2GC, &LeftTogi2Msk }, }, /* NekoState == NEKO_L_TOGI */
!     { { &RightTogi1GC, &RightTogi1Msk },
!       { &RightTogi2GC, &RightTogi2Msk }, }, /* NekoState == NEKO_R_TOGI */
  };
  
  
***************
*** 1056,1061 ****
--- 1056,1064 ----
  NullFunction()
  {
      /* No Operation */
+ #ifdef SYSV
+     signal(SIGALRM, NullFunction);
+ #endif /* !SYSV */
  }
  
  /*

-- 
Would you like some Bill Sperm with that?
Keith Gabryelski                                 Advanced Products Group
ag at amix.commodore.com                                 ...!cbmvax!amix!ag



More information about the Alt.sources mailing list