1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)dr_4.c	5.1 (Berkeley) 5/29/85";
   9: #endif not lint
  10: 
  11: #include "externs.h"
  12: 
  13: ungrap(from, to)
  14: register struct ship *from, *to;
  15: {
  16:     register k;
  17:     char friend;
  18: 
  19:     if ((k = grappled2(from, to)) == 0)
  20:         return;
  21:     friend = capship(from)->nationality == capship(to)->nationality;
  22:     while (--k >= 0) {
  23:         if (friend || die() < 3) {
  24:             cleangrapple(from, to, 0);
  25:             makesignal(from, "ungrappling %s (%c%c)", to);
  26:         }
  27:     }
  28: }
  29: 
  30: grap(from, to)
  31: register struct ship *from, *to;
  32: {
  33:     if (capship(from)->nationality != capship(to)->nationality && die() > 2)
  34:         return;
  35:     Write(W_GRAP, from, 0, to->file->index, 0, 0, 0);
  36:     Write(W_GRAP, to, 0, from->file->index, 0, 0, 0);
  37:     makesignal(from, "grappled with %s (%c%c)", to);
  38: }

Defined functions

grap defined in line 30; used 2 times
ungrap defined in line 13; used 2 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 870
Valid CSS Valid XHTML 1.0 Strict