diff --git a/extensions/m_olist.c b/extensions/m_olist.c index 5a51ccf..cccb011 100644 --- a/extensions/m_olist.c +++ b/extensions/m_olist.c @@ -41,7 +41,6 @@ #include "parse.h" #include "modules.h" #include "s_newconf.h" -#include "sprintf_irc.h" static int mo_olist(struct Client *, struct Client *, int parc, const char *parv[]); diff --git a/include/client.h b/include/client.h index 9308355..130f192 100644 --- a/include/client.h +++ b/include/client.h @@ -39,7 +39,6 @@ #include "res.h" #include "snomask.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" /* other structs */ diff --git a/include/res.h b/include/res.h index 2e7f662..84d70e5 100644 --- a/include/res.h +++ b/include/res.h @@ -11,7 +11,6 @@ #include "common.h" #include "reslib.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" /* Maximum number of nameservers in /etc/resolv.conf we care about diff --git a/include/sprintf_irc.h b/include/sprintf_irc.h deleted file mode 100644 index b544132..0000000 --- a/include/sprintf_irc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ircd-ratbox: A slightly useful ircd. - * sprintf_irc.h: The irc sprintf header. - * - * 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 - * - * $Id: sprintf_irc.h 6 2005-09-10 01:02:21Z nenolod $ - */ - -#ifndef SPRINTF_IRC -#define SPRINTF_IRC - -#include - -/*============================================================================= - * Proto types - */ - - -/* - * ircsprintf - optimized sprintf - */ -#ifdef __GNUC__ -int ircsprintf(char *str, const char *fmt, ...) __attribute((format(printf, 2, 3))); -int ircsnprintf(char *str, const size_t size, const char *, ...) __attribute__ ((format(printf, 3, 4))); -#else -int ircsprintf(char *str, const char *format, ...); -int ircsnprintf(char *str, const size_t size, const char *, ...); -#endif - -int ircvsnprintf(char *str, const size_t size, const char *fmt, va_list args); -int ircvsprintf(char *str, const char *fmt, va_list args); - -#endif /* SPRINTF_IRC */ diff --git a/modules/core/m_join.c b/modules/core/m_join.c index f664644..8e3f1a0 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -39,7 +39,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" #include "packet.h" static int m_join(struct Client *, struct Client *, int, const char **); diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c index 5559dac..5fb4b4c 100644 --- a/modules/core/m_kill.c +++ b/modules/core/m_kill.c @@ -29,7 +29,6 @@ #include "hash.h" /* for find_client() */ #include "ircd.h" #include "numeric.h" -#include "sprintf_irc.h" #include "logger.h" #include "s_serv.h" #include "s_conf.h" diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index 72f547a..32b9127 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -40,7 +40,6 @@ #include "parse.h" #include "modules.h" #include "packet.h" -#include "sprintf_irc.h" #include "s_newconf.h" static int m_mode(struct Client *, struct Client *, int, const char **); diff --git a/modules/core/m_quit.c b/modules/core/m_quit.c index c60214d..014d472 100644 --- a/modules/core/m_quit.c +++ b/modules/core/m_quit.c @@ -34,7 +34,6 @@ #include "parse.h" #include "modules.h" #include "s_conf.h" -#include "sprintf_irc.h" static int m_quit(struct Client *, struct Client *, int, const char **); static int ms_quit(struct Client *, struct Client *, int, const char **); diff --git a/modules/m_accept.c b/modules/m_accept.c index 7fbf584..15c7334 100644 --- a/modules/m_accept.c +++ b/modules/m_accept.c @@ -34,7 +34,6 @@ #include "send.h" #include "msg.h" #include "parse.h" -#include "sprintf_irc.h" #include "modules.h" static int m_accept(struct Client *, struct Client *, int, const char **); diff --git a/modules/m_chghost.c b/modules/m_chghost.c index 92e2652..294c3c7 100644 --- a/modules/m_chghost.c +++ b/modules/m_chghost.c @@ -25,7 +25,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" #include "whowas.h" #include "monitor.h" diff --git a/modules/m_dline.c b/modules/m_dline.c index 4c2c633..6ca3da8 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -30,7 +30,6 @@ #include "client.h" #include "common.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "hostmask.h" #include "numeric.h" diff --git a/modules/m_encap.c b/modules/m_encap.c index 742c35d..66c7d83 100644 --- a/modules/m_encap.c +++ b/modules/m_encap.c @@ -42,7 +42,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" static int ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); diff --git a/modules/m_ison.c b/modules/m_ison.c index a28f598..67a0939 100644 --- a/modules/m_ison.c +++ b/modules/m_ison.c @@ -27,7 +27,6 @@ #include "stdinc.h" #include "client.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "send.h" diff --git a/modules/m_kline.c b/modules/m_kline.c index b14f0c3..1dad6d9 100644 --- a/modules/m_kline.c +++ b/modules/m_kline.c @@ -30,7 +30,6 @@ #include "client.h" #include "common.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "hostmask.h" #include "numeric.h" diff --git a/modules/m_knock.c b/modules/m_knock.c index 55a688d..2c786e0 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -24,7 +24,6 @@ */ #include "stdinc.h" -#include "sprintf_irc.h" #include "channel.h" #include "client.h" #include "hash.h" diff --git a/modules/m_map.c b/modules/m_map.c index cbcfad8..7c679fb 100644 --- a/modules/m_map.c +++ b/modules/m_map.c @@ -28,7 +28,6 @@ #include "numeric.h" #include "send.h" #include "s_conf.h" -#include "sprintf_irc.h" #include "scache.h" #define USER_COL 50 /* display | Users: %d at col 50 */ diff --git a/modules/m_names.c b/modules/m_names.c index 59c670a..d3c7024 100644 --- a/modules/m_names.c +++ b/modules/m_names.c @@ -25,7 +25,6 @@ */ #include "stdinc.h" -#include "sprintf_irc.h" #include "channel.h" #include "client.h" #include "common.h" diff --git a/modules/m_operspy.c b/modules/m_operspy.c index 0020233..520a25d 100644 --- a/modules/m_operspy.c +++ b/modules/m_operspy.c @@ -42,7 +42,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" static int ms_operspy(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); diff --git a/modules/m_restart.c b/modules/m_restart.c index 365eb34..97f47db 100644 --- a/modules/m_restart.c +++ b/modules/m_restart.c @@ -28,7 +28,6 @@ #include "client.h" #include "common.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "s_conf.h" diff --git a/modules/m_resv.c b/modules/m_resv.c index 900d430..92e5730 100644 --- a/modules/m_resv.c +++ b/modules/m_resv.c @@ -37,7 +37,6 @@ #include "s_newconf.h" #include "hash.h" #include "logger.h" -#include "sprintf_irc.h" static int mo_resv(struct Client *, struct Client *, int, const char **); static int ms_resv(struct Client *, struct Client *, int, const char **); diff --git a/modules/m_services.c b/modules/m_services.c index e11099d..9199906 100644 --- a/modules/m_services.c +++ b/modules/m_services.c @@ -45,7 +45,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" #include "whowas.h" #include "monitor.h" diff --git a/modules/m_set.c b/modules/m_set.c index 3d80d84..e9d7f0a 100644 --- a/modules/m_set.c +++ b/modules/m_set.c @@ -29,7 +29,6 @@ #include "stdinc.h" #include "client.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "s_serv.h" diff --git a/modules/m_signon.c b/modules/m_signon.c index 592330a..b050343 100644 --- a/modules/m_signon.c +++ b/modules/m_signon.c @@ -44,7 +44,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" #include "whowas.h" #include "monitor.h" #include "s_stats.h" diff --git a/modules/m_testline.c b/modules/m_testline.c index 58fc792..63f99af 100644 --- a/modules/m_testline.c +++ b/modules/m_testline.c @@ -39,7 +39,6 @@ #include "numeric.h" #include "s_conf.h" #include "s_newconf.h" -#include "sprintf_irc.h" static int mo_testline(struct Client *, struct Client *, int, const char **); static int mo_testgecos(struct Client *, struct Client *, int, const char **); diff --git a/modules/m_time.c b/modules/m_time.c index 19a8322..d677fe4 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -35,7 +35,6 @@ #include "parse.h" #include "modules.h" #include "packet.h" -#include "sprintf_irc.h" static int m_time(struct Client *, struct Client *, int, const char **); static char *date(void); diff --git a/modules/m_topic.c b/modules/m_topic.c index fb558fb..bc2bc16 100644 --- a/modules/m_topic.c +++ b/modules/m_topic.c @@ -29,7 +29,6 @@ #include "client.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "send.h" diff --git a/modules/m_user.c b/modules/m_user.c index c2f61c3..94a6577 100644 --- a/modules/m_user.c +++ b/modules/m_user.c @@ -35,7 +35,6 @@ #include "msg.h" #include "parse.h" #include "modules.h" -#include "sprintf_irc.h" #include "blacklist.h" static int mr_user(struct Client *, struct Client *, int, const char **); diff --git a/modules/m_userhost.c b/modules/m_userhost.c index a5f7b47..964aa6b 100644 --- a/modules/m_userhost.c +++ b/modules/m_userhost.c @@ -31,7 +31,6 @@ #include "s_serv.h" #include "send.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "msg.h" #include "parse.h" #include "modules.h" diff --git a/modules/m_who.c b/modules/m_who.c index 7ab7753..749d35f 100644 --- a/modules/m_who.c +++ b/modules/m_who.c @@ -33,7 +33,6 @@ #include "s_serv.h" #include "send.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "s_conf.h" #include "logger.h" #include "msg.h" diff --git a/modules/m_whois.c b/modules/m_whois.c index 53b4b25..c3da07a 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -36,7 +36,6 @@ #include "s_serv.h" #include "send.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "s_conf.h" #include "logger.h" #include "msg.h" diff --git a/modules/m_xline.c b/modules/m_xline.c index 954cee2..957486f 100644 --- a/modules/m_xline.c +++ b/modules/m_xline.c @@ -43,7 +43,6 @@ #include "s_serv.h" #include "whowas.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "hash.h" #include "msg.h" #include "parse.h" diff --git a/src/cache.c b/src/cache.c index eab5db8..708c99e 100644 --- a/src/cache.c +++ b/src/cache.c @@ -39,7 +39,6 @@ #include "client.h" #include "hash.h" #include "cache.h" -#include "sprintf_irc.h" #include "irc_dictionary.h" #include "numeric.h" diff --git a/src/channel.c b/src/channel.c index d03744e..980cef9 100644 --- a/src/channel.c +++ b/src/channel.c @@ -31,7 +31,6 @@ #include "hash.h" #include "hook.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "s_serv.h" /* captab */ diff --git a/src/chmode.c b/src/chmode.c index 9fca471..78682fb 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -32,7 +32,6 @@ #include "hash.h" #include "hook.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "s_serv.h" /* captab */ diff --git a/src/client.c b/src/client.c index 903391d..dc88b93 100644 --- a/src/client.c +++ b/src/client.c @@ -32,7 +32,6 @@ #include "common.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "packet.h" diff --git a/src/irc_dictionary.c b/src/irc_dictionary.c index bf9409b..0a827db 100644 --- a/src/irc_dictionary.c +++ b/src/irc_dictionary.c @@ -23,7 +23,6 @@ */ #include "stdinc.h" -#include "sprintf_irc.h" #include "irc_string.h" #include "client.h" #include "setup.h" diff --git a/src/irc_string.c b/src/irc_string.c index fecd3d1..1c773ac 100644 --- a/src/irc_string.c +++ b/src/irc_string.c @@ -25,7 +25,6 @@ */ #include "stdinc.h" -#include "sprintf_irc.h" #include "irc_string.h" #include "client.h" #include "setup.h" @@ -144,25 +143,6 @@ strtoken(char **save, char *str, const char *fs) return tmp; } -/* - * Copyright (c) 1996-1999 by Internet Software Consortium. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#define SPRINTF(x) ((size_t)rb_sprintf x) - char * strip_colour(char *string) { diff --git a/src/ircd.c b/src/ircd.c index 689d2da..9d8f54f 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -36,7 +36,6 @@ #include "hash.h" #include "irc_string.h" #include "ircd_signal.h" -#include "sprintf_irc.h" #include "msg.h" /* msgtab */ #include "hostmask.h" #include "numeric.h" diff --git a/src/listener.c b/src/listener.c index 0ab90c2..2fdea28 100644 --- a/src/listener.c +++ b/src/listener.c @@ -29,7 +29,6 @@ #include "listener.h" #include "client.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "ircd_defs.h" #include "numeric.h" diff --git a/src/logger.c b/src/logger.c index 2246f25..6c75379 100644 --- a/src/logger.c +++ b/src/logger.c @@ -38,7 +38,6 @@ #include "ircd_defs.h" #include "logger.h" #include "s_conf.h" -#include "sprintf_irc.h" #include "send.h" #include "client.h" #include "s_serv.h" diff --git a/src/modules.c b/src/modules.c index 0a9a883..115f511 100644 --- a/src/modules.c +++ b/src/modules.c @@ -38,7 +38,6 @@ #include "parse.h" #include "ircd_defs.h" #include "irc_string.h" -#include "sprintf_irc.h" diff --git a/src/newconf.c b/src/newconf.c index 8cc1d44..52c3ec7 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -11,7 +11,6 @@ #include "newconf.h" #include "ircd_defs.h" -#include "sprintf_irc.h" #include "common.h" #include "logger.h" #include "s_conf.h" diff --git a/src/parse.c b/src/parse.c index cebeec9..a2979b6 100644 --- a/src/parse.c +++ b/src/parse.c @@ -32,7 +32,6 @@ #include "common.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "logger.h" diff --git a/src/res.c b/src/res.c index ce883f6..bd5b31c 100644 --- a/src/res.c +++ b/src/res.c @@ -32,7 +32,6 @@ #include "res.h" #include "reslib.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "numeric.h" #include "client.h" /* SNO_* */ diff --git a/src/reslib.c b/src/reslib.c index 5a8e4f6..516cb65 100644 --- a/src/reslib.c +++ b/src/reslib.c @@ -87,7 +87,6 @@ #include "res.h" #include "reslib.h" #include "irc_string.h" -#include "sprintf_irc.h" #define NS_TYPE_ELT 0x40 /* EDNS0 extended label type */ #define DNS_LABELTYPE_BITSTRING 0x41 diff --git a/src/s_auth.c b/src/s_auth.c index 6c27d21..bb67394 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -40,7 +40,6 @@ #include "client.h" #include "common.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "numeric.h" #include "packet.h" diff --git a/src/s_conf.c b/src/s_conf.c index 856a4e2..eafceb4 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -36,7 +36,6 @@ #include "common.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "listener.h" #include "hostmask.h" diff --git a/src/s_newconf.c b/src/s_newconf.c index 6da826c..d5f8549 100644 --- a/src/s_newconf.c +++ b/src/s_newconf.c @@ -43,7 +43,6 @@ #include "hostmask.h" #include "newconf.h" #include "hash.h" -#include "sprintf_irc.h" #include "irc_dictionary.h" rb_dlink_list shared_conf_list; diff --git a/src/s_serv.c b/src/s_serv.c index 343203d..d7e2a8a 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -36,7 +36,6 @@ #include "common.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "ircd_defs.h" #include "numeric.h" diff --git a/src/s_user.c b/src/s_user.c index e088d1a..2501ac4 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -32,7 +32,6 @@ #include "common.h" #include "hash.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "listener.h" #include "msg.h" diff --git a/src/send.c b/src/send.c index d948fa8..1987687 100644 --- a/src/send.c +++ b/src/send.c @@ -34,7 +34,6 @@ #include "ircd.h" #include "numeric.h" #include "s_serv.h" -#include "sprintf_irc.h" #include "s_conf.h" #include "s_newconf.h" #include "logger.h" diff --git a/unsupported/m_force.c b/unsupported/m_force.c index 84159e9..3f457a2 100644 --- a/unsupported/m_force.c +++ b/unsupported/m_force.c @@ -35,7 +35,6 @@ #include "client.h" #include "common.h" #include "irc_string.h" -#include "sprintf_irc.h" #include "ircd.h" #include "hostmask.h" #include "numeric.h"