]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - trek/setwarp.c
Include string.h.
[bsdgames-darwin.git] / trek / setwarp.c
index 8d3d8c89bb7415827b93463dff9c5bf293835fa6..e42f54343bbc92aeabb7f70d5c0b216d667d694f 100644 (file)
@@ -1,6 +1,8 @@
+/*     $NetBSD: setwarp.c,v 1.4 1997/10/12 21:25:16 christos Exp $     */
+
 /*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1980, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
 #ifndef lint
-static char sccsid[] = "@(#)setwarp.c  5.4 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)setwarp.c  8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: setwarp.c,v 1.4 1997/10/12 21:25:16 christos Exp $");
+#endif
 #endif /* not lint */
 
-# include      "trek.h"
-# include      "getpar.h"
+#include <stdio.h>
+#include "trek.h"
+#include "getpar.h"
 
 /*
 **  SET WARP FACTOR
@@ -45,17 +53,24 @@ static char sccsid[] = "@(#)setwarp.c       5.4 (Berkeley) 6/1/90";
 **     checked for consistancy.
 */
 
-setwarp()
+/*ARGSUSED*/
+void
+setwarp(v)
+       int v;
 {
        double  warpfac;
 
        warpfac = getfltpar("Warp factor");
        if (warpfac < 0.0)
                return;
-       if (warpfac < 1.0)
-               return (printf("Minimum warp speed is 1.0\n"));
-       if (warpfac > 10.0)
-               return (printf("Maximum speed is warp 10.0\n"));
+       if (warpfac < 1.0) {
+               printf("Minimum warp speed is 1.0\n");
+               return;
+       }
+       if (warpfac > 10.0) {
+               printf("Maximum speed is warp 10.0\n");
+               return;
+       }
        if (warpfac > 6.0)
                printf("Damage to warp engines may occur above warp 6.0\n");
        Ship.warp = warpfac;