BSD 4_3_Tahoe release
[unix-history] / usr / src / games / hunt / playit.c
index 87a9497..d0320c8 100644 (file)
@@ -1,11 +1,28 @@
+/*
+ * Copyright (c) 1985 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)playit.c   5.3 (Berkeley) 6/27/88";
+#endif /* not lint */
+
 /*
  *  Hunt
  *  Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
  *  San Francisco, California
 /*
  *  Hunt
  *  Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
  *  San Francisco, California
- *
- *  Copyright (c) 1985 Regents of the University of California.
- *  All rights reserved.  The Berkeley software License Agreement
- *  specifies the terms and conditions for redistribution.
  */
 
 # include      <curses.h>
  */
 
 # include      <curses.h>
@@ -41,6 +58,8 @@ static char   ibuf[20];
 
 #define        GETCHR(fd)      (--(fd)->_cnt >= 0 ? *(fd)->_ptr++&0377 : getchr(fd))
 
 
 #define        GETCHR(fd)      (--(fd)->_cnt >= 0 ? *(fd)->_ptr++&0377 : getchr(fd))
 
+extern int             _putchar();
+
 /*
  * playit:
  *     Play a given game, handling all the curses commands from
 /*
  * playit:
  *     Play a given game, handling all the curses commands from
@@ -53,7 +72,6 @@ playit()
        register unsigned int   y, x;
        extern int              Master_pid;
        extern int              errno;
        register unsigned int   y, x;
        extern int              Master_pid;
        extern int              errno;
-       extern int              _putchar();
 
        errno = 0;
        while ((inf = fdopen(Socket, "r")) == NULL)
 
        errno = 0;
        while ((inf = fdopen(Socket, "r")) == NULL)
@@ -176,6 +194,7 @@ register FILE       *fd;
        long    readfds, s_readfds;
        int     driver_mask, stdin_mask;
        int     nfds, s_nfds;
        long    readfds, s_readfds;
        int     driver_mask, stdin_mask;
        int     nfds, s_nfds;
+       extern int      errno;
 
        driver_mask = 1L << fileno(fd);
        stdin_mask = 1L << fileno(stdin);
 
        driver_mask = 1L << fileno(fd);
        stdin_mask = 1L << fileno(stdin);