dtwm: Remove define MOTIF_ONE_DOT_ONE, backwards compatibility for motif 1.1, CDE...
[oweals/cde.git] / cde / programs / dtscreen / pyro.c
index e08c2b222c5bb30cb5cc1dd16d1494474eec583b..4cc3ce2a7b553a8efee03ccc011902fd73593af5 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
@@ -50,6 +50,8 @@
 
 #include "dtscreen.h"
 #include <math.h>
+#include <stdlib.h>
+
 #define TWOPI 6.2831853
 
 /* Define this >1 to get small rectangles instead of points */
@@ -141,8 +143,7 @@ static int  orig_p_ignite;
 static int  just_started = True;/* Greet the user right away */
 
 void
-initpyro(pwin)
-    perwindow *pwin;
+initpyro(perwindow *pwin)
 {
     pyrostruct *pp;
     rocket     *rp;
@@ -208,8 +209,7 @@ initpyro(pwin)
 
 /*ARGSUSED*/
 void
-drawpyro(pwin)
-    perwindow *pwin;
+drawpyro(perwindow *pwin)
 {
     pyrostruct *pp;
     rocket     *rp;
@@ -237,9 +237,7 @@ drawpyro(pwin)
 }
 
 static void
-ignite(pwin, pp)
-    perwindow *pwin;
-    pyrostruct *pp;
+ignite(perwindow *pwin, pyrostruct *pp)
 {
     rocket     *rp;
     int         multi, shelltype, nstars, fuse, npix, pix, color1, color2;
@@ -248,7 +246,7 @@ ignite(pwin, pp)
     x = random() % pp->width;
     xvel = FLOATRAND(-pp->maxvelx, pp->maxvelx);
 /* All this to stop too many rockets going offscreen: */
-    if (x < pp->lmargin && xvel < 0.0 || x > pp->rmargin && xvel > 0.0)
+    if ((x < pp->lmargin && xvel < 0.0) || (x > pp->rmargin && xvel > 0.0))
        xvel = -xvel;
     yvel = FLOATRAND(pp->minvely, pp->maxvely);
     fuse = INTRAND(MINFUSE, MAXFUSE);
@@ -290,10 +288,7 @@ ignite(pwin, pp)
 }
 
 static void
-animate(pwin, pp, rp)
-    perwindow *pwin;
-    pyrostruct *pp;
-    rocket     *rp;
+animate(perwindow *pwin, pyrostruct *pp, rocket *rp)
 {
     int         starn;
     float       r, theta;
@@ -327,10 +322,7 @@ animate(pwin, pp, rp)
 }
 
 static void
-shootup(pwin, pp, rp)
-    perwindow *pwin;
-    pyrostruct *pp;
-    rocket     *rp;
+shootup(perwindow *pwin, pyrostruct *pp, rocket *rp)
 {
     XFillRectangle(dsp, pwin->w, pp->bgGC, (int) (rp->x), (int) (rp->y),
                   ROCKETW, ROCKETH + 3);
@@ -348,10 +340,7 @@ shootup(pwin, pp, rp)
 }
 
 static void
-burst(pwin, pp, rp)
-    perwindow *pwin;
-    pyrostruct *pp;
-    rocket     *rp;
+burst(perwindow *pwin, pyrostruct *pp, rocket *rp)
 {
     register int starn;
     register int nstars, stype;