mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Headers cleanup and sorting
OK tb@
This commit is contained in:
parent
88ce8894ca
commit
9ef4854330
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: connect.c,v 1.6 2003/06/11 08:45:24 pjanzen Exp $ */
|
||||
/* $OpenBSD: connect.c,v 1.7 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: connect.c,v 1.3 1997/10/11 08:13:40 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,9 +31,9 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hunt.h"
|
||||
#include "client.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: display.c,v 1.6 2014/11/19 18:55:09 krw Exp $ */
|
||||
/* $OpenBSD: display.c,v 1.7 2016/01/07 21:29:31 mestre Exp $ */
|
||||
|
||||
/*
|
||||
* Display abstraction.
|
||||
@ -7,9 +7,6 @@
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
#include "display.h"
|
||||
#include "hunt.h"
|
||||
|
||||
void
|
||||
display_open()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hunt.c,v 1.17 2016/01/07 16:00:32 tb Exp $ */
|
||||
/* $OpenBSD: hunt.c,v 1.18 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: hunt.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,30 +31,22 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <curses.h>
|
||||
#include <netdb.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "hunt.h"
|
||||
#include "display.h"
|
||||
#include "client.h"
|
||||
#include "hunt.h"
|
||||
#include "list.h"
|
||||
#include "client.h"
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
@ -154,7 +146,7 @@ main(ac, av)
|
||||
fputs("usage: hunt [-bcfmqSs] [-n name] [-p port] "
|
||||
"[-t team] [-w message] [[-h] host]\n",
|
||||
stderr);
|
||||
return 1;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
if (optind + 1 < ac)
|
||||
@ -172,7 +164,7 @@ main(ac, av)
|
||||
|
||||
if (Show_scores) {
|
||||
dump_scores();
|
||||
return 0;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (Query_driver) {
|
||||
@ -187,7 +179,7 @@ main(ac, av)
|
||||
if (Sock_host)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
exit(0);
|
||||
}
|
||||
if (Otto_mode) {
|
||||
if (Am_monitor)
|
||||
@ -259,7 +251,8 @@ main(ac, av)
|
||||
break;
|
||||
}
|
||||
leave(0, (char *) NULL);
|
||||
return 0;
|
||||
/* NOTREACHED */
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: list.c,v 1.6 2014/10/11 04:06:05 doug Exp $ */
|
||||
/* $OpenBSD: list.c,v 1.7 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/*
|
||||
* Copyright 2001, David Leonard. All rights reserved.
|
||||
* Redistribution and use in source and binary forms with or without
|
||||
@ -6,25 +6,19 @@
|
||||
* This software is provided ``as is'' without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "hunt.h"
|
||||
#include "list.h"
|
||||
|
||||
/* Wait at most 5 seconds for a reply */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: otto.c,v 1.11 2015/10/24 17:46:19 mmcc Exp $ */
|
||||
/* $OpenBSD: otto.c,v 1.12 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: otto.c,v 1.2 1997/10/10 16:32:39 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -41,17 +41,15 @@
|
||||
* subroutine library.
|
||||
*/
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "hunt.h"
|
||||
#include "client.h"
|
||||
#include "display.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "display.h"
|
||||
#include "hunt.h"
|
||||
|
||||
#define panic(m) _panic(__FILE__,__LINE__,m)
|
||||
|
||||
useconds_t Otto_pause = 55000;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: playit.c,v 1.9 2014/11/16 04:49:48 guenther Exp $ */
|
||||
/* $OpenBSD: playit.c,v 1.10 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: playit.c,v 1.4 1997/10/20 00:37:15 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,16 +31,16 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include "hunt.h"
|
||||
#include <string.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "display.h"
|
||||
#include "hunt.h"
|
||||
#include "client.h"
|
||||
|
||||
static int nchar_send;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: answer.c,v 1.15 2015/10/24 17:48:36 mmcc Exp $ */
|
||||
/* $OpenBSD: answer.c,v 1.16 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: answer.c,v 1.3 1997/10/10 16:32:50 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,21 +31,19 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
/* Exported symbols for hosts_access(): */
|
||||
int allow_severity = LOG_INFO;
|
||||
|
@ -1,17 +1,15 @@
|
||||
/* $OpenBSD: conf.c,v 1.8 2015/10/24 18:10:47 mmcc Exp $ */
|
||||
/* $OpenBSD: conf.c,v 1.9 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* David Leonard <d@openbsd.org>, 1999. Public domain. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <syslog.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
/* Configuration option variables for the server: */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: draw.c,v 1.7 2003/06/11 08:45:33 pjanzen Exp $ */
|
||||
/* $OpenBSD: draw.c,v 1.8 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: draw.c,v 1.2 1997/10/10 16:33:04 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
static char translate(char);
|
||||
static int player_sym(PLAYER *, int, int);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: driver.c,v 1.24 2016/01/07 16:00:32 tb Exp $ */
|
||||
/* $OpenBSD: driver.c,v 1.25 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,25 +31,23 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <paths.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <paths.h>
|
||||
#include <fcntl.h>
|
||||
#include "hunt.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
|
||||
u_int16_t Server_port;
|
||||
@ -126,7 +124,7 @@ erred:
|
||||
"usage: %s [-bs] [-a addr] [-D var=value] "
|
||||
"[-p port]\n",
|
||||
__progname);
|
||||
return 2;
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
if (optind < ac)
|
||||
@ -315,7 +313,7 @@ again:
|
||||
|
||||
/* Fin: */
|
||||
cleanup(0);
|
||||
return 0;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: execute.c,v 1.10 2015/09/27 07:06:41 guenther Exp $ */
|
||||
/* $OpenBSD: execute.c,v 1.11 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: execute.c,v 1.2 1997/10/10 16:33:13 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -34,8 +34,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#include "hunt.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
|
||||
static void cloak(PLAYER *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: expl.c,v 1.11 2015/09/27 07:06:41 guenther Exp $ */
|
||||
/* $OpenBSD: expl.c,v 1.12 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: expl.c,v 1.2 1997/10/10 16:33:18 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -34,9 +34,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
static void remove_wall(int, int);
|
||||
static void init_removed(void);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: extern.c,v 1.4 2003/06/11 08:45:33 pjanzen Exp $ */
|
||||
/* $OpenBSD: extern.c,v 1.5 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: extern.c,v 1.2 1997/10/10 16:33:24 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,8 +31,8 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
# include "hunt.h"
|
||||
# include "server.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
|
||||
FLAG Am_monitor = FALSE; /* current process is a monitor */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: makemaze.c,v 1.6 2003/06/11 08:45:33 pjanzen Exp $ */
|
||||
/* $OpenBSD: makemaze.c,v 1.7 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: makemaze.c,v 1.2 1997/10/10 16:33:43 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
# define ISCLEAR(y,x) (Maze[y][x] == SPACE)
|
||||
# define ODD(n) ((n) & 01)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: server.h,v 1.10 2015/12/26 00:26:39 mestre Exp $ */
|
||||
/* $OpenBSD: server.h,v 1.11 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: hunt.h,v 1.5 1998/09/13 15:27:28 hubertf Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,9 +31,9 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: shots.c,v 1.10 2015/08/22 14:47:41 deraadt Exp $ */
|
||||
/* $OpenBSD: shots.c,v 1.11 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: shots.c,v 1.3 1997/10/11 08:13:50 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,12 +31,11 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <err.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <syslog.h>
|
||||
#include "hunt.h"
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
|
||||
#define PLUS_DELTA(x, max) if (x < max) x++; else x--
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: terminal.c,v 1.10 2008/06/20 13:08:44 ragge Exp $ */
|
||||
/* $OpenBSD: terminal.c,v 1.11 2016/01/07 21:29:31 mestre Exp $ */
|
||||
/* $NetBSD: terminal.c,v 1.2 1997/10/10 16:34:05 lukem Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
@ -31,14 +31,14 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <err.h>
|
||||
#include <stdarg.h>
|
||||
#include <syslog.h>
|
||||
#include <err.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "hunt.h"
|
||||
#include "server.h"
|
||||
#include "conf.h"
|
||||
|
||||
#define TERM_WIDTH 80 /* Assume terminals are 80-char wide */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user