diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2005-11-03 00:17:30 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2005-11-03 00:17:30 (GMT) |
commit | 2ac3a08a98a293de62ed6ae01aa7a7d139660207 (patch) | |
tree | 86fab92b7dc7b1f3c9f8d9b9a0ead95a215fd1cd /generic/regerror.c | |
parent | 4299352915cf05025553108f48b7bf58f48a8353 (diff) | |
download | tcl-2ac3a08a98a293de62ed6ae01aa7a7d139660207.zip tcl-2ac3a08a98a293de62ed6ae01aa7a7d139660207.tar.gz tcl-2ac3a08a98a293de62ed6ae01aa7a7d139660207.tar.bz2 |
Applied patch #1096916 to support building with MSVC 8.
* generic/regerror.c: Avoid use of reserved word.
* generic/tcl.h: Select the right Tcl_Stat structure
* generic/tclDate.c: Casts to handle 64 bit time_t case.
* tests/env.test: Include essential envvar on Win32
* win/nmakehlp.c: Handle new return codes.
* win/makefile.vc: Use the selected options.
* win/rules.vc: Check options are applicable
* win/tclWinPort.h: Disable deprecated function warnings
* win/tclWinSock.c: Provide default value to avoid warning.
* win/tclWinTime.c: Add casts to handle 64bit time_t type.
Diffstat (limited to 'generic/regerror.c')
-rw-r--r-- | generic/regerror.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/regerror.c b/generic/regerror.c index aca13aa..182830d 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -50,8 +50,8 @@ static struct rerr { */ /* ARGSUSED */ size_t /* actual space needed (including NUL) */ -regerror(errcode, preg, errbuf, errbuf_size) -int errcode; /* error code, or REG_ATOI or REG_ITOA */ +regerror(code, preg, errbuf, errbuf_size) +int code; /* error code, or REG_ATOI or REG_ITOA */ CONST regex_t *preg; /* associated regex_t (unused at present) */ char *errbuf; /* result buffer (unless errbuf_size==0) */ size_t errbuf_size; /* available space in errbuf, can be 0 */ @@ -62,7 +62,7 @@ size_t errbuf_size; /* available space in errbuf, can be 0 */ size_t len; int icode; - switch (errcode) { + switch (code) { case REG_ATOI: /* convert name to number */ for (r = rerrs; r->code >= 0; r++) if (strcmp(r->name, errbuf) == 0) @@ -84,12 +84,12 @@ size_t errbuf_size; /* available space in errbuf, can be 0 */ break; default: /* a real, normal error code */ for (r = rerrs; r->code >= 0; r++) - if (r->code == errcode) + if (r->code == code) break; if (r->code >= 0) msg = r->explain; else { /* unknown; say so */ - sprintf(convbuf, unk, errcode); + sprintf(convbuf, unk, code); msg = convbuf; } break; |