4
mirror of git://git.acid.vegas/unrealircd.git synced 2024-11-23 16:36:40 +00:00
unrealircd/include/ircsprintf.h

24 lines
585 B
C
Raw Normal View History

2020-03-29 09:16:53 +00:00
/*
* sprintf_irc.h
*
* $Id$
*/
#ifndef IRCSPRINTF_H
#define IRCSPRINTF_H
#include <stdarg.h>
#include <stdio.h>
/* ugly hack GRR, for both attribute and FORMAT_STRING */
#if !defined(__GNUC__) && !defined(__common_include__)
#define __attribute__(x) /* nothing */
#endif
#ifndef FORMAT_STRING
# define FORMAT_STRING(p) p
#endif
2022-01-15 05:16:34 +00:00
extern char *ircvsnprintf(char *str, size_t size, const char *format, va_list) __attribute__((format(printf,3,0)));
2020-03-29 09:16:53 +00:00
extern char *ircsnprintf(char *str, size_t size, FORMAT_STRING(const char *format), ...) __attribute__((format(printf,3,4)));
#endif