mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
common.h: raison d'être is gone, so out it goes.
Fold whatever was left into ircd_defs.h
This commit is contained in:
parent
7ac3261f97
commit
79435744c7
62 changed files with 12 additions and 97 deletions
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "match.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "match.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* ircd-ratbox: A slightly useful ircd.
|
||||
* common.h: An ircd header common to most code.
|
||||
*
|
||||
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
|
||||
* Copyright (C) 1996-2002 Hybrid Development Team
|
||||
* Copyright (C) 2002-2004 ircd-ratbox development team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_common_h
|
||||
#define INCLUDED_common_h
|
||||
|
||||
/* Just blindly define our own MIN/MAX macro */
|
||||
|
||||
#define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
/* readbuf size */
|
||||
#define READBUF_SIZE 16384
|
||||
|
||||
#endif /* INCLUDED_common_h */
|
|
@ -56,6 +56,14 @@
|
|||
#define IRC_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define HOSTLEN 63 /* Length of hostname. Updated to */
|
||||
/* comply with RFC1123 */
|
||||
|
||||
|
@ -115,4 +123,7 @@
|
|||
#define PATRICIA_BITS 32
|
||||
#endif
|
||||
|
||||
/* Read buffer size */
|
||||
#define READBUF_SIZE 16384
|
||||
|
||||
#endif /* INCLUDED_ircd_defs_h */
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "ircd_defs.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
|
||||
struct Client;
|
||||
struct DNSReply;
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "ircd_defs.h"
|
||||
#include "common.h"
|
||||
#include "s_conf.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "channel.h"
|
||||
#include "chmode.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "hook.h"
|
||||
#include "match.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "hook.h"
|
||||
#include "match.h"
|
||||
|
@ -889,7 +888,7 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
|
|||
* also make sure it will always fit on a line with channel
|
||||
* name etc.
|
||||
*/
|
||||
if(strlen(mask) > IRCD_MIN(BANLEN, MODEBUFLEN - 5))
|
||||
if(strlen(mask) > MIN(BANLEN, MODEBUFLEN - 5))
|
||||
{
|
||||
sendto_one_numeric(source_p, ERR_INVALIDBAN,
|
||||
form_str(ERR_INVALIDBAN),
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
#include "s_conf.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "client.h"
|
||||
#include "class.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
|
||||
ExtbanFunc extban_table[256] = { NULL };
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "s_conf.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd_signal.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "newconf.h"
|
||||
#include "ircd_defs.h"
|
||||
#include "common.h"
|
||||
#include "logger.h"
|
||||
#include "s_conf.h"
|
||||
#include "s_user.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "s_conf.h"
|
||||
#include "s_serv.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "parse.h"
|
||||
#include "packet.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "parse.h"
|
||||
#include "client.h"
|
||||
#include "channel.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "s_auth.h"
|
||||
#include "s_conf.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "ircd_defs.h"
|
||||
#include "common.h"
|
||||
#include "s_conf.h"
|
||||
#include "s_newconf.h"
|
||||
#include "client.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "s_serv.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "numeric.h"
|
||||
#include "ircd.h"
|
||||
#include "s_conf.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "match.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
#include "send.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "client.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
#include "common.h"
|
||||
#include "s_conf.h"
|
||||
#include "s_serv.h"
|
||||
#include "msg.h"
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "msg.h"
|
||||
#include "parse.h"
|
||||
#include "modules.h"
|
||||
#include "common.h"
|
||||
#include "packet.h"
|
||||
#include "scache.h"
|
||||
#include "s_newconf.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h" /* client struct */
|
||||
#include "common.h"
|
||||
#include "hash.h" /* add_to_client_hash */
|
||||
#include "match.h"
|
||||
#include "ircd.h" /* me */
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "hash.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "hostmask.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "hook.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "m_info.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "hook.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
#include "common.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "hostmask.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "numeric.h"
|
||||
#include "send.h"
|
||||
#include "msg.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "channel.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "s_serv.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "hook.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "numeric.h"
|
||||
#include "s_serv.h"
|
||||
#include "send.h"
|
||||
#include "common.h"
|
||||
#include "channel.h"
|
||||
#include "s_conf.h"
|
||||
#include "s_newconf.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "hook.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "hash.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "class.h" /* report_classes */
|
||||
#include "client.h" /* Client */
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h" /* me */
|
||||
#include "listener.h" /* show_ports */
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "ircd.h"
|
||||
#include "match.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
/* List of ircd includes from ../include/ */
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "ircd.h"
|
||||
#include "match.h"
|
||||
#include "numeric.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "stdinc.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "match.h"
|
||||
#include "hash.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "hook.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
* USA
|
||||
*/
|
||||
#include "stdinc.h"
|
||||
#include "common.h"
|
||||
#include "client.h"
|
||||
#include "channel.h"
|
||||
#include "hash.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
#include "common.h"
|
||||
#include "client.h"
|
||||
#include "hash.h"
|
||||
#include "channel.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "stdinc.h"
|
||||
#include "whowas.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "hash.h"
|
||||
#include "match.h"
|
||||
#include "ircd.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "send.h"
|
||||
#include "channel.h"
|
||||
#include "client.h"
|
||||
#include "common.h"
|
||||
#include "defaults.h"
|
||||
#include "class.h"
|
||||
#include "ircd.h"
|
||||
|
|
Loading…
Reference in a new issue