-/* $NetBSD: dock.c,v 1.4 1997/10/12 21:24:41 christos Exp $ */
+/* $NetBSD: dock.c,v 1.10 2009/05/24 22:55:03 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
* 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.
*
#if 0
static char sccsid[] = "@(#)dock.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dock.c,v 1.4 1997/10/12 21:24:41 christos Exp $");
+__RCSID("$NetBSD: dock.c,v 1.10 2009/05/24 22:55:03 dholland Exp $");
#endif
#endif /* not lint */
/*ARGSUSED*/
void
-dock(v)
- int v;
+dock(int v __unused)
{
int i, j;
int ok;
}
/* check for ok to dock, i.e., adjacent to a starbase */
ok = 0;
- for (i = Ship.sectx - 1; i <= Ship.sectx + 1 && !ok; i++)
- {
+ for (i = Ship.sectx - 1; i <= Ship.sectx + 1 && !ok; i++) {
if (i < 0 || i >= NSECTS)
continue;
- for (j = Ship.secty - 1; j <= Ship.secty + 1; j++)
- {
+ for (j = Ship.secty - 1; j <= Ship.secty + 1; j++) {
if (j < 0 || j >= NSECTS)
continue;
- if (Sect[i][j] == BASE)
- {
+ if (Sect[i][j] == BASE) {
ok++;
break;
}
}
}
if (!ok) {
- printf("Chekov: But captain, we are not adjacent to a starbase.\n");
+ printf("Chekov: But captain, we are not adjacent to a "
+ "starbase.\n");
return;
}
dumpssradio();
/* reschedule any device repairs */
- for (i = 0; i < MAXEVENTS; i++)
- {
+ for (i = 0; i < MAXEVENTS; i++) {
e = &Event[i];
if (e->evcode != E_FIXDV)
continue;
/*ARGSUSED*/
void
-undock(v)
- int v;
+undock(int v __unused)
{
struct event *e;
int i;
- if (Ship.cond != DOCKED)
- {
+ if (Ship.cond != DOCKED) {
printf("Sulu: Pardon me captain, but we are not docked.\n");
return;
}
Move.free = 0;
/* reschedule device repair times (again) */
- for (i = 0; i < MAXEVENTS; i++)
- {
+ for (i = 0; i < MAXEVENTS; i++) {
e = &Event[i];
if (e->evcode != E_FIXDV)
continue;