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:
parent
16a0869bb0
commit
e42053d928
373 changed files with 1193 additions and 2516 deletions
|
@ -33,16 +33,14 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "misc.h"
|
||||
|
||||
int
|
||||
recvline(int s, char *buf)
|
||||
|
|
|
@ -40,12 +40,11 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
|
|
|
@ -36,10 +36,9 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include "ioqueue.h"
|
||||
#include "misc.h"
|
||||
#include "queue.h"
|
||||
#include "ioqueue.h"
|
||||
|
||||
static int ioqtobuf(struct ioqueue *ioq, char *buf, int cc);
|
||||
static void enqueuecc(struct ioqueue *ioq, char *buf, int cc);
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#ifndef IOQUEUE_H
|
||||
#define IOQUEUE_H
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
struct ioqueue {
|
||||
struct qelem queue; /* queue fwd/back */
|
||||
int bsize; /* basic block size */
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -44,6 +41,8 @@
|
|||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
|
||||
int
|
||||
login(int s, char *uname, char *cname, char *cpass,
|
||||
|
|
|
@ -36,32 +36,25 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
#include "queue.h"
|
||||
#include "ioqueue.h"
|
||||
#include "tags.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <conio.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ioqueue.h"
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
#include "tags.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
HANDLE hStdIn;
|
||||
#endif
|
||||
|
|
|
@ -34,13 +34,9 @@
|
|||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
struct ioqueue;
|
||||
|
|
|
@ -33,11 +33,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "misc.h"
|
||||
#include "queue.h"
|
||||
|
||||
void
|
||||
|
|
|
@ -35,23 +35,22 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
#include "queue.h"
|
||||
#include "ioqueue.h"
|
||||
#include "tags.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ioqueue.h"
|
||||
#include "misc.h"
|
||||
#include "proto.h"
|
||||
#include "tags.h"
|
||||
|
||||
static char num_teles[64];
|
||||
static char the_prompt[1024];
|
||||
static int mode;
|
||||
|
|
|
@ -33,19 +33,15 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "misc.h"
|
||||
#include "queue.h"
|
||||
#include "ioqueue.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "misc.h"
|
||||
#include "ioqueue.h"
|
||||
|
||||
int
|
||||
serverio(int s, struct ioqueue *ioq)
|
||||
|
|
|
@ -34,16 +34,11 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "tags.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
struct tagstruct *taglist;
|
||||
|
||||
void
|
||||
|
|
|
@ -33,15 +33,15 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif /* _WIN32 */
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "misc.h"
|
||||
#include "tags.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue