diff options
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/tclClock.c | 16 | ||||
| -rw-r--r-- | generic/tclClockFmt.c | 22 | ||||
| -rw-r--r-- | generic/tclStrIdxTree.c | 8 |
3 files changed, 23 insertions, 23 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 5876114..64bf57f 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -193,9 +193,9 @@ TclClockInit( * Create the client data, which is a refcounted literal pool. */ - data = (ClockClientData *) ckalloc(sizeof(ClockClientData)); + data = (ClockClientData *)ckalloc(sizeof(ClockClientData)); data->refCount = 0; - data->literals = (Tcl_Obj **) ckalloc(LIT__END * sizeof(Tcl_Obj*)); + data->literals = (Tcl_Obj **)ckalloc(LIT__END * sizeof(Tcl_Obj*)); for (i = 0; i < LIT__END; ++i) { TclInitObjRef(data->literals[i], Tcl_NewStringObj( Literals[i], TCL_AUTO_LENGTH)); @@ -722,7 +722,7 @@ ClockMCDict( /* check or obtain mcDictObj (be sure it's modifiable) */ if (opts->mcDictObj == NULL || opts->mcDictObj->refCount > 1) { - int ref = 1; + Tcl_Size ref = 1; /* first try to find locale catalog dict */ if (dataPtr->mcDicts == NULL) { @@ -888,7 +888,7 @@ ClockMCSetIdx( if (dataPtr->mcLitIdxs == NULL) { int i; - dataPtr->mcLitIdxs = (Tcl_Obj **) ckalloc(MCLIT__END * sizeof(Tcl_Obj*)); + dataPtr->mcLitIdxs = (Tcl_Obj **)ckalloc(MCLIT__END * sizeof(Tcl_Obj*)); for (i = 0; i < MCLIT__END; ++i) { TclInitObjRef(dataPtr->mcLitIdxs[i], Tcl_NewStringObj(MsgCtLitIdxs[i], TCL_AUTO_LENGTH)); @@ -967,7 +967,7 @@ ClockConfigureObjCmd( CLOCK_INIT_COMPLETE }; int optionIndex; /* Index of an option. */ - int i; + Tcl_Size i; for (i = 1; i < objc; i++) { if (Tcl_GetIndexFromObj(interp, objv[i++], options, @@ -3277,7 +3277,7 @@ ClockParseFmtScnArgs( ClockFmtScnCmdArgs *opts, /* Result vector: format, locale, timezone... */ TclDateFields *date, /* Extracted date-time corresponding base * (by scan or add) resp. clockval (by format) */ - int objc, /* Parameter count */ + Tcl_Size objc, /* Parameter count */ Tcl_Obj *const objv[], /* Parameter vector */ ClockOperation operation, /* What operation are we doing: format, scan, add */ const char *syntax) /* Syntax of the current command */ @@ -3294,7 +3294,7 @@ ClockParseFmtScnArgs( }; int optionIndex; /* Index of an option. */ int saw = 0; /* Flag == 1 if option was seen already. */ - int i, baseIdx; + Tcl_Size i, baseIdx; Tcl_WideInt baseVal; /* Base time, expressed in seconds from the Epoch */ if (operation == CLC_OP_SCN) { @@ -4370,7 +4370,7 @@ ClockAddObjCmd( CLC_ADD_HOURS, CLC_ADD_MINUTES, CLC_ADD_SECONDS }; int unitIndex; /* Index of an option. */ - int i; + Tcl_Size i; Tcl_WideInt offs; /* even number of arguments */ diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index 7517b72..ac5bb84 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -554,7 +554,7 @@ ClockFmtScnStorageAllocProc( allocsize -= sizeof(hPtr->key); } - fss = (ClockFmtScnStorage *) ckalloc(allocsize); + fss = (ClockFmtScnStorage *)ckalloc(allocsize); /* initialize */ memset(fss, 0, sizeof(*fss)); @@ -666,7 +666,7 @@ ClockFmtObj_DupInternalRep( /* if no format representation, dup string representation */ if (fss == NULL) { - copyPtr->bytes = (char *) ckalloc(srcPtr->length + 1); + copyPtr->bytes = (char *)ckalloc(srcPtr->length + 1); memcpy(copyPtr->bytes, srcPtr->bytes, srcPtr->length + 1); copyPtr->length = srcPtr->length; } @@ -733,7 +733,7 @@ ClockFmtObj_UpdateString( } len = strlen(name); objPtr->length = len++, - objPtr->bytes = (char *) attemptckalloc(len); + objPtr->bytes = (char *)attemptckalloc(len); if (objPtr->bytes) { memcpy(objPtr->bytes, name, len); } @@ -2123,7 +2123,7 @@ EstimateTokenCount( #define AllocTokenInChain(tok, chain, tokCnt, type) \ if (++(tok) >= (chain) + (tokCnt)) { \ - chain = (type) attemptckrealloc((char *)(chain), \ + chain = (type)attemptckrealloc((char *)(chain), \ (tokCnt + CLOCK_MIN_TOK_CHAIN_BLOCK_SIZE) * sizeof(*(tok))); \ if ((chain) == NULL) { \ goto done; \ @@ -2169,7 +2169,7 @@ ClockGetOrParseScanFormat( fss->scnSpaceCount = 0; - scnTok = tok = (ClockScanToken *) ckalloc(sizeof(*tok) * fss->scnTokC); + scnTok = tok = (ClockScanToken *)ckalloc(sizeof(*tok) * fss->scnTokC); memset(tok, 0, sizeof(*tok)); tokCnt = 1; while (p < e) { @@ -2712,13 +2712,13 @@ FrmResultAllocate( char *newRes; /* differentiate between stack and memory */ if (!FrmResultIsAllocated(dateFmt)) { - newRes = (char *) attemptckalloc(newsize); + newRes = (char *)attemptckalloc(newsize); if (newRes == NULL) { return TCL_ERROR; } memcpy(newRes, dateFmt->resMem, dateFmt->output - dateFmt->resMem); } else { - newRes = (char *) attemptckrealloc(dateFmt->resMem, newsize); + newRes = (char *)attemptckrealloc(dateFmt->resMem, newsize); if (newRes == NULL) { return TCL_ERROR; } @@ -3244,7 +3244,7 @@ ClockGetOrParseFmtFormat( /* estimate token count by % char and format length */ fss->fmtTokC = EstimateTokenCount(p, e); - fmtTok = tok = (ClockFormatToken *) ckalloc(sizeof(*tok) * fss->fmtTokC); + fmtTok = tok = (ClockFormatToken *)ckalloc(sizeof(*tok) * fss->fmtTokC); memset(tok, 0, sizeof(*tok)); tokCnt = 1; while (p < e) { @@ -3380,7 +3380,7 @@ ClockFormat( dateFmt->resMem = resMem; dateFmt->resEnd = dateFmt->resMem + sizeof(resMem); if (fss->fmtMinAlloc > sizeof(resMem)) { - dateFmt->resMem = (char *) attemptckalloc(fss->fmtMinAlloc); + dateFmt->resMem = (char *)attemptckalloc(fss->fmtMinAlloc); if (dateFmt->resMem == NULL) { return TCL_ERROR; } @@ -3505,13 +3505,13 @@ ClockFormat( result->length = dateFmt->output - dateFmt->resMem; size = result->length + 1; if (dateFmt->resMem == resMem) { - result->bytes = (char *) attemptckalloc(size); + result->bytes = (char *)attemptckalloc(size); if (result->bytes == NULL) { return TCL_ERROR; } memcpy(result->bytes, dateFmt->resMem, size); } else if ((dateFmt->resEnd - dateFmt->resMem) / size > MAX_FMT_RESULT_THRESHOLD) { - result->bytes = (char *) attemptckrealloc(dateFmt->resMem, size); + result->bytes = (char *)attemptckrealloc(dateFmt->resMem, size); if (result->bytes == NULL) { result->bytes = dateFmt->resMem; } diff --git a/generic/tclStrIdxTree.c b/generic/tclStrIdxTree.c index 533f73d..1c4cff3 100644 --- a/generic/tclStrIdxTree.c +++ b/generic/tclStrIdxTree.c @@ -252,7 +252,7 @@ TclStrIdxTreeBuildFromList( /* create lowercase reflection of the list keys */ - lwrv = (Tcl_Obj **) attemptckalloc(sizeof(Tcl_Obj*) * lstc); + lwrv = (Tcl_Obj **)attemptckalloc(sizeof(Tcl_Obj*) * lstc); if (lwrv == NULL) { return TCL_ERROR; } @@ -304,7 +304,7 @@ TclStrIdxTreeBuildFromList( * but don't split by fulfilled child of found item ( ii->iii->iiii ) */ if (foundItem->length != (f - s)) { /* first split found item (insert one between parent and found + new one) */ - item = (TclStrIdx *) attemptckalloc(sizeof(TclStrIdx)); + item = (TclStrIdx *)attemptckalloc(sizeof(TclStrIdx)); if (item == NULL) { goto done; } @@ -322,7 +322,7 @@ TclStrIdxTreeBuildFromList( } } /* append item at end of found parent */ - item = (TclStrIdx *) attemptckalloc(sizeof(TclStrIdx)); + item = (TclStrIdx *)attemptckalloc(sizeof(TclStrIdx)); if (item == NULL) { goto done; } @@ -517,7 +517,7 @@ TclStrIdxTreeTestObjCmd( case O_INDEX: case O_PUTS_INDEX: { Tcl_Obj **lstv; - int i, lstc; + Tcl_Size i, lstc; TclStrIdxTree idxTree = {NULL, NULL}; i = 1; |
