From 6524f34a2688436249d111a3456a097c7111722c Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 Jul 2005 01:02:18 +0000 Subject: * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String, using missing/vsnprintf.c. [ruby-dev:26580] * missing/vsnprintf.c: made the output changeable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- intern.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'intern.h') diff --git a/intern.h b/intern.h index e61e394b60..fe5737343d 100644 --- a/intern.h +++ b/intern.h @@ -15,6 +15,12 @@ #ifndef RUBY_INTERN_H #define RUBY_INTERN_H 1 +#ifdef HAVE_STDARG_PROTOTYPES +# include +#else +# include +#endif + /* * Functions and variables that are used by more than one source file of * the kernel. @@ -449,7 +455,14 @@ void rb_trap_exit _((void)); void rb_trap_exec _((void)); const char *ruby_signal_name _((int)); /* sprintf.c */ -VALUE rb_f_sprintf _((int, VALUE*)); +VALUE rb_f_sprintf _((int, const VALUE*)); +VALUE rb_sprintf __((const char*, ...)) +#ifdef __GNUC__ + __attribute__((format(printf,1,2))) +#endif + ; +VALUE rb_vsprintf _((const char*, va_list)); +VALUE rb_str_format _((int, const VALUE *, VALUE)); /* string.c */ VALUE rb_str_new _((const char*, long)); VALUE rb_str_new2 _((const char*)); -- cgit v1.2.3