From 592eb6cb824a9714c20b3c47ad9c6b7b6f4d7d34 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sat, 27 Aug 2005 09:47:35 +0000 Subject: [PATCH] VC8 (VS 2005 beta 2) compilation fix: renamed errcode to err_code to avoid possible compiler bug git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1862 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/regex/regcomp.ci | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sc2/src/regex/regcomp.ci b/sc2/src/regex/regcomp.ci index 0710f0941..6803d73e8 100644 --- a/sc2/src/regex/regcomp.ci +++ b/sc2/src/regex/regcomp.ci @@ -530,8 +530,8 @@ weak_alias (__regcomp, regcomp) from either regcomp or regexec. We don't use PREG here. */ size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; +regerror (err_code, preg, errbuf, errbuf_size) + int err_code; const regex_t *preg; char *errbuf; size_t errbuf_size; @@ -539,8 +539,8 @@ regerror (errcode, preg, errbuf, errbuf_size) const char *msg; size_t msg_size; - if (BE (errcode < 0 - || errcode >= (int) (sizeof (__re_error_msgid_idx) + if (BE (err_code < 0 + || err_code >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex @@ -548,7 +548,7 @@ regerror (errcode, preg, errbuf, errbuf_size) Dump core so we can fix it. */ abort (); - msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); + msg = gettext (__re_error_msgid + __re_error_msgid_idx[err_code]); msg_size = strlen (msg) + 1; /* Includes the null. */