···11-/*
22- * ircd-ratbox: A slightly useful ircd.
33- * common.h: An ircd header common to most code.
44- *
55- * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
66- * Copyright (C) 1996-2002 Hybrid Development Team
77- * Copyright (C) 2002-2004 ircd-ratbox development team
88- *
99- * This program is free software; you can redistribute it and/or modify
1010- * it under the terms of the GNU General Public License as published by
1111- * the Free Software Foundation; either version 2 of the License, or
1212- * (at your option) any later version.
1313- *
1414- * This program is distributed in the hope that it will be useful,
1515- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1616- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1717- * GNU General Public License for more details.
1818- *
1919- * You should have received a copy of the GNU General Public License
2020- * along with this program; if not, write to the Free Software
2121- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
2222- * USA
2323- */
2424-2525-#ifndef INCLUDED_common_h
2626-#define INCLUDED_common_h
2727-2828-/* Just blindly define our own MIN/MAX macro */
2929-3030-#define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b))
3131-#define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b))
3232-3333-/* readbuf size */
3434-#define READBUF_SIZE 16384
3535-3636-#endif /* INCLUDED_common_h */
+11
include/ircd_defs.h
···5656#define IRC_DEPRECATED
5757#endif
58585959+#ifndef MAX
6060+#define MAX(a, b) ((a) > (b) ? (a) : (b))
6161+#endif
6262+6363+#ifndef MIN
6464+#define MIN(a, b) ((a) < (b) ? (a) : (b))
6565+#endif
6666+5967#define HOSTLEN 63 /* Length of hostname. Updated to */
6068 /* comply with RFC1123 */
6169···114122#else
115123#define PATRICIA_BITS 32
116124#endif
125125+126126+/* Read buffer size */
127127+#define READBUF_SIZE 16384
117128118129#endif /* INCLUDED_ircd_defs_h */
···2626#include "stdinc.h"
2727#include "channel.h"
2828#include "client.h"
2929-#include "common.h"
3029#include "hash.h"
3130#include "hook.h"
3231#include "match.h"
···889888 * also make sure it will always fit on a line with channel
890889 * name etc.
891890 */
892892- if(strlen(mask) > IRCD_MIN(BANLEN, MODEBUFLEN - 5))
891891+ if(strlen(mask) > MIN(BANLEN, MODEBUFLEN - 5))
893892 {
894893 sendto_one_numeric(source_p, ERR_INVALIDBAN,
895894 form_str(ERR_INVALIDBAN),
···3434/* List of ircd includes from ../include/ */
3535#include "stdinc.h"
3636#include "client.h"
3737-#include "common.h"
3837#include "ircd.h"
3938#include "match.h"
4039#include "numeric.h"