From cbe4e1ba31fb4580a6367a2c89d43f88162ea13b Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Sun, 20 Apr 2008 09:12:09 +0400 Subject: [PATCH] legacy irc sprintf gone --- extensions/m_olist.c | 1 - include/client.h | 1 - include/res.h | 1 - include/sprintf_irc.h | 51 ------------------------------------------- modules/core/m_join.c | 1 - modules/core/m_kill.c | 1 - modules/core/m_mode.c | 1 - modules/core/m_quit.c | 1 - modules/m_accept.c | 1 - modules/m_chghost.c | 1 - modules/m_dline.c | 1 - modules/m_encap.c | 1 - modules/m_ison.c | 1 - modules/m_kline.c | 1 - modules/m_knock.c | 1 - modules/m_map.c | 1 - modules/m_names.c | 1 - modules/m_operspy.c | 1 - modules/m_restart.c | 1 - modules/m_resv.c | 1 - modules/m_services.c | 1 - modules/m_set.c | 1 - modules/m_signon.c | 1 - modules/m_testline.c | 1 - modules/m_time.c | 1 - modules/m_topic.c | 1 - modules/m_user.c | 1 - modules/m_userhost.c | 1 - modules/m_who.c | 1 - modules/m_whois.c | 1 - modules/m_xline.c | 1 - src/cache.c | 1 - src/channel.c | 1 - src/chmode.c | 1 - src/client.c | 1 - src/irc_dictionary.c | 1 - src/irc_string.c | 20 ----------------- src/ircd.c | 1 - src/listener.c | 1 - src/logger.c | 1 - src/modules.c | 1 - src/newconf.c | 1 - src/parse.c | 1 - src/res.c | 1 - src/reslib.c | 1 - src/s_auth.c | 1 - src/s_conf.c | 1 - src/s_newconf.c | 1 - src/s_serv.c | 1 - src/s_user.c | 1 - src/send.c | 1 - unsupported/m_force.c | 1 - 52 files changed, 121 deletions(-) delete mode 100644 include/sprintf_irc.h diff --git a/extensions/m_olist.c b/extensions/m_olist.c index 5a51ccfe..cccb011a 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 9308355a..130f1920 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 2e7f6621..84d70e56 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 b5441327..00000000 --- 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 f6646440..8e3f1a0f 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 5559dacb..5fb4b4cf 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 72f547a9..32b9127d 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 c60214d4..014d472b 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 7fbf584a..15c73342 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 92e2652a..294c3c78 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 4c2c6335..6ca3da84 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 742c35d7..66c7d837 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 a28f598e..67a0939d 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 b14f0c38..1dad6d9a 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 55a688d6..2c786e09 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 cbcfad80..7c679fb3 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 59c670a1..d3c70249 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 00202334..520a25de 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 365eb343..97f47db0 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 900d430f..92e57309 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 e11099d6..91999068 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 3d80d840..e9d7f0a4 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 592330a8..b0503434 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 58fc7926..63f99af0 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 19a83225..d677fe49 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 fb558fb1..bc2bc168 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 c2f61c33..94a6577d 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 a5f7b476..964aa6b9 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 7ab77533..749d35f1 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 53b4b250..c3da07ab 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 954cee2f..957486f9 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 eab5db83..708c99eb 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 d03744e6..980cef9b 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 9fca4717..78682fba 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 903391d0..dc88b936 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 bf9409b8..0a827dbf 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 fecd3d14..1c773ac3 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 689d2daf..9d8f54fd 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 0ab90c2b..2fdea281 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 2246f25a..6c753793 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 0a9a8838..115f511d 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 8cc1d446..52c3ec7e 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 cebeec98..a2979b69 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 ce883f6a..bd5b31cc 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 5a8e4f64..516cb65e 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 6c27d211..bb67394e 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 856a4e2c..eafceb43 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 6da826ca..d5f8549b 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 343203d9..d7e2a8a6 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 e088d1ae..2501ac40 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 d948fa85..19876879 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 84159e90..3f457a2c 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"