From 6b52ee1bdfb4dfb606d27e01ec30e6ac491f3a67 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 4 Sep 2025 08:24:38 +0000 Subject: Minor indent fixes --- generic/tcl.decls | 12 ++++++------ generic/tclCmdIL.c | 12 ++++++------ generic/tclCmdMZ.c | 8 +++----- generic/tclCompile.h | 2 +- generic/tclDictObj.c | 2 +- generic/tclEncoding.c | 28 ++++++++++++++-------------- generic/tclExecute.c | 2 +- generic/tclIO.c | 10 +++++----- generic/tclIOUtil.c | 17 ++++++++--------- generic/tclIcu.c | 4 ++-- generic/tclInt.decls | 6 +++--- generic/tclInt.h | 2 +- generic/tclListObj.c | 2 +- generic/tclNamesp.c | 2 +- generic/tclPosixStr.c | 6 +++--- generic/tclProcess.c | 2 +- generic/tclStringObj.c | 2 +- generic/tclTest.c | 35 +++++++++++++++++------------------ generic/tclVar.c | 4 ++-- win/tclWinChan.c | 2 +- win/tclWinFile.c | 2 +- 21 files changed, 79 insertions(+), 83 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 066f822..5e0dd80 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1115,10 +1115,10 @@ declare 365 { char *Tcl_GetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr) } declare 366 { - int Tcl_Chdir(const char *dirName) + int Tcl_Chdir(const char *dirName) } declare 367 { - int Tcl_Access(const char *path, int mode) + int Tcl_Access(const char *path, int mode) } declare 368 { int Tcl_Stat(const char *path, struct stat *bufPtr) @@ -2086,12 +2086,12 @@ declare 626 { # TIP #357 (Export TclLoadFile and TclpFindSymbol) kbk declare 627 { int Tcl_LoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr, - const char *const symv[], int flags, void *procPtrs, - Tcl_LoadHandle *handlePtr) + const char *const symv[], int flags, void *procPtrs, + Tcl_LoadHandle *handlePtr) } declare 628 { void *Tcl_FindSymbol(Tcl_Interp *interp, Tcl_LoadHandle handle, - const char *symbol) + const char *symbol) } declare 629 { int Tcl_FSUnloadFile(Tcl_Interp *interp, Tcl_LoadHandle handlePtr) @@ -2336,7 +2336,7 @@ declare 682 { # TIP 643 declare 683 { - Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding) + Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding) } # TIP #650 diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 5e732c5..10de1e3 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -106,7 +106,7 @@ typedef enum { LSEQ_DOTS, LSEQ_TO, LSEQ_COUNT, LSEQ_BY } SequenceOperators; typedef enum { - NoneArg, NumericArg, RangeKeywordArg, ErrArg, LastArg = 8 + NoneArg, NumericArg, RangeKeywordArg, ErrArg, LastArg = 8 } SequenceDecoded; /* @@ -3882,11 +3882,11 @@ Tcl_LsearchObjCmd( static SequenceDecoded SequenceIdentifyArgument( - Tcl_Interp *interp, /* for error reporting */ - Tcl_Obj *argPtr, /* Argument to decode */ - int allowedArgs, /* Flags if keyword or numeric allowed. */ - Tcl_Obj **numValuePtr, /* Return numeric value */ - int *keywordIndexPtr) /* Return keyword enum */ + Tcl_Interp *interp, /* for error reporting */ + Tcl_Obj *argPtr, /* Argument to decode */ + int allowedArgs, /* Flags if keyword or numeric allowed. */ + Tcl_Obj **numValuePtr, /* Return numeric value */ + int *keywordIndexPtr) /* Return keyword enum */ { int result = TCL_ERROR; SequenceOperators opmode; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index dd51a39..449886d 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -5439,11 +5439,9 @@ TclUnicodeNormalizeCmd( } else if (!strcmp(s, "strict")) { profile = TCL_ENCODING_PROFILE_STRICT; } else { - Tcl_SetObjResult(interp, - Tcl_ObjPrintf("Invalid value \"%s\" supplied for option " - "\"-profile\". Must be " - "\"strict\" or \"replace\".", - s)); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "Invalid value \"%s\" supplied for option \"-profile\". " + "Must be \"strict\" or \"replace\".", s)); return TCL_ERROR; } } else if (objc != 2) { diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 7f2596a..7843375 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -2059,7 +2059,7 @@ typedef Tcl_Size Tcl_BytecodeLabel; * Shorthand macros for instruction issuing. */ - // Measure the length of a string literal. +// Measure the length of a string literal. #define LENGTH_OF(str) \ ((Tcl_Size) sizeof(str "") - 1) diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 03e286a..44e4a2b 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -3231,7 +3231,7 @@ DictFilterCmd( return TCL_ERROR; } if (Tcl_GetIndexFromObj(interp, objv[2], filters, "filterType", - 0, &index) != TCL_OK) { + 0, &index) != TCL_OK) { return TCL_ERROR; } diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 4e44745..65f7150 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -4736,13 +4736,13 @@ TclUtfNormalize( */ int Tcl_UtfToNormalizedDString( - Tcl_Interp *interp, /* Used for error messages. May be NULL */ - const char *bytes, /* Operand encoded in Tcl internal UTF8 */ - Tcl_Size numBytes, /* Length of bytes[], or -1 if NUL terminated */ + Tcl_Interp *interp, /* Used for error messages. May be NULL */ + const char *bytes, /* Operand encoded in Tcl internal UTF8 */ + Tcl_Size numBytes, /* Length of bytes[], or -1 if NUL terminated */ Tcl_UnicodeNormalizationForm normForm, /* TCL_{NFC,NFD,NFKC,NFKC} */ - int profile, /* TCL_ENCODING_PROFILE_{STRICT,REPLACE} */ - Tcl_DString *dsPtr) /* Converted output string in Tcl internal - UTF8 encoding. Init'ed by function */ + int profile, /* TCL_ENCODING_PROFILE_{STRICT,REPLACE} */ + Tcl_DString *dsPtr) /* Converted output string in Tcl internal + * UTF8 encoding. Init'ed by function */ { Tcl_DStringInit(dsPtr); Tcl_Encoding encoding = Tcl_GetEncoding(interp, "utf-8"); @@ -4783,15 +4783,15 @@ Tcl_UtfToNormalizedDString( */ int Tcl_UtfToNormalized( - Tcl_Interp *interp, /* Used for error messages. May be NULL */ - const char *bytes, /* Operand encoded in Tcl internal UTF8 */ - Tcl_Size numBytes, /* Length of bytes[], or -1 if NUL terminated */ + Tcl_Interp *interp, /* Used for error messages. May be NULL */ + const char *bytes, /* Operand encoded in Tcl internal UTF8 */ + Tcl_Size numBytes, /* Length of bytes[], or -1 if NUL terminated */ Tcl_UnicodeNormalizationForm normForm, /* TCL_{NFC,NFD,NFKC,NFKC} */ - int profile, /* TCL_ENCODING_PROFILE_{STRICT,REPLACE} */ - char *bufPtr, /* Pointer to output buffer. Must not be NULL. */ - Tcl_Size bufLen, /* Size of bufPtr storage. */ - Tcl_Size *lengthPtr) /* Length of the output string in bytes excluding - the trailing NUL byte. May be NULL */ + int profile, /* TCL_ENCODING_PROFILE_{STRICT,REPLACE} */ + char *bufPtr, /* Pointer to output buffer. Must not be NULL. */ + Tcl_Size bufLen, /* Size of bufPtr storage. */ + Tcl_Size *lengthPtr) /* Length of the output string in bytes excluding + * the trailing NUL byte. May be NULL */ { Tcl_Encoding encoding = Tcl_GetEncoding(interp, "utf-8"); if (encoding == NULL) { diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 1b675d5..fbba6bb 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -4643,7 +4643,7 @@ TEBCresume( * instr if lookup fails. Lookup by string. */ - case INST_JUMP_TABLE: + case INST_JUMP_TABLE: tblIdx = TclGetInt4AtPtr(pc + 1); JumptableInfo *jtPtr = (JumptableInfo *) codePtr->auxDataArrayPtr[tblIdx].clientData; diff --git a/generic/tclIO.c b/generic/tclIO.c index 41da07c..43ccb0f 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -366,8 +366,8 @@ static const Tcl_ObjType chanObjType = { } while (0) #define BUSY_STATE(st, fl) \ - ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ - (((st)->csPtrW) && ((fl) & TCL_WRITABLE))) + ((((st)->csPtrR) && ((fl) & TCL_READABLE)) || \ + (((st)->csPtrW) && ((fl) & TCL_WRITABLE))) #define MAX_CHANNEL_BUFFER_SIZE (1024*1024) @@ -2450,9 +2450,9 @@ Tcl_GetChannelHandle( int Tcl_RemoveChannelMode( - Tcl_Interp *interp, /* The interp for an error message. Allowed to be NULL. */ - Tcl_Channel chan, /* The channel which is modified. */ - int mode) /* The access mode to drop from the channel */ + Tcl_Interp *interp, /* The interp for an error message. Allowed to be NULL. */ + Tcl_Channel chan, /* The channel which is modified. */ + int mode) /* The access mode to drop from the channel */ { const char* emsg; ChannelState *statePtr = ((Channel *) chan)->state; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index aa3e8d0..83113b4 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -2782,7 +2782,7 @@ Tcl_FSGetCwd( norm = TclFSNormalizeAbsolutePath(interp, retVal); if (norm == NULL) { - /* + /* * 'norm' shouldn't ever be NULL, but we are careful. */ @@ -2793,7 +2793,7 @@ Tcl_FSGetCwd( } else if (norm == tsdPtr->cwdPathPtr) { goto cdEqual; } else { - /* + /* * Determine whether the filesystem's answer is the same as the * cached local value. Since both 'norm' and 'tsdPtr->cwdPathPtr' * are normalized pathnames, do something more efficient than @@ -2899,7 +2899,7 @@ Tcl_FSChdir( retVal = 0; } else { - /* + /* * 'Tcl_SetErrno()' has already been called. */ } @@ -2909,9 +2909,8 @@ Tcl_FSChdir( } if (retVal == 0) { - - /* Assume that the cwd was actually changed to the normalized value - * just calculated, and cache that information. */ + /* Assume that the cwd was actually changed to the normalized value + * just calculated, and cache that information. */ /* * If the filesystem epoch changed recently, the normalized pathname or @@ -3285,9 +3284,9 @@ Tcl_LoadFile( * load further. */ - /* - * Try to delete the file we probably created and then exit. - */ + /* + * Try to delete the file we probably created and then exit. + */ Tcl_FSDeleteFile(copyToPtr); Tcl_DecrRefCount(copyToPtr); diff --git a/generic/tclIcu.c b/generic/tclIcu.c index 0f73875..6e59b29 100644 --- a/generic/tclIcu.c +++ b/generic/tclIcu.c @@ -748,7 +748,7 @@ IcuConverttoDString( Tcl_DStringInit(dsOutPtr); Tcl_DStringSetLength(dsOutPtr, dstCapacity); dstLen = ucnv_fromUChars(ucnvPtr, Tcl_DStringValue(dsOutPtr), (int)dstCapacity, - utf16, (int)utf16len, &status); + utf16, (int)utf16len, &status); if (U_FAILURE(status)) { switch (status) { case U_STRING_NOT_TERMINATED_WARNING: @@ -757,7 +757,7 @@ IcuConverttoDString( Tcl_DStringSetLength(dsOutPtr, (int)dstLen); status = U_ZERO_ERRORZ; /* Reset before call */ dstLen = ucnv_fromUChars(ucnvPtr, Tcl_DStringValue(dsOutPtr), (int)dstLen, - utf16, (int)utf16len, &status); + utf16, (int)utf16len, &status); if (U_SUCCESS(status)) { break; } diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 1fd54b9..db8a664 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -555,7 +555,7 @@ declare 239 { } declare 240 { int TclNRRunCallbacks(Tcl_Interp *interp, int result, - struct NRE_callback *rootPtr) + struct NRE_callback *rootPtr) } declare 241 { int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, @@ -563,7 +563,7 @@ declare 241 { } declare 242 { int TclNREvalObjv(Tcl_Interp *interp, Tcl_Size objc, - Tcl_Obj *const objv[], int flags, Command *cmdPtr) + Tcl_Obj *const objv[], int flags, Command *cmdPtr) } # Tcl_Obj leak detection support. @@ -593,7 +593,7 @@ declare 248 { declare 249 { char *TclDoubleDigits(double dv, int ndigits, int flags, - int *decpt, int *signum, char **endPtr) + int *decpt, int *signum, char **endPtr) } # TIP #285: Script cancellation support. declare 250 { diff --git a/generic/tclInt.h b/generic/tclInt.h index 5e64283..867639b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -917,7 +917,7 @@ typedef struct VarInHash { #define TclIsVarTricky(varPtr,trickyFlags) \ ( ((varPtr)->flags & (VAR_ARRAY|VAR_LINK|trickyFlags)) \ - || (TclIsVarInHash(varPtr) \ + || (TclIsVarInHash(varPtr) \ && (TclVarParentArray(varPtr) != NULL) \ && (TclVarParentArray(varPtr)->flags & (trickyFlags)))) diff --git a/generic/tclListObj.c b/generic/tclListObj.c index 87cc9c5..cb60b00 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -2138,7 +2138,7 @@ Tcl_ListObjReplace( if (numToDelete < 0) { numToDelete = 0; } else if (first > LIST_MAX - numToDelete /* Handle integer overflow */ - || origListLen < first + numToDelete) { + || origListLen < first + numToDelete) { numToDelete = origListLen - first; } diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 79d39e6..195c407 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -4908,7 +4908,7 @@ SetNsNameFromAny( name = TclGetString(objPtr); TclGetNamespaceForQualName(interp, name, NULL, TCL_FIND_ONLY_NS, - &nsPtr, &dummy1Ptr, &dummy2Ptr, &dummy); + &nsPtr, &dummy1Ptr, &dummy2Ptr, &dummy); if ((nsPtr == NULL) || (nsPtr->flags & NS_DYING)) { return TCL_ERROR; diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index a65256d..090fa0e 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -533,7 +533,7 @@ Tcl_ErrnoId(void) const char * Tcl_ErrnoMsg( - int err) /* Error number (such as in errno variable). */ + int err) /* Error number (such as in errno variable). */ { switch (err) { #if defined(E2BIG) && (!defined(EOVERFLOW) || (E2BIG != EOVERFLOW)) @@ -1032,7 +1032,7 @@ Tcl_ErrnoMsg( const char * Tcl_SignalId( - int sig) /* Number of signal. */ + int sig) /* Number of signal. */ { switch (sig) { #ifdef SIGABRT @@ -1170,7 +1170,7 @@ Tcl_SignalId( const char * Tcl_SignalMsg( - int sig) /* Number of signal. */ + int sig) /* Number of signal. */ { switch (sig) { #ifdef SIGABRT diff --git a/generic/tclProcess.c b/generic/tclProcess.c index 9f4b849..c564794 100644 --- a/generic/tclProcess.c +++ b/generic/tclProcess.c @@ -40,7 +40,7 @@ static Tcl_HashTable infoTablePerResolvedPid; static int infoTablesInitialized = 0; /* 0 means not yet initialized. */ TCL_DECLARE_MUTEX(infoTablesMutex) - /* +/* * Prototypes for functions defined later in this file: */ diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index c33860d..ac16760 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -238,7 +238,7 @@ Tcl_NewStringObj( // Redefine the macro #define Tcl_NewStringObj(bytes, len) \ - Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__) + Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__) #else /* if not TCL_MEM_DEBUG */ Tcl_Obj * Tcl_NewStringObj( diff --git a/generic/tclTest.c b/generic/tclTest.c index 6e07593..dc610db 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -2413,8 +2413,8 @@ TestencodingCmd( } Tcl_DString ds; string = (index == ENC_GETNAMEUSER - ? Tcl_GetEncodingNameForUser - : Tcl_GetEncodingNameFromEnvironment)(&ds); + ? Tcl_GetEncodingNameForUser + : Tcl_GetEncodingNameFromEnvironment)(&ds); /* Note not string compare, the actual pointer must be the same */ if (string != Tcl_DStringValue(&ds)) { Tcl_DStringFree(&ds); @@ -4124,8 +4124,8 @@ TestlistapiCmd( else { APPENDSTR(resultType, ""); } - Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj("result", -1)); - Tcl_ListObjAppendElement(NULL, objPtr, resultPtr); + Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj("result", -1)); + Tcl_ListObjAppendElement(NULL, objPtr, resultPtr); } } else { Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj("result", -1)); @@ -6394,8 +6394,7 @@ TestChannelCmd( chan = (Tcl_Channel) NULL; for (nextPtrPtr = &firstDetached, curPtr = firstDetached; curPtr != NULL; - nextPtrPtr = &(curPtr->nextPtr), curPtr = curPtr->nextPtr) { - + nextPtrPtr = &(curPtr->nextPtr), curPtr = curPtr->nextPtr) { if (strcmp(Tcl_GetString(objv[2]), Tcl_GetChannelName(curPtr->chan)) == 0) { *nextPtrPtr = curPtr->nextPtr; curPtr->nextPtr = NULL; @@ -6693,8 +6692,8 @@ TestChannelCmd( return TCL_OK; } for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { Tcl_AppendElement(interp, (char *)Tcl_GetHashKey(hTblPtr, hPtr)); } return TCL_OK; @@ -6731,8 +6730,8 @@ TestChannelCmd( return TCL_OK; } for (hPtr = Tcl_FirstHashEntry(hTblPtr, &hSearch); - hPtr != NULL; - hPtr = Tcl_NextHashEntry(&hSearch)) { + hPtr != NULL; + hPtr = Tcl_NextHashEntry(&hSearch)) { chanPtr = (Channel *)Tcl_GetHashValue(hPtr); statePtr = chanPtr->state; if (statePtr->flags & TCL_READABLE) { @@ -6925,8 +6924,8 @@ TestChannelEventCmd( return TCL_ERROR; } for (i = 0, esPtr = statePtr->scriptRecordPtr; - (i < index) && (esPtr != NULL); - i++, esPtr = esPtr->nextPtr) { + (i < index) && (esPtr != NULL); + i++, esPtr = esPtr->nextPtr) { /* Empty loop body. */ } if (esPtr == NULL) { @@ -6962,8 +6961,8 @@ TestChannelEventCmd( } resultListPtr = Tcl_GetObjResult(interp); for (esPtr = statePtr->scriptRecordPtr; - esPtr != NULL; - esPtr = esPtr->nextPtr) { + esPtr != NULL; + esPtr = esPtr->nextPtr) { if (esPtr->mask) { Tcl_ListObjAppendElement(interp, resultListPtr, Tcl_NewStringObj( (esPtr->mask == TCL_READABLE) ? "readable" : "writable", -1)); @@ -6983,8 +6982,8 @@ TestChannelEventCmd( return TCL_ERROR; } for (esPtr = statePtr->scriptRecordPtr; - esPtr != NULL; - esPtr = nextEsPtr) { + esPtr != NULL; + esPtr = nextEsPtr) { nextEsPtr = esPtr->nextPtr; Tcl_DeleteChannelHandler((Tcl_Channel) chanPtr, TclChannelEventScriptInvoker, esPtr); @@ -7009,8 +7008,8 @@ TestChannelEventCmd( return TCL_ERROR; } for (i = 0, esPtr = statePtr->scriptRecordPtr; - (i < index) && (esPtr != NULL); - i++, esPtr = esPtr->nextPtr) { + (i < index) && (esPtr != NULL); + i++, esPtr = esPtr->nextPtr) { /* Empty loop body. */ } if (esPtr == NULL) { diff --git a/generic/tclVar.c b/generic/tclVar.c index fd740be..a1c67fc 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -4553,8 +4553,8 @@ ObjMakeUpvar( if (index < 0) { if (!(arrayPtr != NULL - ? (TclIsVarInHash(arrayPtr) && TclGetVarNsPtr(arrayPtr)) - : (TclIsVarInHash(otherPtr) && TclGetVarNsPtr(otherPtr))) + ? (TclIsVarInHash(arrayPtr) && TclGetVarNsPtr(arrayPtr)) + : (TclIsVarInHash(otherPtr) && TclGetVarNsPtr(otherPtr))) && ((myFlags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY)) || (varFramePtr == NULL) || !HasLocalVars(varFramePtr) diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 5c06e00..599d6e3 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -1689,7 +1689,7 @@ FileGetType( return type; } - /* +/* *---------------------------------------------------------------------- * * NativeIsComPort -- diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 4c48315..32547ff 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1226,7 +1226,7 @@ WinIsDrive( return 1; } else if ((name[1] == ':') - && (len == 2 || (name[2] == '/' || name[2] == '\\'))) { + && (len == 2 || (name[2] == '/' || name[2] == '\\'))) { /* * Path is of the form 'x:' or 'x:/' or 'x:\' */ -- cgit v0.12