Commits

Anonymous committed 679e405

legacy irc sprintf gone

Comments (0)

Files changed (52)

extensions/m_olist.c

 #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[]);
 
 #include "res.h"
 #include "snomask.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 
 /* other structs */
 #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 

include/sprintf_irc.h

-/*
- *  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 <stdarg.h>
-
-/*=============================================================================
- * 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 */

modules/core/m_join.c

 #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 **);

modules/core/m_kill.c

 #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"

modules/core/m_mode.c

 #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 **);

modules/core/m_quit.c

 #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 **);

modules/m_accept.c

 #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 **);

modules/m_chghost.c

 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "sprintf_irc.h"
 #include "whowas.h"
 #include "monitor.h"
 

modules/m_dline.c

 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"

modules/m_encap.c

 #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[]);
 #include "stdinc.h"
 #include "client.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "send.h"

modules/m_kline.c

 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"

modules/m_knock.c

  */
 
 #include "stdinc.h"
-#include "sprintf_irc.h"
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
 #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 */

modules/m_names.c

  */
 
 #include "stdinc.h"
-#include "sprintf_irc.h"
 #include "channel.h"
 #include "client.h"
 #include "common.h"

modules/m_operspy.c

 #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[]);

modules/m_restart.c

 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_conf.h"
 #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 **);

modules/m_services.c

 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "sprintf_irc.h"
 #include "whowas.h"
 #include "monitor.h"
 
 #include "stdinc.h"
 #include "client.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_serv.h"

modules/m_signon.c

 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "sprintf_irc.h"
 #include "whowas.h"
 #include "monitor.h"
 #include "s_stats.h"

modules/m_testline.c

 #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 **);
 #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);

modules/m_topic.c

 #include "client.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "send.h"
 #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 **);

modules/m_userhost.c

 #include "s_serv.h"
 #include "send.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
 #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"

modules/m_whois.c

 #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"

modules/m_xline.c

 #include "s_serv.h"
 #include "whowas.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "hash.h"
 #include "msg.h"
 #include "parse.h"
 #include "client.h"
 #include "hash.h"
 #include "cache.h"
-#include "sprintf_irc.h"
 #include "irc_dictionary.h"
 #include "numeric.h"
 
 #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 */
 #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 */
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "packet.h"

src/irc_dictionary.c

  */
 
 #include "stdinc.h"
-#include "sprintf_irc.h"
 #include "irc_string.h"
 #include "client.h"
 #include "setup.h"
  */
 
 #include "stdinc.h"
-#include "sprintf_irc.h"
 #include "irc_string.h"
 #include "client.h"
 #include "setup.h"
 	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)
 {
 #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"
 #include "listener.h"
 #include "client.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "ircd_defs.h"
 #include "numeric.h"
 #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"
 #include "parse.h"
 #include "ircd_defs.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 
 
 
 
 #include "newconf.h"
 #include "ircd_defs.h"
-#include "sprintf_irc.h"
 #include "common.h"
 #include "logger.h"
 #include "s_conf.h"
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "logger.h"
 #include "res.h"
 #include "reslib.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "numeric.h"
 #include "client.h" /* SNO_* */
 
 #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
 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "packet.h"
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "listener.h"
 #include "hostmask.h"
 #include "hostmask.h"
 #include "newconf.h"
 #include "hash.h"
-#include "sprintf_irc.h"
 #include "irc_dictionary.h"
 
 rb_dlink_list shared_conf_list;
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "ircd_defs.h"
 #include "numeric.h"
 #include "common.h"
 #include "hash.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "listener.h"
 #include "msg.h"
 #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"

unsupported/m_force.c

 #include "client.h"
 #include "common.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 #include "ircd.h"
 #include "hostmask.h"
 #include "numeric.h"