+/* $NetBSD: damage.c,v 1.4 1997/10/12 21:24:36 christos 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
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-static char sccsid[] = "@(#)damage.c 5.4 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)damage.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: damage.c,v 1.4 1997/10/12 21:24:36 christos Exp $");
+#endif
#endif /* not lint */
-# include "trek.h"
+#include <stdio.h>
+#include <err.h>
+#include "trek.h"
/*
** Schedule Ship.damages to a Device
** that the dock() and undock() have to reschedule the event.
*/
+void
damage(dev1, dam)
int dev1; /* device index */
double dam; /* time to repair */
{
- register int i;
- register struct event *e;
- int f;
- register int dev;
+ int i;
+ struct event *e;
+ int f;
+ int dev;
/* ignore zero damages */
if (dam <= 0.0)
reschedule(e, e->date - Now.date + dam);
return;
}
- syserr("Cannot find old damages %d\n", dev);
+ errx(1, "Cannot find old damages %d\n", dev);
}