From dda5dc00cff334cac373096d444a0fd59e716124 Mon Sep 17 00:00:00 2001 From: ocean Date: Mon, 12 Sep 2005 10:44:21 +0000 Subject: * array.c: moved to ANSI function style from K&R function style. (used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regerror.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'regerror.c') diff --git a/regerror.c b/regerror.c index 560b5e12c5..348b7b30ed 100644 --- a/regerror.c +++ b/regerror.c @@ -30,13 +30,7 @@ #include "regint.h" #include /* for vsnprintf() */ -#ifdef HAVE_STDARG_PROTOTYPES #include -#define va_init_list(a,b) va_start(a,b) -#else -#include -#define va_init_list(a,b) va_start(a) -#endif extern char* onig_error_code_to_format(int code) @@ -185,21 +179,14 @@ onig_error_code_to_format(int code) #define MAX_ERROR_PAR_LEN 30 extern int -#ifdef HAVE_STDARG_PROTOTYPES onig_error_code_to_str(UChar* s, int code, ...) -#else -onig_error_code_to_str(s, code, va_alist) - UChar* s; - int code; - va_dcl -#endif { UChar *p, *q; OnigErrorInfo* einfo; int len; va_list vargs; - va_init_list(vargs, code); + va_start(vargs, code); switch (code) { case ONIGERR_UNDEFINED_NAME_REFERENCE: @@ -255,26 +242,15 @@ onig_error_code_to_str(s, code, va_alist) void -#ifdef HAVE_STDARG_PROTOTYPES onig_snprintf_with_pattern(char buf[], int bufsize, OnigEncoding enc, char* pat, char* pat_end, char *fmt, ...) -#else -onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) - char buf[]; - int bufsize; - OnigEncoding enc; - char* pat; - char* pat_end; - const char *fmt; - va_dcl -#endif { int n, need, len; UChar *p, *s, *bp; char bs[6]; va_list args; - va_init_list(args, fmt); + va_start(args, fmt); n = vsnprintf(buf, bufsize, fmt, args); va_end(args); -- cgit v1.2.1