+/* $NetBSD: dr_4.c,v 1.6 1997/10/13 21:03:37 christos Exp $ */
+
/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1983, 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[] = "from: @(#)dr_4.c 5.4 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: dr_4.c,v 1.2 1993/08/01 18:51:49 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)dr_4.c 8.2 (Berkeley) 4/28/95";
+#else
+__RCSID("$NetBSD: dr_4.c,v 1.6 1997/10/13 21:03:37 christos Exp $");
+#endif
#endif /* not lint */
-#include "externs.h"
+#include "extern.h"
+#include <stdlib.h>
+void
ungrap(from, to)
-register struct ship *from, *to;
+struct ship *from, *to;
{
- register k;
+ int k;
char friend;
if ((k = grappled2(from, to)) == 0)
while (--k >= 0) {
if (friend || die() < 3) {
cleangrapple(from, to, 0);
- makesignal(from, "ungrappling %s (%c%c)", to);
+ makesignal(from, "ungrappling $$", to);
}
}
}
+void
grap(from, to)
-register struct ship *from, *to;
+struct ship *from, *to;
{
if (capship(from)->nationality != capship(to)->nationality && die() > 2)
return;
Write(W_GRAP, from, 0, to->file->index, 0, 0, 0);
Write(W_GRAP, to, 0, from->file->index, 0, 0, 0);
- makesignal(from, "grappled with %s (%c%c)", to);
+ makesignal(from, "grappled with $$", to);
}