diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-12 10:44:21 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-12 10:44:21 +0000 |
commit | dda5dc00cff334cac373096d444a0fd59e716124 (patch) | |
tree | d9ab9c1dc4cede235a3bbaea653c07f38ea880b9 /regerror.c | |
parent | 51e25545aeb1555051b95c5b31b4f3ca6ec6b6fe (diff) | |
download | ruby-dda5dc00cff334cac373096d444a0fd59e716124.tar.gz |
* 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
Diffstat (limited to 'regerror.c')
-rw-r--r-- | regerror.c | 28 |
1 files changed, 2 insertions, 26 deletions
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 <stdio.h> /* for vsnprintf() */ -#ifdef HAVE_STDARG_PROTOTYPES #include <stdarg.h> -#define va_init_list(a,b) va_start(a,b) -#else -#include <varargs.h> -#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); |