diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/regerror.c | 10 | ||||
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclDate.c | 24 |
3 files changed, 22 insertions, 18 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; diff --git a/generic/tcl.h b/generic/tcl.h index 05e913f..5f6b7dd 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.206 2005/10/14 17:34:20 vasiljevic Exp $ + * RCS: @(#) $Id: tcl.h,v 1.207 2005/11/03 00:17:30 patthoyts Exp $ */ #ifndef _TCL @@ -371,7 +371,11 @@ typedef struct stati64 Tcl_StatBuf; # define TCL_LL_MODIFIER "L" # define TCL_LL_MODIFIER_SIZE 1 # else /* __BORLANDC__ */ +# if _MSC_VER < 1400 typedef struct _stati64 Tcl_StatBuf; +# else +typedef struct _stat64 Tcl_StatBuf; +# endif /* _MSC_VER < 1400 */ # define TCL_LL_MODIFIER "I64" # define TCL_LL_MODIFIER_SIZE 3 # endif /* __BORLANDC__ */ diff --git a/generic/tclDate.c b/generic/tclDate.c index 7761fa2..2020335 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2359,17 +2359,17 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv ) resultElement = Tcl_NewObj(); if ( yyHaveDate ) { Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyYear ) ); + Tcl_NewIntObj( (int) yyYear ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyMonth ) ); + Tcl_NewIntObj( (int) yyMonth ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyDay ) ); + Tcl_NewIntObj( (int) yyDay ) ); } Tcl_ListObjAppendElement( interp, result, resultElement ); if ( yyHaveTime ) { Tcl_ListObjAppendElement( interp, result, - Tcl_NewIntObj( ToSeconds( yyHour, + Tcl_NewIntObj( (int) ToSeconds( yyHour, yyMinutes, yySeconds, yyMeridian ) ) ); @@ -2380,7 +2380,7 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv ) resultElement = Tcl_NewObj(); if ( yyHaveZone ) { Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( -yyTimezone ) ); + Tcl_NewIntObj( (int) -yyTimezone ) ); Tcl_ListObjAppendElement( interp, resultElement, Tcl_NewIntObj( 1-yyDSTmode ) ); } @@ -2389,29 +2389,29 @@ TclClockOldscanObjCmd( clientData, interp, objc, objv ) resultElement = Tcl_NewObj(); if ( yyHaveRel ) { Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyRelMonth ) ); + Tcl_NewIntObj( (int) yyRelMonth ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyRelDay ) ); + Tcl_NewIntObj( (int) yyRelDay ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyRelSeconds ) ); + Tcl_NewIntObj( (int) yyRelSeconds ) ); } Tcl_ListObjAppendElement( interp, result, resultElement ); resultElement = Tcl_NewObj(); if ( yyHaveDay && !yyHaveDate ) { Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyDayOrdinal ) ); + Tcl_NewIntObj( (int) yyDayOrdinal ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyDayNumber ) ); + Tcl_NewIntObj( (int) yyDayNumber ) ); } Tcl_ListObjAppendElement( interp, result, resultElement ); resultElement = Tcl_NewObj(); if ( yyHaveOrdinalMonth ) { Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyMonthOrdinal ) ); + Tcl_NewIntObj( (int) yyMonthOrdinal ) ); Tcl_ListObjAppendElement( interp, resultElement, - Tcl_NewIntObj( yyMonth ) ); + Tcl_NewIntObj( (int) yyMonth ) ); } Tcl_ListObjAppendElement( interp, result, resultElement ); |