+/* $NetBSD: dr_main.c,v 1.11 2001/02/05 01:10:09 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[] = "@(#)dr_main.c 5.5 (Berkeley) 6/1/90";
+#if 0
+static char sccsid[] = "@(#)dr_main.c 8.2 (Berkeley) 4/16/94";
+#else
+__RCSID("$NetBSD: dr_main.c,v 1.11 2001/02/05 01:10:09 christos Exp $");
+#endif
#endif /* not lint */
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "extern.h"
#include "driver.h"
-dr_main()
+int
+dr_main(void)
{
- register int n;
- register struct ship *sp;
+ int n;
+ struct ship *sp;
int nat[NNATION];
int value = 0;
- (void) signal(SIGINT, SIG_IGN);
- (void) signal(SIGQUIT, SIG_IGN);
- (void) signal(SIGTSTP, SIG_IGN);
- if (issetuid)
- (void) setruid(geteuid());
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGTSTP, SIG_IGN);
if (game < 0 || game >= NSCENE) {
fprintf(stderr, "DRIVER: Bad game number %d\n", game);
exit(1);
foreachship(sp) {
if (sp->file == NULL &&
(sp->file = (struct File *)calloc(1, sizeof (struct File))) == NULL) {
- (void) fprintf(stderr, "DRIVER: Out of memory.\n");
+ fprintf(stderr, "DRIVER: Out of memory.\n");
exit(1);
}
sp->file->index = sp - SHIP(0);