aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2006-12-29 14:32:52 +0000
committerJason Rumney2006-12-29 14:32:52 +0000
commitec869672641b16dd49551a7ca44ff271e481b6b7 (patch)
tree1607e2abc153ec26d8bc381ab8f03c1c6ffbdb9d
parentf8a265f26e6dc93507aa423c2775ca1dd21550da (diff)
downloademacs-ec869672641b16dd49551a7ca44ff271e481b6b7.tar.gz
emacs-ec869672641b16dd49551a7ca44ff271e481b6b7.zip
(regerror): Change parameter name err_code.
-rw-r--r--src/regex.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/regex.c b/src/regex.c
index c0dd6e00ffc..b1307743f0f 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -67,8 +67,8 @@
67# define regfree(preg) __regfree (preg) 67# define regfree(preg) __regfree (preg)
68# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) 68# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
69# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) 69# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
70# define regerror(errcode, preg, errbuf, errbuf_size) \ 70# define regerror(err_code, preg, errbuf, errbuf_size) \
71 __regerror(errcode, preg, errbuf, errbuf_size) 71 __regerror(err_code, preg, errbuf, errbuf_size)
72# define re_set_registers(bu, re, nu, st, en) \ 72# define re_set_registers(bu, re, nu, st, en) \
73 __re_set_registers (bu, re, nu, st, en) 73 __re_set_registers (bu, re, nu, st, en)
74# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ 74# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
@@ -6531,12 +6531,15 @@ regexec (preg, string, nmatch, pmatch, eflags)
6531WEAK_ALIAS (__regexec, regexec) 6531WEAK_ALIAS (__regexec, regexec)
6532 6532
6533 6533
6534/* Returns a message corresponding to an error code, ERRCODE, returned 6534/* Returns a message corresponding to an error code, ERR_CODE, returned
6535 from either regcomp or regexec. We don't use PREG here. */ 6535 from either regcomp or regexec. We don't use PREG here.
6536
6537 ERR_CODE was previously called ERRCODE, but that name causes an
6538 error with msvc8 compiler. */
6536 6539
6537size_t 6540size_t
6538regerror (errcode, preg, errbuf, errbuf_size) 6541regerror (err_code, preg, errbuf, errbuf_size)
6539 int errcode; 6542 int err_code;
6540 const regex_t *preg; 6543 const regex_t *preg;
6541 char *errbuf; 6544 char *errbuf;
6542 size_t errbuf_size; 6545 size_t errbuf_size;
@@ -6544,15 +6547,15 @@ regerror (errcode, preg, errbuf, errbuf_size)
6544 const char *msg; 6547 const char *msg;
6545 size_t msg_size; 6548 size_t msg_size;
6546 6549
6547 if (errcode < 0 6550 if (err_code < 0
6548 || errcode >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0]))) 6551 || err_code >= (sizeof (re_error_msgid) / sizeof (re_error_msgid[0])))
6549 /* Only error codes returned by the rest of the code should be passed 6552 /* Only error codes returned by the rest of the code should be passed
6550 to this routine. If we are given anything else, or if other regex 6553 to this routine. If we are given anything else, or if other regex
6551 code generates an invalid error code, then the program has a bug. 6554 code generates an invalid error code, then the program has a bug.
6552 Dump core so we can fix it. */ 6555 Dump core so we can fix it. */
6553 abort (); 6556 abort ();
6554 6557
6555 msg = gettext (re_error_msgid[errcode]); 6558 msg = gettext (re_error_msgid[err_code]);
6556 6559
6557 msg_size = strlen (msg) + 1; /* Includes the null. */ 6560 msg_size = strlen (msg) + 1; /* Includes the null. */
6558 6561