+/* $NetBSD: dock.c,v 1.7 2007/12/15 19:44:44 perry 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
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-/*static char sccsid[] = "from: @(#)dock.c 5.4 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: dock.c,v 1.2 1993/08/01 18:50:40 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)dock.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: dock.c,v 1.7 2007/12/15 19:44:44 perry Exp $");
+#endif
#endif /* not lint */
-# include "trek.h"
+#include <stdio.h>
+#include "trek.h"
/*
** DOCK TO STARBASE
** are docked.
*/
-dock()
+/*ARGSUSED*/
+void
+dock(v)
+ int v __unused;
{
- register int i, j;
- int ok;
- register struct event *e;
+ int i, j;
+ int ok;
+ struct event *e;
- if (Ship.cond == DOCKED)
- return (printf("Chekov: But captain, we are already docked\n"));
+ if (Ship.cond == DOCKED) {
+ printf("Chekov: But captain, we are already docked\n");
+ return;
+ }
/* check for ok to dock, i.e., adjacent to a starbase */
ok = 0;
for (i = Ship.sectx - 1; i <= Ship.sectx + 1 && !ok; i++)
}
}
}
- if (!ok)
- return (printf("Chekov: But captain, we are not adjacent to a starbase.\n"));
+ if (!ok) {
+ printf("Chekov: But captain, we are not adjacent to a starbase.\n");
+ return;
+ }
/* restore resources */
Ship.energy = Param.energy;
** is to reschedule any damages so that they will take longer.
*/
-undock()
+/*ARGSUSED*/
+void
+undock(v)
+ int v __unused;
{
- register struct event *e;
- register int i;
+ struct event *e;
+ int i;
if (Ship.cond != DOCKED)
{