+/* $NetBSD: main.c,v 1.6 1997/10/13 21:03:55 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
-char copyright[] =
-"@(#) Copyright (c) 1983 Regents of the University of California.\n\
- All rights reserved.\n";
+__COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "from: @(#)main.c 5.5 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: main.c,v 1.2 1993/08/01 18:51:44 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/28/95";
+#else
+__RCSID("$NetBSD: main.c,v 1.6 1997/10/13 21:03:55 christos Exp $");
+#endif
#endif /* not lint */
-#include "externs.h"
+#include "extern.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main __P((int, char **));
/*ARGSUSED*/
+int
main(argc, argv)
int argc;
- register char **argv;
+ char **argv;
{
- register char *p;
+ char *p;
int i;
(void) srand(getpid());
issetuid = getuid() != geteuid();
- if (p = rindex(*argv, '/'))
+ if ((p = strrchr(*argv, '/')) != NULL)
p++;
else
p = *argv;
debug++;
break;
case 'x':
- randomize;
+ randomize++;
break;
case 'l':
longfmt++;
game = atoi(*argv);
else
game = -1;
- if (i = setjmp(restart))
+ if ((i = setjmp(restart)) != 0)
mode = i;
switch (mode) {
case MODE_PLAYER: