1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

Update #include's: remove unused and add missing ones

The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been
used to find unused #include directives as well as missing ones.

Tested on:

- A/UX 3.1.1
- ArchLinux (2014-03-17)
- Debian GNU/Hurd
- Debian GNU/Linux 6.0.9
- Debian GNU/Linux 7.4
- Fedora 20
- FreeBSD 9.2
- OpenBSD 4.8
- OpenBSD 5.1
- OS X 10.9
- Solaris 11
This commit is contained in:
Alexander Barton 2014-03-17 02:28:39 +01:00
parent 37090a28e8
commit b130b35f48
36 changed files with 70 additions and 150 deletions

View File

@ -13,6 +13,7 @@
*/
#include <assert.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

View File

@ -19,8 +19,11 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "log.h"
#ifdef DEBUG_ARRAY
# include "log.h"
#endif
/* Enable more Debug messages in alloc / append / memmove code. */
/* #define DEBUG_ARRAY */

View File

@ -24,8 +24,8 @@
#include <errno.h>
#include <stdio.h>
#include <strings.h>
#include <time.h>
#include "defines.h"
#include "conn-func.h"
#include "channel.h"
@ -33,7 +33,6 @@
#include "irc-write.h"
#include "conf.h"
#include "hash.h"
#include "lists.h"
#include "log.h"
#include "messages.h"
#include "match.h"

View File

@ -17,15 +17,11 @@
*/
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "defines.h"
#include "array.h"
#include "conn.h"
#include "client.h"
#include "lists.h"
#include "match.h"
#include "stdio.h"
#include "class.h"

View File

@ -20,13 +20,9 @@
#include <assert.h>
#include "defines.h"
#include "conn.h"
#include "client.h"
#include "log.h"
#include "client-cap.h"
GLOBAL int
Client_Cap(CLIENT *Client)
{

View File

@ -24,12 +24,10 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <netdb.h>
#include "defines.h"
#include "conn.h"
#include "client.h"
#include "ngircd.h"
#include "channel.h"
#include "conf.h"

View File

@ -17,7 +17,6 @@
*/
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#ifdef PROTOTYPES
# include <stdarg.h>
@ -28,21 +27,18 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include "array.h"
#include "ngircd.h"
#include "conn.h"
#include "channel.h"
#include "defines.h"
#include "log.h"
#include "match.h"
#include "tool.h"
#include "conf.h"

View File

@ -23,17 +23,16 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "defines.h"
#include "conn.h"
#include "log.h"
#include "conn-encoding.h"
#ifdef ICONV
char Encoding_Buffer[COMMAND_LEN];
#include "log.h"
#include "conn-encoding.h"
char Encoding_Buffer[COMMAND_LEN];
char *Convert_Message PARAMS((iconv_t Handle, char *Message));
/**

View File

@ -19,11 +19,12 @@
*/
#include <assert.h>
#include <string.h>
#include "log.h"
#include <time.h>
#ifdef DEBUG
# include "log.h"
#endif
#include "conn.h"
#include "client.h"
#include "conn-func.h"

View File

@ -14,8 +14,6 @@
#define CONN_MODULE
#include "portab.h"
#include "conf-ssl.h"
#include "io.h"
/**
* @file
@ -33,8 +31,9 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <netinet/in.h>
@ -50,25 +49,21 @@
# include <tcpd.h> /* for TCP Wrappers */
#endif
#include "array.h"
#include "defines.h"
#include "conn.h"
#include "ngircd.h"
#include "array.h"
#include "client.h"
#include "class.h"
#include "conf.h"
#include "conn-encoding.h"
#ifdef ICONV
# include "conn-encoding.h"
#endif
#include "conn-ssl.h"
#include "conn-zip.h"
#include "conn-func.h"
#include "io.h"
#include "log.h"
#include "ng_ipaddr.h"
#include "parse.h"
#include "resolve.h"
#include "tool.h"
#define SERVER_WAIT (NONE - 1)

View File

@ -22,8 +22,6 @@
#include "defines.h"
#include "tool.h"
#include "hash.h"
static UINT32 jenkins_hash PARAMS((UINT8 *k, UINT32 length, UINT32 initval));
/**

View File

@ -16,10 +16,10 @@
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "array.h"

View File

@ -18,20 +18,17 @@
#include <assert.h>
#include <string.h>
#include <strings.h>
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "client-cap.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "log.h"
#include "login.h"
#include "messages.h"
#include "parse.h"
#include "irc-cap.h"
/* Local functions */
/**

View File

@ -21,7 +21,6 @@
#include <stdio.h>
#include <string.h>
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "conn-func.h"
@ -36,8 +35,6 @@
#include "irc-write.h"
#include "conf.h"
#include "irc-channel.h"
/**
* Part from all channels.
*

View File

@ -16,6 +16,8 @@
* IRC encoding commands
*/
#ifdef ICONV
#include <assert.h>
#include <string.h>
@ -27,10 +29,6 @@
#include "parse.h"
#include "tool.h"
#include "irc-encoding.h"
#ifdef ICONV
/**
* Handler for the IRC+ "CHARCONV" command.
*

View File

@ -17,11 +17,11 @@
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "ngircd.h"
#include "conn-func.h"
@ -29,12 +29,9 @@
#include "channel.h"
#include "class.h"
#include "conf.h"
#include "defines.h"
#include "lists.h"
#include "log.h"
#include "messages.h"
#include "match.h"
#include "tool.h"
#include "parse.h"
#include "irc.h"
#include "irc-macros.h"

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "conn-func.h"
#include "class.h"
#include "conf.h"
#include "channel.h"
#include "log.h"
@ -31,12 +31,9 @@
#include "messages.h"
#include "parse.h"
#include "irc.h"
#include "irc-info.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "irc-login.h"
static void Change_Nick PARAMS((CLIENT * Origin, CLIENT * Target, char *NewNick,
bool InformClient));

View File

@ -19,19 +19,15 @@
*/
#include <assert.h>
#include <string.h>
#include <strings.h>
#include <stdio.h>
#include "conn-func.h"
#include "channel.h"
#include "conn-encoding.h"
#include "irc-write.h"
#include "log.h"
#include "messages.h"
#include "parse.h"
#include "tool.h"
#include "irc-metadata.h"
/**
* Handler for the IRC+ "METADATA" command.

View File

@ -21,7 +21,6 @@
#include <stdlib.h>
#include <string.h>
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "irc-macros.h"
@ -32,8 +31,6 @@
#include "messages.h"
#include "conf.h"
#include "irc-mode.h"
static bool Client_Mode PARAMS((CLIENT *Client, REQUEST *Req, CLIENT *Origin,
CLIENT *Target));
static bool Channel_Mode PARAMS((CLIENT *Client, REQUEST *Req, CLIENT *Origin,

View File

@ -18,9 +18,7 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "irc-macros.h"
@ -30,8 +28,6 @@
#include "messages.h"
#include "parse.h"
#include "irc-op.h"
/* Local functions */
static bool

View File

@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include "ngircd.h"
#include "conn-func.h"
@ -29,7 +30,6 @@
#include "class.h"
#include "parse.h"
#include "irc.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "lists.h"
#include "log.h"
@ -37,8 +37,6 @@
#include "messages.h"
#include "op.h"
#include "irc-oper.h"
/**
* Handle invalid received OPER command.
* Log OPER attempt and send error message to client.

View File

@ -22,25 +22,19 @@
#include <string.h>
#include <strings.h>
#include "defines.h"
#include "conn.h"
#include "conn-func.h"
#include "conn-zip.h"
#include "conf.h"
#include "channel.h"
#include "lists.h"
#include "log.h"
#include "messages.h"
#include "parse.h"
#include "numeric.h"
#include "ngircd.h"
#include "irc-info.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "op.h"
#include "irc-server.h"
/**
* Handler for the IRC "SERVER" command.
*

View File

@ -23,9 +23,7 @@
# include <varargs.h>
#endif
#include <stdio.h>
#include <string.h>
#include "defines.h"
#include "conn-func.h"
#include "channel.h"

View File

@ -19,13 +19,16 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "ngircd.h"
#include "conn-func.h"
#include "conf.h"
#include "channel.h"
#include "conn-encoding.h"
#include "defines.h"
#ifdef ICONV
# include "conn-encoding.h"
#endif
#include "irc-macros.h"
#include "irc-write.h"
#include "log.h"
@ -33,7 +36,6 @@
#include "messages.h"
#include "parse.h"
#include "op.h"
#include "tool.h"
#include "irc.h"

View File

@ -17,18 +17,14 @@
*/
#include <assert.h>
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "log.h"
#include "match.h"
#include "messages.h"
#include "irc-write.h"
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "conn.h"
#include "log.h"
#include "match.h"
#include "lists.h"

View File

@ -17,23 +17,21 @@
*/
#include <assert.h>
#include <errno.h>
#ifdef PROTOTYPES
# include <stdarg.h>
# include <stdarg.h>
#else
# include <varargs.h>
# include <varargs.h>
#endif
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#ifdef SYSLOG
#include <syslog.h>
# include <syslog.h>
#endif
#include "ngircd.h"
#include "defines.h"
#include "conn.h"
#include "channel.h"
#include "irc-write.h"

View File

@ -20,22 +20,17 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include "defines.h"
#include "conn.h"
#include "class.h"
#include "client.h"
#include "client-cap.h"
#include "channel.h"
#include "conf.h"
#include "io.h"
#include "parse.h"
#include "log.h"
#include "messages.h"
#include "ngircd.h"
#include "pam.h"
#include "irc-info.h"
#include "irc-mode.h"
#include "irc-write.h"
@ -43,7 +38,12 @@
#include "login.h"
#ifdef PAM
#include "io.h"
#include "pam.h"
static void cb_Read_Auth_Result PARAMS((int r_fd, UNUSED short events));
#endif
/**

View File

@ -19,7 +19,6 @@
#include <assert.h>
#include <string.h>
#include "match.h"
#include "defines.h"
#include "tool.h"

View File

@ -21,7 +21,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
@ -35,18 +34,13 @@
#include <mcheck.h>
#endif
#include "defines.h"
#include "conn.h"
#include "class.h"
#include "conf-ssl.h"
#include "channel.h"
#include "conf.h"
#include "lists.h"
#include "log.h"
#include "parse.h"
#include "sighandlers.h"
#include "io.h"
#include "irc.h"
#include "ngircd.h"

View File

@ -20,22 +20,17 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "defines.h"
#include "conn.h"
#include "conf.h"
#include "conn.h"
#include "conn-func.h"
#include "conf.h"
#include "channel.h"
#include "class.h"
#include "irc-write.h"
#include "lists.h"
#include "log.h"
#include "messages.h"
#include "parse.h"
#include "numeric.h"
/**
* Announce a channel and its users in the network.
*/

View File

@ -17,7 +17,6 @@
*/
#include <assert.h>
#include <string.h>
#include "conn.h"
#include "channel.h"
@ -27,8 +26,6 @@
#include "messages.h"
#include "irc-write.h"
#include "op.h"
/**
* Return and log a "no privileges" message.
*/

View File

@ -19,23 +19,20 @@
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SECURITY_PAM_APPL_H
# include <security/pam_appl.h>
#endif
#ifdef HAVE_PAM_PAM_APPL_H
# include <pam/pam_appl.h>
#endif
#include "defines.h"
#include "log.h"
#include "conn.h"
#include "client.h"
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SECURITY_PAM_APPL_H
#include <security/pam_appl.h>
#endif
#ifdef HAVE_PAM_PAM_APPL_H
#include <pam/pam_appl.h>
#endif
#include "pam.h"
static char *password;

View File

@ -18,24 +18,24 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "ngircd.h"
#include "defines.h"
#include "conn-func.h"
#include "conf.h"
#include "channel.h"
#include "log.h"
#include "messages.h"
#include "tool.h"
#include "parse.h"
#include "irc.h"
#include "irc-cap.h"
#include "irc-channel.h"
#include "irc-encoding.h"
#ifdef ICONV
# include "irc-encoding.h"
#endif
#include "irc-info.h"
#include "irc-login.h"
#include "irc-metadata.h"
@ -46,8 +46,6 @@
#include "irc-write.h"
#include "numeric.h"
#include "conf.h"
struct _NUMERIC {
int numeric;
bool (*function) PARAMS(( CLIENT *Client, REQUEST *Request ));

View File

@ -21,12 +21,14 @@
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include "log.h"
#include "io.h"
#include "conn.h"
#include "sighandlers.h"
#include "proc.h"
/**

View File

@ -23,10 +23,11 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <signal.h>
#ifdef IDENTAUTH
#ifdef HAVE_IDENT_H
@ -34,16 +35,11 @@
#endif
#endif
#include "array.h"
#include "conn.h"
#include "conf.h"
#include "defines.h"
#include "log.h"
#include "ng_ipaddr.h"
#include "resolve.h"
#include "io.h"
static void Do_ResolveAddr PARAMS(( const ng_ipaddr_t *Addr, int Sock, int w_fd ));
static void Do_ResolveName PARAMS(( const char *Host, int w_fd ));

View File

@ -24,15 +24,14 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include "conn.h"
#include "conf-ssl.h"
#include "channel.h"
#include "conf.h"
#include "io.h"
#include "log.h"
#include "ngircd.h"
#include "sighandlers.h"
static int signalpipe[2];