From fc3f1bc228f8fe358e7f77c512374c421cbf8e7a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 30 Dec 2007 21:08:36 +0000 Subject: * include/ruby/encoding.h (rb_enc_sprintf, rb_enc_vsprintf): prototyped. * sprintf.c (rb_enc_sprintf, rb_enc_vsprintf): new functions to format arguments with encoding. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index cbe4f8874..89f3ec36b 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -13,6 +13,11 @@ #ifndef RUBY_ENCODING_H #define RUBY_ENCODING_H 1 +#ifdef HAVE_STDARG_PROTOTYPES +# include +#else +# include +#endif #include "ruby/oniguruma.h" #define ENCODING_INLINE_MAX 1023 @@ -54,6 +59,8 @@ void rb_enc_associate(VALUE, rb_encoding*); void rb_enc_copy(VALUE dst, VALUE src); VALUE rb_enc_str_new(const char*, long len, rb_encoding*); +PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3); +VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list); long rb_enc_strlen(const char*, const char*, rb_encoding*); char* rb_enc_nth(const char*, const char*, int, rb_encoding*); VALUE rb_obj_encoding(VALUE); -- cgit