Break inclusion cycle: prototypes.h and commands.h included each

other.  Ensure headers in include/ can be included in any order
(except for econfig-spec.h, which is special).  New header types.h to
help avoid inclusion cycles.  Sort include directives.  Remove some
superflous includes.
This commit is contained in:
Markus Armbruster 2006-07-10 06:37:23 +00:00
parent 16a0869bb0
commit e42053d928
373 changed files with 1193 additions and 2516 deletions

View file

@ -34,7 +34,7 @@
#include <config.h>
#include <math.h>
#include "gen.h"
#include "prototypes.h"
int
chance(double d)

View file

@ -33,11 +33,10 @@
#include <config.h>
#include "misc.h"
#include "xy.h"
#include "map.h"
#include "gen.h"
#include "misc.h"
#include "optlist.h"
#include "xy.h"
/*
* space-fill a map or radar scan;

View file

@ -44,18 +44,20 @@
#include <config.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <direct.h>
#else
#include <unistd.h>
#endif
#include "misc.h"
#include "file.h"
#include "misc.h"
#include "optlist.h"
#include "gen.h"
#include "prototypes.h"
/* Dummy one */
static int emp_config_dummy;

View file

@ -33,8 +33,8 @@
#include <config.h>
#include <string.h>
#include "misc.h"
#include "gen.h"
/*
* Get string argument.

View file

@ -33,9 +33,7 @@
#include <config.h>
#include "misc.h"
#include "gen.h"
#include "subs.h"
#include "prototypes.h"
/*
* Print sub-prompt PROMPT, receive a line of input into BUF[1024].

View file

@ -42,28 +42,25 @@
#include <config.h>
#include <errno.h>
#include <sys/types.h>
#if !defined(_WIN32)
#include <sys/uio.h>
#include <sys/file.h>
#include <unistd.h> /* close read shutdown select */
#include <sys/socket.h>
#endif
#include <time.h>
#include <fcntl.h>
#include <stdlib.h> /* malloc calloc free */
#if defined(_WIN32)
#include <stdlib.h>
#include <sys/types.h>
#ifdef _WIN32
#define WIN32
#include <winsock2.h>
#undef NS_ALL
#else
#include <sys/uio.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
#include <time.h>
#include "empio.h"
#include "ioqueue.h"
#include "misc.h"
#include "queue.h"
#include "ioqueue.h"
#include "empio.h"
#include "gen.h" /* getfdtablesize */
#include "server.h"
#include "empthread.h"

View file

@ -41,13 +41,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#if !defined(_WIN32)
#include <sys/uio.h>
#endif
#include "ioqueue.h"
#include "misc.h"
#include "queue.h"
#include "ioqueue.h"
static int ioqtocbuf(struct ioqueue *ioq, char *buf, int cc, int stopc);
#if !defined(_WIN32)

View file

@ -38,8 +38,8 @@
#include <config.h>
#include "misc.h"
#include "gen.h"
#include "optlist.h"
#include "prototypes.h"
int
diffx(int x1, int x2)

View file

@ -33,9 +33,7 @@
#include <config.h>
#include <string.h>
#include "misc.h"
#include "gen.h"
#include "prototypes.h"
char *
numstr(char *buf, int n)

View file

@ -33,8 +33,7 @@
#include <config.h>
#include "misc.h"
#include "gen.h"
#include "prototypes.h"
int
onearg(char *arg, char *prompt)

View file

@ -34,8 +34,7 @@
#include <config.h>
#include <ctype.h>
#include "misc.h"
#include "gen.h"
#include "prototypes.h"
/*
* Parse user command in BUF.

View file

@ -33,7 +33,7 @@
#include <config.h>
#include "gen.h"
#include "prototypes.h"
int
roundintby(int n, int m)

View file

@ -33,7 +33,7 @@
#include <config.h>
#include "gen.h"
#include "prototypes.h"
int
scthash(int x, int y, int tsize)

View file

@ -36,9 +36,9 @@
#ifdef _WIN32
#include <windows.h>
#include "optlist.h"
#include "prototypes.h"
#include "service.h"
#include "optlist.h"
int
install_service(char *program_name, char *service_name, char *config_file)

View file

@ -36,18 +36,16 @@
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#ifdef _WIN32
#define WIN32
#include "winsock2.h"
#undef NS_ALL
#else
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
#include "prototypes.h"