summaryrefslogtreecommitdiffstats
path: root/dm/dm.c
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-03-21 15:03:38 +0000
committercgd <cgd@NetBSD.org>1995-03-21 15:03:38 +0000
commit5ff78ede5ea1a80c654d3f0684cd5f36d5253ae1 (patch)
tree81a19a5b24b0353e8cbac8b1f0ad82be1cf16323 /dm/dm.c
parent45171656c266fc63f08d074d856b5ae99ac29211 (diff)
downloadbsdgames-darwin-5ff78ede5ea1a80c654d3f0684cd5f36d5253ae1.tar.gz
bsdgames-darwin-5ff78ede5ea1a80c654d3f0684cd5f36d5253ae1.tar.zst
bsdgames-darwin-5ff78ede5ea1a80c654d3f0684cd5f36d5253ae1.zip
clean up import
Diffstat (limited to 'dm/dm.c')
-rw-r--r--dm/dm.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/dm/dm.c b/dm/dm.c
index 11dedb0d..7dd82ef9 100644
--- a/dm/dm.c
+++ b/dm/dm.c
@@ -1,6 +1,8 @@
+/* $NetBSD: dm.c,v 1.4 1995/03/21 15:09:05 cgd Exp $ */
+
/*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1987, 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
@@ -32,26 +34,33 @@
*/
#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1987 Regents of the University of California.\n\
- All rights reserved.\n";
+static char copyright[] =
+"@(#) Copyright (c) 1987, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "from: @(#)dm.c 5.16 (Berkeley) 2/28/91";*/
-static char rcsid[] = "$Id: dm.c,v 1.3 1993/08/01 18:55:03 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93";
+#else
+static char rcsid[] = "$NetBSD: dm.c,v 1.4 1995/03/21 15:09:05 cgd Exp $";
+#endif
#endif /* not lint */
#include <sys/param.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <pwd.h>
-#include <utmp.h>
+
+#include <ctype.h>
#include <nlist.h>
+#include <pwd.h>
#include <stdio.h>
-#include <ctype.h>
#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <utmp.h>
+
#include "pathnames.h"
extern int errno;
@@ -60,13 +69,12 @@ static int priority = 0; /* priority game runs at */
static char *game, /* requested game */
*gametty; /* from tty? */
-/*ARGSUSED*/
+int
main(argc, argv)
int argc;
- char **argv;
+ char *argv[];
{
- char *cp, *rindex(), *ttyname();
- time_t time();
+ char *cp;
nogamefile();
game = (cp = rindex(*argv, '/')) ? ++cp : *argv;
@@ -178,7 +186,6 @@ c_tty(tty)
{
static int first = 1;
static char *p_tty;
- char *rindex();
if (first) {
p_tty = rindex(gametty, '/');
@@ -300,11 +307,10 @@ hour(h)
*/
logfile()
{
- struct passwd *pw, *getpwuid();
+ struct passwd *pw;
FILE *lp;
uid_t uid;
int lock_cnt;
- char *ctime();
if (lp = fopen(_PATH_LOG, "a")) {
for (lock_cnt = 0;; ++lock_cnt) {