X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/462fca95471224f85b85be911e72faee16cd1597..73294a12acd4e9ce3be5c49adc331ab62d3a398f:/trek/setwarp.c diff --git a/trek/setwarp.c b/trek/setwarp.c index 075f536a..56ec60f4 100644 --- a/trek/setwarp.c +++ b/trek/setwarp.c @@ -1,6 +1,8 @@ +/* $NetBSD: setwarp.c,v 1.5 1999/09/08 21:45:33 jsm 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 @@ -31,13 +33,18 @@ * SUCH DAMAGE. */ +#include #ifndef lint -/*static char sccsid[] = "from: @(#)setwarp.c 5.4 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: setwarp.c,v 1.2 1993/08/01 18:49:59 mycroft Exp $"; +#if 0 +static char sccsid[] = "@(#)setwarp.c 8.1 (Berkeley) 5/31/93"; +#else +__RCSID("$NetBSD: setwarp.c,v 1.5 1999/09/08 21:45:33 jsm Exp $"); +#endif #endif /* not lint */ -# include "trek.h" -# include "getpar.h" +#include +#include "trek.h" +#include "getpar.h" /* ** SET WARP FACTOR @@ -46,17 +53,24 @@ static char rcsid[] = "$Id: setwarp.c,v 1.2 1993/08/01 18:49:59 mycroft Exp $"; ** checked for consistancy. */ -setwarp() +/*ARGSUSED*/ +void +setwarp(v) + int v __attribute__((__unused__)); { 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;