diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2024-06-04 15:35:14 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2024-06-04 15:35:14 (GMT) |
commit | 14e9a4e0bda3c86ac11baf3c11f900a5837ea70a (patch) | |
tree | ea245cdd3ace1d0ea075a51e59d0b5044fc86bf2 | |
parent | 1719e80d015d40d514bb9209a921525b2d667d9c (diff) | |
download | tcl-14e9a4e0bda3c86ac11baf3c11f900a5837ea70a.zip tcl-14e9a4e0bda3c86ac11baf3c11f900a5837ea70a.tar.gz tcl-14e9a4e0bda3c86ac11baf3c11f900a5837ea70a.tar.bz2 |
Space before tab is an extremely unlikely to be correct indentation pattern
44 files changed, 256 insertions, 282 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 41e68a8..b5630cc 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -1105,7 +1105,7 @@ struct Tcl_HashEntry { * allocated for the hash table that is not for an * entry will use the system heap. * TCL_HASH_KEY_DIRECT_COMPARE - - * Allows fast comparison for hash keys directly + * Allows fast comparison for hash keys directly * by compare of their key.oneWordValue values, * before call of compareKeysProc (much slower * than a direct compare, so it is speed-up only @@ -1250,7 +1250,7 @@ typedef struct Tcl_HashSearch { typedef struct { void *next; /* Search position for underlying hash * table. */ - TCL_HASH_TYPE epoch; /* Epoch marker for dictionary being searched, + TCL_HASH_TYPE epoch; /* Epoch marker for dictionary being searched, * or 0 if search has terminated. */ Tcl_Dict dictionaryPtr; /* Reference to dictionary being searched. */ } Tcl_DictSearch; @@ -1998,7 +1998,7 @@ typedef struct Tcl_EncodingType { * buffer contains the entire input stream to be * converted, this flag should be set. * TCL_ENCODING_STOPONERROR - Not used any more. - * TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf does not append a + * TCL_ENCODING_NO_TERMINATE - If set, Tcl_ExternalToUtf does not append a * terminating NUL byte. Since it does not need * an extra byte for a terminating NUL, it fills * all dstLen bytes with encoded UTF-8 content if diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c index fd1014c..4b4b892 100755 --- a/generic/tclArithSeries.c +++ b/generic/tclArithSeries.c @@ -231,21 +231,19 @@ maxPrecision( * * ArithSeriesLen -- * - * Compute the length of the equivalent list where - * every element is generated starting from *start*, - * and adding *step* to generate every successive element - * that's < *end* for positive steps, or > *end* for negative - * steps. + * Compute the length of the equivalent list where + * every element is generated starting from *start*, + * and adding *step* to generate every successive element + * that's < *end* for positive steps, or > *end* for negative + * steps. * * Results: - * - * The length of the list generated by the given range, - * that may be zero. - * The function returns -1 if the list is of length infinite. + * The length of the list generated by the given range, + * that may be zero. + * The function returns -1 if the list is of length infinite. * * Side effects: - * - * None. + * None. * *---------------------------------------------------------------------- */ @@ -383,12 +381,11 @@ FreeArithSeriesInternalRep( * refcount = 0. * * Results: - * - * A Tcl_Obj pointer to the created ArithSeries object. - * A NULL pointer of the range is invalid. + * A Tcl_Obj pointer to the created ArithSeries object. + * A NULL pointer of the range is invalid. * * Side Effects: - * None. + * None. * *---------------------------------------------------------------------- */ @@ -425,7 +422,7 @@ NewArithSeriesInt( arithSeriesObj->internalRep.twoPtrValue.ptr2 = NULL; arithSeriesObj->typePtr = &arithSeriesType; if (length > 0) { - Tcl_InvalidateStringRep(arithSeriesObj); + Tcl_InvalidateStringRep(arithSeriesObj); } return arithSeriesObj; @@ -440,16 +437,13 @@ NewArithSeriesInt( * refcount = 0. * * Results: - * - * A Tcl_Obj pointer to the created ArithSeries object. - * A NULL pointer of the range is invalid. + * A Tcl_Obj pointer to the created ArithSeries object. + * A NULL pointer of the range is invalid. * * Side Effects: - * - * None. + * None. *---------------------------------------------------------------------- */ - static Tcl_Obj * NewArithSeriesDbl( double start, @@ -485,7 +479,7 @@ NewArithSeriesDbl( arithSeriesObj->typePtr = &arithSeriesType; if (length > 0) { - Tcl_InvalidateStringRep(arithSeriesObj); + Tcl_InvalidateStringRep(arithSeriesObj); } return arithSeriesObj; @@ -501,13 +495,10 @@ NewArithSeriesDbl( * refcount = 0. * * Results: - * - * A Tcl_Obj pointer. - * No assignment on error. + * A Tcl_Obj pointer. No assignment on error. * * Side Effects: - * - * None. + * None. *---------------------------------------------------------------------- */ static void @@ -549,16 +540,13 @@ assignNumber( * refcount = 0. * * Results: - * - * A Tcl_Obj pointer to the created ArithSeries object. - * An empty Tcl_Obj if the range is invalid. + * A Tcl_Obj pointer to the created ArithSeries object. + * An empty Tcl_Obj if the range is invalid. * * Side Effects: - * - * None. + * None. *---------------------------------------------------------------------- */ - int TclNewArithSeriesObj( Tcl_Interp *interp, /* For error reporting */ @@ -664,13 +652,11 @@ TclNewArithSeriesObj( * element is stored in *element. * * Results: - * - * TCL_OK on success. + * TCL_OK on success. * * Side Effects: - * - * On success, the integer pointed by *element is modified. - * An empty string ("") is assigned if index is out-of-bounds. + * On success, the integer pointed by *element is modified. + * An empty string ("") is assigned if index is out-of-bounds. * *---------------------------------------------------------------------- */ @@ -705,12 +691,10 @@ TclArithSeriesObjIndex( * Returns the length of the arithmetic series. * * Results: - * - * The length of the series as Tcl_WideInt. + * The length of the series as Tcl_WideInt. * * Side Effects: - * - * None. + * None. * *---------------------------------------------------------------------- */ @@ -732,13 +716,11 @@ ArithSeriesObjLength( * refcount = 0. * * Results: - * - * A Tcl_Obj pointer to the created ArithSeries object. - * A NULL pointer of the range is invalid. + * A Tcl_Obj pointer to the created ArithSeries object. + * A NULL pointer of the range is invalid. * * Side Effects: - * - * None. + * None. *---------------------------------------------------------------------- */ @@ -762,19 +744,17 @@ TclArithSeriesObjStep( * * SetArithSeriesFromAny -- * - * The Arithmetic Series object is just an way to optimize - * Lists space complexity, so no one should try to convert - * a string to an Arithmetic Series object. + * The Arithmetic Series object is just an way to optimize + * Lists space complexity, so no one should try to convert + * a string to an Arithmetic Series object. * - * This function is here just to populate the Type structure. + * This function is here just to populate the Type structure. * * Results: - * - * The result is always TCL_ERROR. But see Side Effects. + * The result is always TCL_ERROR. But see Side Effects. * * Side effects: - * - * Tcl Panic if called. + * Tcl Panic if called. * *---------------------------------------------------------------------- */ @@ -1119,11 +1099,11 @@ TclArithSeriesObjReverse( * should not be NULL and we assume it is not NULL. * * Notes: - * At the cost of overallocation it's possible to estimate - * the length of the string representation and make this procedure - * much faster. Because the programmer shouldn't expect the - * string conversion of a big arithmetic sequence to be fast - * this version takes more care of space than time. + * At the cost of overallocation it's possible to estimate + * the length of the string representation and make this procedure + * much faster. Because the programmer shouldn't expect the + * string conversion of a big arithmetic sequence to be fast + * this version takes more care of space than time. * *---------------------------------------------------------------------- */ diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 1d09317..7283b0a 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -51,7 +51,7 @@ typedef enum BasicBlockCatchState { BBCS_UNKNOWN = 0, /* Catch context has not yet been identified */ BBCS_NONE, /* Block is outside of any catch */ BBCS_INCATCH, /* Block is within a catch context */ - BBCS_CAUGHT /* Block is within a catch context and + BBCS_CAUGHT /* Block is within a catch context and * may be executed after an exception fires */ } BasicBlockCatchState; @@ -1930,7 +1930,7 @@ MoveExceptionRangesToBasicBlock( curr_bb->foreignExceptionBase = savedExceptArrayNext; curr_bb->foreignExceptionCount = exceptionCount; curr_bb->foreignExceptions = - (ExceptionRange*)Tcl_Alloc(exceptionCount * sizeof(ExceptionRange)); + (ExceptionRange*)Tcl_Alloc(exceptionCount * sizeof(ExceptionRange)); memcpy(curr_bb->foreignExceptions, envPtr->exceptArrayPtr + savedExceptArrayNext, exceptionCount * sizeof(ExceptionRange)); diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 16721b1..9b6708d 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -319,7 +319,7 @@ static const CmdInfo builtInCmds[] = { {"break", Tcl_BreakObjCmd, TclCompileBreakCmd, NULL, CMD_IS_SAFE}, {"catch", Tcl_CatchObjCmd, TclCompileCatchCmd, TclNRCatchObjCmd, CMD_IS_SAFE}, {"concat", Tcl_ConcatObjCmd, TclCompileConcatCmd, NULL, CMD_IS_SAFE}, - {"const", Tcl_ConstObjCmd, TclCompileConstCmd, NULL, CMD_IS_SAFE}, + {"const", Tcl_ConstObjCmd, TclCompileConstCmd, NULL, CMD_IS_SAFE}, {"continue", Tcl_ContinueObjCmd, TclCompileContinueCmd, NULL, CMD_IS_SAFE}, {"coroinject", NULL, NULL, TclNRCoroInjectObjCmd, CMD_IS_SAFE}, {"coroprobe", NULL, NULL, TclNRCoroProbeObjCmd, CMD_IS_SAFE}, @@ -345,7 +345,7 @@ static const CmdInfo builtInCmds[] = { {"lmap", Tcl_LmapObjCmd, TclCompileLmapCmd, TclNRLmapCmd, CMD_IS_SAFE}, {"lpop", Tcl_LpopObjCmd, NULL, NULL, CMD_IS_SAFE}, {"lrange", Tcl_LrangeObjCmd, TclCompileLrangeCmd, NULL, CMD_IS_SAFE}, - {"lremove", Tcl_LremoveObjCmd, NULL, NULL, CMD_IS_SAFE}, + {"lremove", Tcl_LremoveObjCmd, NULL, NULL, CMD_IS_SAFE}, {"lrepeat", Tcl_LrepeatObjCmd, NULL, NULL, CMD_IS_SAFE}, {"lreplace", Tcl_LreplaceObjCmd, TclCompileLreplaceCmd, NULL, CMD_IS_SAFE}, {"lreverse", Tcl_LreverseObjCmd, NULL, NULL, CMD_IS_SAFE}, @@ -749,7 +749,7 @@ buildInfoObjCmd2( p += len; q = strchr(++p, '.'); if (!q) { - q = p + strlen(p); + q = p + strlen(p); } memcpy(buf, p, q - p); buf[q - p] = '\0'; @@ -8868,7 +8868,7 @@ TclNRTailcallObjCmd( nsObjPtr = Tcl_NewStringObj(nsPtr->fullName, TCL_INDEX_NONE); listPtr = Tcl_NewListObj(objc, objv); - TclListObjSetElement(interp, listPtr, 0, nsObjPtr); + TclListObjSetElement(interp, listPtr, 0, nsObjPtr); iPtr->varFramePtr->tailcallPtr = listPtr; } diff --git a/generic/tclClock.c b/generic/tclClock.c index 3b07b51..2496243 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -128,7 +128,7 @@ struct ClockCommand { * to it, but may well ignore this data. */ CompileProc *compileProc; /* The compiler for the command. */ void *clientData; /* Any clientData to give the command (if NULL - * a reference to ClockClientData will be sent) */ + * a reference to ClockClientData will be sent) */ }; static const struct ClockCommand clockCommands[] = { @@ -257,7 +257,7 @@ TclClockInit( #define TCL_CLOCK_PREFIX_LEN 14 /* == strlen("::tcl::clock::") */ memcpy(cmdName, "::tcl::clock::", TCL_CLOCK_PREFIX_LEN); for (clockCmdPtr=clockCommands ; clockCmdPtr->name!=NULL ; clockCmdPtr++) { - void *clientData; + void *clientData; strcpy(cmdName + TCL_CLOCK_PREFIX_LEN, clockCmdPtr->name); if (!(clientData = clockCmdPtr->clientData)) { @@ -438,7 +438,7 @@ NormTimezoneObj( } if (timezoneObj == dataPtr->prevSetupTimeZoneUnnorm && dataPtr->prevSetupTimeZone != NULL) { - return dataPtr->prevSetupTimeZone; + return dataPtr->prevSetupTimeZone; } if (timezoneObj == dataPtr->gmtSetupTimeZoneUnnorm && dataPtr->gmtSetupTimeZone != NULL) { @@ -648,7 +648,7 @@ NormLocaleObj( if ((localeObj->length == 1 /* C */ && strcasecmp(loc, Literals[LIT_C]) == 0) || (dataPtr->defaultLocale && (loc2 = TclGetString(dataPtr->defaultLocale)) - && localeObj->length == dataPtr->defaultLocale->length + && localeObj->length == dataPtr->defaultLocale->length && strcasecmp(loc, loc2) == 0)) { *mcDictObj = dataPtr->defaultLocaleDict; return dataPtr->defaultLocale ? @@ -1323,8 +1323,8 @@ ClockSetupTimeZone( /* before setup just take a look in TZData variable */ if (Tcl_ObjGetVar2(interp, dataPtr->literals[LIT_TZDATA], timezoneObj, 0)) { - /* put it to last slot and return normalized */ - TimezoneLoaded(dataPtr, callargs[1], timezoneObj); + /* put it to last slot and return normalized */ + TimezoneLoaded(dataPtr, callargs[1], timezoneObj); return callargs[1]; } /* setup now */ @@ -3305,10 +3305,10 @@ ClockParseFmtScnArgs( Tcl_WideInt baseVal; /* Base time, expressed in seconds from the Epoch */ if (operation == CLC_OP_SCN) { - /* default flags (from configure) */ - opts->flags |= dataPtr->defFlags & CLF_VALIDATE; + /* default flags (from configure) */ + opts->flags |= dataPtr->defFlags & CLF_VALIDATE; } else { - /* clock value (as current base) */ + /* clock value (as current base) */ opts->baseObj = objv[(baseIdx = 1)]; saw |= 1 << CLC_ARGS_BASE; } diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index b3401a0..ea5f0a5 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -758,7 +758,7 @@ ClockFmtObj_UpdateString( * Returns tcl object with key or format object if not localizable. * * Side effects: - * Converts given format object to ClockFmtObjType on demand for caching + * Converts given format object to ClockFmtObjType on demand for caching * the key inside its internal representation. * *---------------------------------------------------------------------- @@ -804,7 +804,7 @@ ClockFrmObjGetLocFmtKey( * Returns scan/format storage pointer to ClockFmtScnStorage. * * Side effects: - * Converts given format object to ClockFmtObjType on demand for caching + * Converts given format object to ClockFmtObjType on demand for caching * the format storage reference inside its internal representation. * Increments objRefCount of the ClockFmtScnStorage reference. * @@ -1416,7 +1416,7 @@ ClockMCGetMultiListIdxTree( * Results: * TCL_OK - match found and the index stored in *val, * TCL_RETURN - not matched or ambigous, - * TCL_ERROR - in error case. + * TCL_ERROR - in error case. * * Side effects: * Input points to end of the found token in string. @@ -1770,7 +1770,7 @@ ClockScnToken_JDN_Proc( } s = p; while (p < end && isdigit(UCHAR(*p))) { - fractJDDiv *= 10; + fractJDDiv *= 10; p++; } if (Clock_str2int(&fractJD, s, p, 1) != TCL_OK) { @@ -2649,7 +2649,7 @@ ClockScan( } if (flags & (CLF_ISO8601WEEK | CLF_ISO8601YEAR)) { if ((flags & (CLF_ISO8601YEAR | CLF_YEAR)) == CLF_YEAR) { - /* for calculations expected iso year */ + /* for calculations expected iso year */ info->date.iso8601Year = yyYear; } else if (info->date.iso8601Year < 100) { if (!(flags & CLF_ISO8601CENTURY)) { @@ -2662,7 +2662,7 @@ ClockScan( } } if ((flags & (CLF_ISO8601YEAR | CLF_YEAR)) == CLF_ISO8601YEAR) { - /* for calculations expected year (e. g. CLF_ISO8601WEEK not set) */ + /* for calculations expected year (e. g. CLF_ISO8601WEEK not set) */ yyYear = info->date.iso8601Year; } } @@ -2862,7 +2862,7 @@ ClockFmtToken_JDN_Proc( fractJD = dateFmt->date.secondOfDay - (int)tok->map->offs; /* 0 for calendar or 43200 for astro JD */ if (fractJD < 0) { - intJD--; + intJD--; fractJD += SECONDS_PER_DAY; } if (fractJD && intJD < 0) { /* avoid jump over 0, by negative JD's */ diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index d2f30dd..cab20b8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -30,7 +30,7 @@ struct ForeachState { Tcl_Size j, maxj; /* Number of loop iterations. */ Tcl_Size numLists; /* Count of value lists. */ Tcl_Size *index; /* Array of value list indices. */ - Tcl_Size *varcList; /* # loop variables per list. */ + Tcl_Size *varcList; /* # loop variables per list. */ Tcl_Obj ***varvList; /* Array of var name lists. */ Tcl_Obj **vCopyList; /* Copies of var name list arguments. */ Tcl_Size *argcList; /* Array of value list sizes. */ diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 2a9d316..a36e349 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -2765,9 +2765,9 @@ StringCmpOpts( return TCL_ERROR; } if ((Tcl_WideUInt)wreqlength > TCL_SIZE_MAX) { - *reqlength = -1; + *reqlength = -1; } else { - *reqlength = wreqlength; + *reqlength = wreqlength; } } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 6d3eabd..001310b 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -379,9 +379,9 @@ TclCompileArraySetCmd( localIndex = TclFindCompiledLocal(varTokenPtr->start, varTokenPtr->size, 1, envPtr); PushStringLiteral(envPtr, "0"); - TclEmitInstInt4(INST_REVERSE, 2, envPtr); - TclEmitInstInt4(INST_UPVAR, localIndex, envPtr); - TclEmitOpcode(INST_POP, envPtr); + TclEmitInstInt4(INST_REVERSE, 2, envPtr); + TclEmitInstInt4(INST_UPVAR, localIndex, envPtr); + TclEmitOpcode(INST_POP, envPtr); } /* @@ -3415,10 +3415,10 @@ TclCompileFormatCmd( * to a local scalar variable name. * * Results: - * Returns the non-negative integer index value into the table of - * compiled locals corresponding to a local scalar variable name. - * If the arguments passed in do not identify a local scalar variable - * then return TCL_INDEX_NONE. + * Returns the non-negative integer index value into the table of + * compiled locals corresponding to a local scalar variable name. + * If the arguments passed in do not identify a local scalar variable + * then return TCL_INDEX_NONE. * * Side effects: * May add an entry into the table of compiled locals. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index a20f81e..0a9f2a3 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -34,7 +34,7 @@ struct ByteCode; /* Forward declaration. */ * This variable is linked to the Tcl variable "tcl_traceCompile". */ -MODULE_SCOPE int tclTraceCompile; +MODULE_SCOPE int tclTraceCompile; /* * Variable that controls whether execution tracing is enabled and, if so, @@ -46,7 +46,7 @@ MODULE_SCOPE int tclTraceCompile; * This variable is linked to the Tcl variable "tcl_traceExec". */ -MODULE_SCOPE int tclTraceExec; +MODULE_SCOPE int tclTraceExec; #endif /* @@ -325,13 +325,13 @@ typedef struct CompileEnv { * exceptArrayPtr points in heap, else 0. */ #endif LiteralEntry *literalArrayPtr; - /* Points to start of LiteralEntry array. */ + /* Points to start of LiteralEntry array. */ Tcl_Size literalArrayNext; /* Index of next free object array entry. */ Tcl_Size literalArrayEnd; /* Index just after last obj array entry. */ int mallocedLiteralArray; /* 1 if object array was expanded and objArray * points into the heap, else 0. */ ExceptionRange *exceptArrayPtr; - /* Points to start of the ExceptionRange + /* Points to start of the ExceptionRange * array. */ Tcl_Size exceptArrayNext; /* Next free ExceptionRange array index. * exceptArrayNext is the number of ranges and @@ -482,7 +482,7 @@ typedef struct ByteCode { * array. This is just after the last code * byte. */ ExceptionRange *exceptArrayPtr; - /* Points to the start of the ExceptionRange + /* Points to the start of the ExceptionRange * array. This is just after the last object * in the object array. */ AuxData *auxDataArrayPtr; /* Points to the start of the auxiliary data diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index a0016df..428a3a6 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -80,7 +80,7 @@ static const EnsembleImplMap implementationMap[] = { {"info", DictInfoCmd, TclCompileBasic1ArgCmd, NULL, NULL, 0 }, {"keys", DictKeysCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0 }, {"lappend", DictLappendCmd, TclCompileDictLappendCmd, NULL, NULL, 0 }, - {"map", NULL, TclCompileDictMapCmd, DictMapNRCmd, NULL, 0 }, + {"map", NULL, TclCompileDictMapCmd, DictMapNRCmd, NULL, 0 }, {"merge", DictMergeCmd, TclCompileDictMergeCmd, NULL, NULL, 0 }, {"remove", DictRemoveCmd, TclCompileBasicMin1ArgCmd, NULL, NULL, 0 }, {"replace", DictReplaceCmd, NULL, NULL, NULL, 0 }, @@ -129,7 +129,7 @@ typedef struct Dict { * the dictionary. Used for doing traversal of * the entries in the order that they are * created. */ - size_t epoch; /* Epoch counter */ + size_t epoch; /* Epoch counter */ size_t refCount; /* Reference counter (see above) */ Tcl_Obj *chain; /* Linked list used for invalidating the * string representations of updated nested diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 176838d..f48bf63 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -4291,7 +4291,7 @@ int TclEncodingProfileNameToId( Tcl_Interp *interp, /* For error messages. May be NULL */ const char *profileName, /* Name of profile */ - int *profilePtr) /* Output */ + int *profilePtr) /* Output */ { size_t i; size_t numProfiles = sizeof(encodingProfiles) / sizeof(encodingProfiles[0]); diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 4b0284f..a0d04e8 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -3951,7 +3951,7 @@ TEBCresume( varPtr = TclObjLookupVarEx(interp, part1Ptr, NULL, 0, NULL, /*createPart1*/1, /*createPart2*/0, &arrayPtr); doConst: - if (TclIsVarConstant(varPtr)) { + if (TclIsVarConstant(varPtr)) { TRACE_APPEND(("\n")); NEXT_INST_V(pcAdjustment, cleanup, 0); } diff --git a/generic/tclIO.c b/generic/tclIO.c index 96a6d33..2000573 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -1530,8 +1530,8 @@ TclGetChannelFromObj( ChanGetInternalRep(objPtr, resPtr); if (resPtr) { /* - * Confirm validity of saved lookup results. - */ + * Confirm validity of saved lookup results. + */ statePtr = resPtr->statePtr; if ((resPtr->interp == interp) /* Same interp context */ @@ -4514,15 +4514,15 @@ Write( flushed += statePtr->bufSize; /* - * We just flushed. So if we have needNlFlush set to record that - * we need to flush because there is a (translated) newline in the - * buffer, that's likely not true any more. But there is a tricky - * exception. If we have saved bytes that did not really get - * flushed and those bytes came from a translation of a newline as - * the last thing taken from the src array, then needNlFlush needs - * to remain set to flag that the next buffer still needs a - * newline flush. - */ + * We just flushed. So if we have needNlFlush set to record that + * we need to flush because there is a (translated) newline in the + * buffer, that's likely not true any more. But there is a tricky + * exception. If we have saved bytes that did not really get + * flushed and those bytes came from a translation of a newline as + * the last thing taken from the src array, then needNlFlush needs + * to remain set to flag that the next buffer still needs a + * newline flush. + */ if (needNlFlush && (saved == 0 || src[-1] != '\n')) { needNlFlush = 0; @@ -10006,12 +10006,12 @@ CopyData( * * Results: * The number of bytes actually stored (<= bytesToRead), - * or TCL_INDEX_NONE if there is an error in reading the channel. Use - * Tcl_GetErrno() to retrieve the error code for the error + * or TCL_INDEX_NONE if there is an error in reading the channel. Use + * Tcl_GetErrno() to retrieve the error code for the error * that occurred. * * The number of bytes stored can be less than the number - * requested when + * requested when * - EOF is reached on the channel; or * - the channel is non-blocking, and we've read all we can * without blocking. @@ -10090,7 +10090,7 @@ DoRead( */ while (!bufPtr || /* We got no buffer! OR */ - (!IsBufferFull(bufPtr) && /* Our buffer has room AND */ + (!IsBufferFull(bufPtr) && /* Our buffer has room AND */ ((Tcl_Size) BytesLeft(bufPtr) < bytesToRead))) { /* Not enough bytes in it yet * to fill the dst */ diff --git a/generic/tclIO.h b/generic/tclIO.h index 8823e06..d1f4a0a 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -39,12 +39,12 @@ typedef struct ChannelBuffer { Tcl_Size refCount; /* Current uses count */ Tcl_Size nextAdded; /* The next position into which a character * will be put in the buffer. */ - Tcl_Size nextRemoved; /* Position of next byte to be removed from + Tcl_Size nextRemoved; /* Position of next byte to be removed from * the buffer. */ Tcl_Size bufLength; /* How big is the buffer? */ struct ChannelBuffer *nextPtr; - /* Next buffer in chain. */ - char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real + /* Next buffer in chain. */ + char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real * buffer occupies this space + bufSize-1 * bytes. This must be the last field in the * structure. */ diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 2f3f48e..c7ecb76 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -39,7 +39,7 @@ static Tcl_ThreadDataKey dataKey; */ static Tcl_ExitProc FinalizeIOCmdTSD; -static Tcl_TcpAcceptProc AcceptCallbackProc; +static Tcl_TcpAcceptProc AcceptCallbackProc; static Tcl_ObjCmdProc ChanPendingObjCmd; static Tcl_ObjCmdProc ChanTruncateObjCmd; static void RegisterTcpServerInterpCleanup( diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 2ad6ecf0..0fe9d97 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -1374,8 +1374,8 @@ ReflectSeekWide( *errorCodePtr = EINVAL; curPos = -1; } else { - curPos = Tcl_ChannelWideSeekProc(parent->typePtr)(parent->instanceData, offset, - seekMode, errorCodePtr); + curPos = Tcl_ChannelWideSeekProc(parent->typePtr)(parent->instanceData, offset, + seekMode, errorCodePtr); } if (curPos == -1) { Tcl_SetErrno(*errorCodePtr); diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index c3131cd..3ead628 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -3464,7 +3464,7 @@ Tcl_LoadFile( static void * DivertFindSymbol( - Tcl_Interp *interp, /* The relevant interpreter. */ + Tcl_Interp *interp, /* The relevant interpreter. */ Tcl_LoadHandle loadHandle, /* A handle to the diverted module. */ const char *symbol) /* The name of symbol to resolve. */ { diff --git a/generic/tclInt.h b/generic/tclInt.h index bb6c4d0..c9ff923 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1091,10 +1091,10 @@ typedef struct ActiveInterpTrace { * related flag values. * * TCL_TRACE_ENTER_EXEC - triggers enter/enterstep traces. - * - passed to Tcl_CreateObjTrace to set up + * - passed to Tcl_CreateObjTrace to set up * "enterstep" traces. * TCL_TRACE_LEAVE_EXEC - triggers leave/leavestep traces. - * - passed to Tcl_CreateObjTrace to set up + * - passed to Tcl_CreateObjTrace to set up * "leavestep" traces. */ @@ -1546,15 +1546,15 @@ struct CompileEnv; * be one of the following: * * TCL_OK Compilation completed normally. - * TCL_ERROR Compilation could not be completed. This can be just a - * judgment by the CompileProc that the command is too - * complex to compile effectively, or it can indicate - * that in the current state of the interp, the command - * would raise an error. The bytecode compiler will not - * do any error reporting at compiler time. Error - * reporting is deferred until the actual runtime, - * because by then changes in the interp state may allow - * the command to be successfully evaluated. + * TCL_ERROR Compilation could not be completed. This can be just a + * judgment by the CompileProc that the command is too + * complex to compile effectively, or it can indicate + * that in the current state of the interp, the command + * would raise an error. The bytecode compiler will not + * do any error reporting at compiler time. Error + * reporting is deferred until the actual runtime, + * because by then changes in the interp state may allow + * the command to be successfully evaluated. */ typedef int (CompileProc)(Tcl_Interp *interp, Tcl_Parse *parsePtr, @@ -2924,7 +2924,7 @@ typedef struct ProcessGlobalValue { Tcl_Encoding encoding; /* system encoding when global string was * initialized. */ TclInitProcessGlobalValueProc *proc; - /* A procedure to initialize the global string + /* A procedure to initialize the global string * copy when a "get" request comes in before * any "set" request has been received. */ Tcl_Mutex mutex; /* Enforce orderly access from multiple @@ -3486,7 +3486,7 @@ MODULE_SCOPE void TclParseInit(Tcl_Interp *interp, const char *string, MODULE_SCOPE Tcl_Size TclParseAllWhiteSpace(const char *src, Tcl_Size numBytes); MODULE_SCOPE int TclProcessReturn(Tcl_Interp *interp, int code, int level, Tcl_Obj *returnOpts); -MODULE_SCOPE void TclUndoRefCount(Tcl_Obj *objPtr); +MODULE_SCOPE void TclUndoRefCount(Tcl_Obj *objPtr); MODULE_SCOPE int TclpObjLstat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf); MODULE_SCOPE Tcl_Obj * TclpTempFileName(void); MODULE_SCOPE Tcl_Obj * TclpTempFileNameForLibrary(Tcl_Interp *interp, diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 20e85dd..2ffaf87 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -1668,7 +1668,7 @@ Tcl_ListObjGetElements( return TclObjTypeGetElements(interp, objPtr, objcPtr, objvPtr); } if (TclListObjGetRep(interp, objPtr, &listRep) != TCL_OK) { - return TCL_ERROR; + return TCL_ERROR; } ListRepElements(&listRep, *objcPtr, *objvPtr); return TCL_OK; @@ -1730,8 +1730,8 @@ Tcl_ListObjAppendList( * the passed Tcl_Obj is not a list object, it will be converted to one * and an error raised if the conversion fails. * - * The Tcl_Obj must not be shared though the internal representation - * may be. + * The Tcl_Obj must not be shared though the internal representation + * may be. * * Results: * On success, TCL_OK is returned with the specified elements appended. @@ -1918,27 +1918,23 @@ Tcl_ListObjAppendElement( * * Tcl_ListObjIndex -- * - * Retrieve a pointer to the element of 'listPtr' at 'index'. The index - * of the first element is 0. - * - * Value - * - * TCL_OK + * Retrieve a pointer to the element of 'listPtr' at 'index'. The index + * of the first element is 0. * + * Returns: + * TCL_OK * A pointer to the element at 'index' is stored in 'objPtrPtr'. If * 'index' is out of range, NULL is stored in 'objPtrPtr'. This * object should be treated as readonly and its 'refCount' is _not_ * incremented. The caller must do that if it holds on to the * reference. * - * TCL_ERROR - * - * 'listPtr' is not a valid list. An error message is left in the - * interpreter's result if 'interp' is not NULL. - * - * Effect + * TCL_ERROR + * 'listPtr' is not a valid list. An error message is left in the + * interpreter's result if 'interp' is not NULL. * - * If 'listPtr' is not already of type 'tclListType', it is converted. + * Effect: + * If 'listPtr' is not already of type 'tclListType', it is converted. * *---------------------------------------------------------------------- */ diff --git a/generic/tclProc.c b/generic/tclProc.c index 8e752ed..17f3c06 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1635,7 +1635,7 @@ static int NRInterpProc( void *clientData, /* Record describing procedure to be * interpreted. */ - Tcl_Interp *interp, /* Interpreter in which procedure was + Tcl_Interp *interp, /* Interpreter in which procedure was * invoked. */ int objc, /* Count of number of arguments to this * procedure. */ diff --git a/generic/tclResult.c b/generic/tclResult.c index f205b47..2baa32c 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -760,7 +760,7 @@ TclProcessReturn( Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, valueObjc, valueObjv); - } + } Tcl_DictObjGet(NULL, iPtr->returnOpts, keys[KEY_ERRORCODE], &valuePtr); if (valuePtr != NULL) { diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 59decd9..f6e0e3c 100644 --- a/generic/tclStrToD.c +++ b/generic/tclStrToD.c @@ -124,7 +124,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); * Definitions of the parts of an IEEE754-format floating point number. */ -#define SIGN_BIT 0x80000000 +#define SIGN_BIT 0x80000000 /* Mask for the sign bit in the first word of * a double. */ #define EXP_MASK 0x7FF00000 @@ -308,7 +308,7 @@ static double MakeNaN(int signum, Tcl_WideUInt tag); static double RefineApproximation(double approx, mp_int *exactSignificand, int exponent); static mp_err MulPow5(mp_int *, unsigned, mp_int *) MP_WUR; -static int NormalizeRightward(Tcl_WideUInt *); +static int NormalizeRightward(Tcl_WideUInt *); static int RequiredPrecision(Tcl_WideUInt); static void DoubleToExpAndSig(double, Tcl_WideUInt *, int *, int *); @@ -2209,7 +2209,7 @@ RefineApproximation( static inline mp_err MulPow5( - mp_int *base, /* Number to multiply. */ + mp_int *base, /* Number to multiply. */ unsigned n, /* Power of 5 to multiply by. */ mp_int *result) /* Place to store the result. */ { @@ -2706,7 +2706,7 @@ SetPrecisionLimits( static inline char * BumpUp( - char *s, /* Cursor pointing one past the end of the + char *s, /* Cursor pointing one past the end of the * string. */ char *retval, /* Start of the string of digits. */ int *kPtr) /* Position of the decimal point. */ @@ -4154,7 +4154,7 @@ StrictBignumConversion( } err = mp_mul_2d(&b, b2, &b); if (err == MP_OKAY) { - err = mp_init_set(&S, 1); + err = mp_init_set(&S, 1); } if (err == MP_OKAY) { err = MulPow5(&S, s5, &S); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5793f65..8b6b719 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -1,24 +1,24 @@ /* * tclStringObj.c -- * - * This file contains functions that implement string operations on Tcl - * objects. Some string operations work with UTF-8 encoding forms. - * Functions that require knowledge of the width of each character, - * such as indexing, operate on fixed width encoding forms such as UTF-32. + * This file contains functions that implement string operations on Tcl + * objects. Some string operations work with UTF-8 encoding forms. + * Functions that require knowledge of the width of each character, + * such as indexing, operate on fixed width encoding forms such as UTF-32. * - * Conceptually, a string is a sequence of Unicode code points. Internally - * it may be stored in an encoding form such as a modified version of - * UTF-8 or UTF-32. + * Conceptually, a string is a sequence of Unicode code points. Internally + * it may be stored in an encoding form such as a modified version of + * UTF-8 or UTF-32. * * The String object is optimized for the case where each UTF char * in a string is only one byte. In this case, we store the value of * numChars, but we don't store the fixed form encoding (unless - * Tcl_GetUnicode is explicitly called). + * Tcl_GetUnicode is explicitly called). * - * The String object type stores one or both formats. The default - * behavior is to store UTF-8. Once UTF-16/UTF32 is calculated, it is - * stored in the internal rep for future access (without an additional - * O(n) cost). + * The String object type stores one or both formats. The default + * behavior is to store UTF-8. Once UTF-16/UTF32 is calculated, it is + * stored in the internal rep for future access (without an additional + * O(n) cost). * * To allow many appends to be done to an object without constantly * reallocating space, we allocate double the space and use the @@ -1322,7 +1322,7 @@ Tcl_AppendUnicodeToObj( const Tcl_UniChar *unicode, /* The Unicode string to append to the * object. */ Tcl_Size length) /* Number of chars in Unicode. Negative - * lengths means nul terminated */ + * lengths means nul terminated */ { String *stringPtr; @@ -2161,7 +2161,7 @@ Tcl_AppendFormatToObj( goto error; } if ((unsigned)code > 0x10FFFF) { - code = 0xFFFD; + code = 0xFFFD; } length = Tcl_UniCharToUtf(code, buf); segment = Tcl_NewStringObj(buf, length); @@ -2989,11 +2989,11 @@ TclGetStringStorage( * Performs the [string repeat] function. * * Results: - * A (Tcl_Obj *) pointing to the result value, or NULL in case of an - * error. + * A (Tcl_Obj *) pointing to the result value, or NULL in case of an + * error. * * Side effects: - * On error, when interp is not NULL, error information is left in it. + * On error, when interp is not NULL, error information is left in it. * *--------------------------------------------------------------------------- */ @@ -3016,8 +3016,8 @@ TclStringRepeat( /* * Analyze to determine what representation result should be. * GOALS: Avoid shimmering & string rep generation. - * Produce pure bytearray when possible. - * Error on overflow. + * Produce pure bytearray when possible. + * Error on overflow. */ if (!binary) { @@ -3144,11 +3144,11 @@ TclStringRepeat( * Performs the [string cat] function. * * Results: - * A (Tcl_Obj *) pointing to the result value, or NULL in case of an - * error. + * A (Tcl_Obj *) pointing to the result value, or NULL in case of an + * error. * * Side effects: - * On error, when interp is not NULL, error information is left in it. + * On error, when interp is not NULL, error information is left in it. * *--------------------------------------------------------------------------- */ @@ -3182,8 +3182,8 @@ TclStringCat( /* * Analyze to determine what representation result should be. * GOALS: Avoid shimmering & string rep generation. - * Produce pure bytearray when possible. - * Error on overflow. + * Produce pure bytearray when possible. + * Error on overflow. */ ov = objv, oc = objc; @@ -3200,10 +3200,10 @@ TclStringCat( * create a pure bytearray. */ - binary = 0; - if (ov > objv+1 && ISCONTINUATION(TclGetString(objPtr))) { - forceUniChar = 1; - } else if ((objPtr->typePtr) && TclHasInternalRep(objPtr, &tclStringType)) { + binary = 0; + if (ov > objv+1 && ISCONTINUATION(TclGetString(objPtr))) { + forceUniChar = 1; + } else if ((objPtr->typePtr) && TclHasInternalRep(objPtr, &tclStringType)) { /* Prevent shimmer of non-string types. */ allowUniChar = 0; } @@ -3302,11 +3302,11 @@ TclStringCat( } while (--oc && (length == 0) && (pendingPtr == NULL)); /* - * Either we found a possibly non-empty value, and we remember - * this index as the first and last such value so far seen, + * Either we found a possibly non-empty value, and we remember + * this index as the first and last such value so far seen, * or (oc == 0) and all values are known empty, - * so first = last = objc - 1 signals the right quick return. - */ + * so first = last = objc - 1 signals the right quick return. + */ first = last = objc - oc - 1; @@ -3417,7 +3417,7 @@ TclStringCat( if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %" + "concatenation failed: unable to alloc %" TCL_Z_MODIFIER "u bytes", STRING_SIZE(length))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); @@ -3434,7 +3434,7 @@ TclStringCat( Tcl_DecrRefCount(objResultPtr); if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %" + "concatenation failed: unable to alloc %" TCL_Z_MODIFIER "u bytes", STRING_SIZE(length))); Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); @@ -3466,7 +3466,7 @@ TclStringCat( if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", + "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", length)); Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); } @@ -3481,7 +3481,7 @@ TclStringCat( Tcl_DecrRefCount(objResultPtr); if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", + "concatenation failed: unable to alloc %" TCL_SIZE_MODIFIER "d bytes", length)); Tcl_SetErrorCode(interp, "TCL", "MEMORY", (char *)NULL); } @@ -3957,10 +3957,10 @@ TclStringLast( if (ln == 0) { /* - * We don't find empty substrings. Bizarre! + * We don't find empty substrings. Bizarre! * - * TODO: When we one day make this a true substring - * finder, change this to "return last", after limitation. + * TODO: When we one day make this a true substring + * finder, change this to "return last", after limitation. */ goto lastEnd; } diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 03ea8b6..a0cb936 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -206,13 +206,11 @@ Invalid( Tcl_Size Tcl_UniCharToUtf( - int ch, /* The Tcl_UniChar to be stored in the - * buffer. Can be or'ed with flag TCL_COMBINE. - */ - char *buf) /* Buffer in which the UTF-8 representation of - * ch is stored. Must be large enough to hold the UTF-8 - * character (at most 4 bytes). - */ + int ch, /* The Tcl_UniChar to be stored in the buffer. + * Can be or'ed with flag TCL_COMBINE. */ + char *buf) /* Buffer in which the UTF-8 representation of + * ch is stored. Must be large enough to hold + * the UTF-8 character (at most 4 bytes). */ { int flags = ch; @@ -309,9 +307,9 @@ three: char * Tcl_UniCharToUtfDString( - const int *uniStr, /* Unicode string to convert to UTF-8. */ + const int *uniStr, /* Unicode string to convert to UTF-8. */ Tcl_Size uniLength, /* Length of Unicode string. Negative for nul - * terminated string */ + * terminated string */ Tcl_DString *dsPtr) /* UTF-8 representation of string is appended * to this previously initialized DString. */ { @@ -440,9 +438,9 @@ static const unsigned short cp1252[32] = { Tcl_Size Tcl_UtfToUniChar( - const char *src, /* The UTF-8 string. */ - int *chPtr)/* Filled with the Unicode character represented by - * the UTF-8 string. */ + const char *src, /* The UTF-8 string. */ + int *chPtr) /* Filled with the Unicode character + * represented by the UTF-8 string. */ { int byte; diff --git a/generic/tclUtil.c b/generic/tclUtil.c index c2fa64f..e82eea2 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -158,7 +158,7 @@ TclLengthOne( * \u000A \n NEWLINE * \u000B \v VERTICAL TAB * \u000C \f FORM FEED - * \u000D \r CARRIAGE RETURN + * \u000D \r CARRIAGE RETURN * \u0020 SPACE * * NOTE: differences between this and other places where Tcl defines a role @@ -276,7 +276,7 @@ TclLengthOne( * * The command terminating character, * \u003b ; SEMICOLON * must be BRACEd, QUOTEd, or escaped so that it does not terminate the - * command prematurely. + * command prematurely. * * Any of the characters that begin substitutions in scripts, * \u0024 $ DOLLAR * \u005b [ OPEN BRACKET @@ -1672,7 +1672,7 @@ TclTrimRight( pp = Tcl_UtfPrev(p, bytes); do { pp += pInc; - pInc = TclUtfToUniChar(pp, &ch1); + pInc = TclUtfToUniChar(pp, &ch1); } while (pp + pInc < p); /* @@ -1881,7 +1881,7 @@ Tcl_Concat( for (i = 0; i < argc; i++) { bytesNeeded += strlen(argv[i]); - if (bytesNeeded < 0) { + if (bytesNeeded < 0) { Tcl_Panic("Tcl_Concat: max size of Tcl value exceeded"); } } @@ -3413,19 +3413,19 @@ GetWideForIndex( * list. * * Results: - * TCL_OK + * TCL_OK * - * The index is stored at the address given by by 'indexPtr'. + * The index is stored at the address given by by 'indexPtr'. * - * TCL_ERROR + * TCL_ERROR * - * The value of 'objPtr' does not have one of the expected formats. If - * 'interp' is non-NULL, an error message is left in the interpreter's - * result object. + * The value of 'objPtr' does not have one of the expected formats. If + * 'interp' is non-NULL, an error message is left in the interpreter's + * result object. * * Side effects: * - * The internal representation contained within objPtr may shimmer. + * The internal representation contained within objPtr may shimmer. * *---------------------------------------------------------------------- */ diff --git a/generic/tclVar.c b/generic/tclVar.c index 41bfa39..68d467a 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -6572,7 +6572,7 @@ AppendLocals( && (includeLinks || !TclIsVarLink(varPtr))) { varName = TclGetString(*varNamePtr); if ((pattern == NULL) || Tcl_StringMatch(varName, pattern)) { - if (!justConstants || TclIsVarConstant(varPtr)) { + if (!justConstants || TclIsVarConstant(varPtr)) { Tcl_ListObjAppendElement(interp, listPtr, *varNamePtr); } if (includeLinks) { @@ -6626,7 +6626,7 @@ AppendLocals( objNamePtr = VarHashGetKey(varPtr); varName = TclGetString(objNamePtr); if ((pattern == NULL) || Tcl_StringMatch(varName, pattern)) { - if (!justConstants || TclIsVarConstant(varPtr)) { + if (!justConstants || TclIsVarConstant(varPtr)) { Tcl_ListObjAppendElement(interp, listPtr, objNamePtr); } if (includeLinks) { diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index f09030a..b41126e 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -217,9 +217,9 @@ typedef struct ZipEntry { ZipFile *zipFilePtr; /* The ZIP file holding this virtual file */ size_t offset; /* Data offset into memory mapped ZIP file */ int numBytes; /* Uncompressed size of the virtual file. - * -1 for zip64 */ + * -1 for zip64 */ int numCompressedBytes; /* Compressed size of the virtual file. - * -1 for zip64 */ + * -1 for zip64 */ int compressMethod; /* Compress method */ int isDirectory; /* 0 if file, 1 if directory, -1 if root */ int depth; /* Number of slashes in path. */ @@ -258,7 +258,7 @@ typedef struct ZipChannel { Tcl_Size cursor; /* Seek position for next read or write*/ unsigned char *ubuf; /* Pointer to the uncompressed data */ unsigned char *ubufToFree; /* NULL if ubuf points to memory that does not - need freeing. Else memory to free (ubuf + need freeing. Else memory to free (ubuf may point *inside* the block) */ Tcl_Size ubufSize; /* Size of allocated ubufToFree */ int iscompr; /* True if data is compressed */ diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 0c11bb4..f3a2623 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3111,7 +3111,7 @@ ZlibTransformInput( gotBytes = 0; readBytes = chanDataPtr->inStream.avail_in; /* how many bytes in buffer now */ while (!HaveFlag(chanDataPtr, STREAM_DONE) && toRead > 0) { - unsigned int n; + unsigned int n; int decBytes; /* if starting from scratch or continuation after full decompression */ diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index d8af241..f7a2324 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -1683,7 +1683,7 @@ Tcl_Sleep( SInt32 runLoopStatus; waitTime = vdelay.sec + 1.0e-6 * vdelay.usec; - now = CFAbsoluteTimeGetCurrent(); + now = CFAbsoluteTimeGetCurrent(); waitEnd = now + waitTime; if (runLoopTimer) { @@ -1713,7 +1713,7 @@ Tcl_Sleep( } } while (waitTime > 0); tsdPtr->sleeping = 0; - if (runLoopTimer) { + if (runLoopTimer) { CFRunLoopTimerSetNextFireDate(runLoopTimer, nextTimerFire); } } else { diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 2a1733a..8cb9166 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -263,7 +263,7 @@ PlatformEventsControl( * None. * * Side effects: - * While tsdPtr->notifierMutex is held: + * While tsdPtr->notifierMutex is held: * - The per-thread eventfd(2) is closed, if non-zero, and set to -1. * - The per-thread epoll(7) fd is closed, if non-zero, and set to 0. * - The per-thread epoll_event structs are freed, if any, and set to 0. diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c index ba49842..a99f7bd 100644 --- a/unix/tclKqueueNotfy.c +++ b/unix/tclKqueueNotfy.c @@ -261,7 +261,7 @@ PlatformEventsControl( * None. * * Side effects: - * While tsdPtr->notifierMutex is held: + * While tsdPtr->notifierMutex is held: * The per-thread pipe(2) fds are closed, if non-zero, and set to -1. * The per-thread kqueue(2) fd is closed, if non-zero, and set to 0. * The per-thread kevent structs are freed, if any, and set to 0. diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 23565c5..07bbc16 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -88,14 +88,14 @@ TclpDlopen( * Use (RTLD_NOW|RTLD_LOCAL) as default, see [Bug #3216070] */ if (flags & TCL_LOAD_GLOBAL) { - dlopenflags |= RTLD_GLOBAL; + dlopenflags |= RTLD_GLOBAL; } else { - dlopenflags |= RTLD_LOCAL; + dlopenflags |= RTLD_LOCAL; } if (flags & TCL_LOAD_LAZY) { - dlopenflags |= RTLD_LAZY; + dlopenflags |= RTLD_LAZY; } else { - dlopenflags |= RTLD_NOW; + dlopenflags |= RTLD_NOW; } handle = dlopen(native, dlopenflags); if (handle == NULL) { diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c index 54290ec..5b1062e 100644 --- a/unix/tclLoadDyld.c +++ b/unix/tclLoadDyld.c @@ -197,14 +197,14 @@ TclpDlopen( */ if (flags & TCL_LOAD_GLOBAL) { - dlopenflags |= RTLD_GLOBAL; + dlopenflags |= RTLD_GLOBAL; } else { - dlopenflags |= RTLD_LOCAL; + dlopenflags |= RTLD_LOCAL; } if (flags & TCL_LOAD_LAZY) { - dlopenflags |= RTLD_LAZY; + dlopenflags |= RTLD_LAZY; } else { - dlopenflags |= RTLD_NOW; + dlopenflags |= RTLD_NOW; } dlHandle = dlopen(nativePath, dlopenflags); if (!dlHandle) { diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index b65cdb1..fab9c32 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -809,7 +809,7 @@ TclpObjCopyDirectory( * EEXIST: path is a non-empty directory. * EINVAL: path is a root directory. * ENOENT: path doesn't exist or is "". - * ENOTDIR: path is not a directory. + * ENOTDIR: path is not a directory. * * Side effects: * Directory removed. If an error occurs, the error will be returned @@ -953,12 +953,12 @@ TraverseUnixTree( * filled with UTF-8 name of file causing * error. */ int doRewind) /* Flag indicating that to ensure complete - * traversal of source hierarchy, the readdir - * loop should be rewound whenever - * traverseProc has returned TCL_OK; this is - * required when traverseProc modifies the - * source hierarchy, e.g. by deleting - * files. */ + * traversal of source hierarchy, the readdir + * loop should be rewound whenever + * traverseProc has returned TCL_OK; this is + * required when traverseProc modifies the + * source hierarchy, e.g. by deleting + * files. */ { Tcl_StatBuf statBuf; const char *source, *errfile; diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 984ee2f..8ffea58 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -360,12 +360,12 @@ AlertSingleThread( */ if (tsdPtr->prevPtr) { - tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; + tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr; } else { - waitingListPtr = tsdPtr->nextPtr; + waitingListPtr = tsdPtr->nextPtr; } if (tsdPtr->nextPtr) { - tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; + tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr; } tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; tsdPtr->onList = 0; diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 78ed008..11193b7 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -204,8 +204,8 @@ printaddrinfo( * * InitializeHostName -- * - * This routine sets the process global value of the name of the local - * host on which the process is running. + * This routine sets the process global value of the name of the local + * host on which the process is running. * * Results: * None. @@ -400,8 +400,8 @@ TcpBlockModeProc( * return any error code. * * Results: - * 0 if the connection has completed, -1 if still in progress or there is - * an error. + * 0 if the connection has completed, -1 if still in progress or there is + * an error. * * Side effects: * Processes socket events off the system queue. May process @@ -1183,7 +1183,7 @@ TcpWatchProc( * from interfering with the -accept behavior (bug #3394732). */ - return; + return; } if (GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) { diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 20b9a67..29146aa 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -246,7 +246,7 @@ TclpWideClicksToNanoseconds( * and back. * * Results: - * 1 click in microseconds as double. + * 1 click in microseconds as double. * * Side effects: * None. diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 8b289b1..d7be807 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -176,7 +176,7 @@ typedef struct ConsoleHandleInfo { * is queued and dropped on receipt. */ typedef struct ConsoleChannelInfo { - HANDLE handle; /* Console handle */ + HANDLE handle; /* Console handle */ Tcl_ThreadId threadId; /* Id of owning thread */ struct ConsoleChannelInfo *nextWatchingChannelPtr; /* Pointer to next channel watching events. */ diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index dbf3324..c4b60b9 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1462,7 +1462,7 @@ QuoteCmdLineBackslash( Tcl_DStringAppend(dsPtr, start, (int) (current - start)); } } else { - if (bspos > start) { /* part before first backslash */ + if (bspos > start) { /* part before first backslash */ Tcl_DStringAppend(dsPtr, start, (int) (bspos - start)); } while (bspos++ < current) { /* each backslash twice */ @@ -1505,7 +1505,7 @@ QuoteCmdLinePart( TclDStringAppendLiteral(dsPtr, "\""); /* opening escape quote-char */ do { - *bspos = NULL; + *bspos = NULL; special++; if (*special == '\\') { /* @@ -1810,7 +1810,7 @@ TclpCreateCommandChannel( SetThreadPriority(infoPtr->readThread, THREAD_PRIORITY_HIGHEST); infoPtr->validMask |= TCL_READABLE; } else { - infoPtr->readTI = NULL; + infoPtr->readTI = NULL; infoPtr->readThread = 0; } if (writeFile != NULL) { @@ -1825,8 +1825,8 @@ TclpCreateCommandChannel( SetThreadPriority(infoPtr->writeThread, THREAD_PRIORITY_HIGHEST); infoPtr->validMask |= TCL_WRITABLE; } else { - infoPtr->writeTI = NULL; - infoPtr->writeThread = 0; + infoPtr->writeTI = NULL; + infoPtr->writeThread = 0; } /* @@ -3397,10 +3397,10 @@ TclPipeThreadWaitForSignal( if (state != PTI_STATE_STOP) { *pipeTIPtr = NULL; } else { - pipeTI->evWakeUp = NULL; + pipeTI->evWakeUp = NULL; } if (wakeEvent) { - SetEvent(wakeEvent); + SetEvent(wakeEvent); } return 0; } diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 8ab4548..0f22138 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -114,7 +114,7 @@ typedef DWORD_PTR * PDWORD_PTR; */ #ifndef ENOTEMPTY -# define ENOTEMPTY 41 /* Directory not empty */ +# define ENOTEMPTY 41 /* Directory not empty */ #endif #ifndef EREMOTE # define EREMOTE 66 /* The object is remote */ diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index e27937e..2ce432c 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -620,7 +620,7 @@ SerialCloseProc( serialPtr->validMask &= ~TCL_READABLE; if (serialPtr->writeThread) { - TclPipeThreadStop(&serialPtr->writeTI, serialPtr->writeThread); + TclPipeThreadStop(&serialPtr->writeTI, serialPtr->writeThread); CloseHandle(serialPtr->osWrite.hEvent); CloseHandle(serialPtr->evWritable); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index c05f550..5239cd3 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -618,8 +618,8 @@ TcpBlockModeProc( * return any error code. * * Results: - * 0 if the connection has completed, -1 if still in progress or there is - * an error. + * 0 if the connection has completed, -1 if still in progress or there is + * an error. * * Side effects: * Processes socket events off the system queue. May process diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 5636dc0..8cc4489 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -35,7 +35,7 @@ typedef struct { HANDLE readyEvent; /* System event used to trigger the requesting * thread when the clock calibration procedure * is initialized for the first time. */ - HANDLE exitEvent; /* Event to signal out of an exit handler to + HANDLE exitEvent; /* Event to signal out of an exit handler to * tell the calibration loop to terminate. */ LARGE_INTEGER nominalFreq; /* Nominal frequency of the system performance * counter, that is, the value returned from @@ -109,7 +109,7 @@ static struct { static void StopCalibration(void *clientData); static DWORD WINAPI CalibrationThread(LPVOID arg); -static void UpdateTimeEachSecond(void); +static void UpdateTimeEachSecond(void); static void ResetCounterSamples(unsigned long long fileTime, long long perfCounter, long long perfFreq); static long long AccumulateSample(long long perfCounter, @@ -278,7 +278,7 @@ TclpGetWideClicks(void) wideClick.microsecsScale = 1; return TclpGetMicroseconds(); } else { - return TclpGetMicroseconds(); + return TclpGetMicroseconds(); } } @@ -292,7 +292,7 @@ TclpGetWideClicks(void) * and back. * * Results: - * 1 click in microseconds as double. + * 1 click in microseconds as double. * * Side effects: * None. @@ -304,7 +304,7 @@ double TclpWideClickInMicrosec(void) { if (!wideClick.initialized) { - (void) TclpGetWideClicks(); /* initialize */ + (void) TclpGetWideClicks(); /* initialize */ } return wideClick.microsecsScale; } @@ -870,7 +870,7 @@ UpdateTimeEachSecond(void) if (curFileTime.QuadPart > lastFileTime.QuadPart && curFileTime.QuadPart < lastFileTime.QuadPart + (timeInfo.calibrationInterv * 10000000)) { - /* + /* * Look again in next one second. */ @@ -940,13 +940,13 @@ UpdateTimeEachSecond(void) tdiff = vt0 - curFileTime.QuadPart; if (tdiff > 10000000 || tdiff < -10000000) { - /* + /* * Jump to current system time, use curent estimated frequency. */ - vt0 = curFileTime.QuadPart; + vt0 = curFileTime.QuadPart; } else { - /* + /* * Calculate new frequency and estimate drift to the next second. */ @@ -1015,11 +1015,11 @@ UpdateTimeEachSecond(void) vt1 = vt0 - curFileTime.QuadPart; if (vt1 > 10000000 || vt1 < -10000000) { - /* + /* * Larger jump resp. shift relative new file-time. */ - vt0 = curFileTime.QuadPart; + vt0 = curFileTime.QuadPart; } } } |