diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2024-03-19 14:56:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2024-03-19 14:56:45 (GMT) |
commit | 16b3adf662893e6db67e82fb1df01063e1315548 (patch) | |
tree | bcfa89065ecea0a374bed505c235b77cba3db0a3 /generic/tclCmdIL.c | |
parent | 7bf9d79d60378e206b741af48b8cf6c55451557e (diff) | |
download | tcl-16b3adf662893e6db67e82fb1df01063e1315548.zip tcl-16b3adf662893e6db67e82fb1df01063e1315548.tar.gz tcl-16b3adf662893e6db67e82fb1df01063e1315548.tar.bz2 |
Fix indentation/brace usage style issues
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r-- | generic/tclCmdIL.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index fec8fcf..4474513 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -2174,9 +2174,8 @@ Tcl_JoinObjCmd( if (TclObjTypeHasProc(objv[1], getElementsProc)) { listLen = TclObjTypeLength(objv[1]); isAbstractList = (listLen ? 1 : 0); - if (listLen > 1 && - TclObjTypeGetElements(interp, objv[1], &listLen, &elemPtrs) - != TCL_OK) { + if (listLen > 1 && TclObjTypeGetElements(interp, objv[1], + &listLen, &elemPtrs) != TCL_OK) { return TCL_ERROR; } } else if (TclListObjGetElements(interp, objv[1], &listLen, @@ -2194,8 +2193,8 @@ Tcl_JoinObjCmd( Tcl_SetObjResult(interp, elemPtrs[0]); } else { Tcl_Obj *elemObj; - if (TclObjTypeIndex(interp, objv[1], 0, &elemObj) - != TCL_OK) { + + if (TclObjTypeIndex(interp, objv[1], 0, &elemObj) != TCL_OK) { return TCL_ERROR; } Tcl_SetObjResult(interp, elemObj); @@ -2289,6 +2288,7 @@ Tcl_LassignObjCmd( objv += 2; for (i = 0; i < objc && i < listObjc; ++i) { Tcl_Obj *elemObj; + if (Tcl_ListObjIndex(interp, listPtr, i, &elemObj) != TCL_OK) { return TCL_ERROR; } @@ -2299,8 +2299,8 @@ Tcl_LassignObjCmd( * the elemObj is stored in the var. See tests 6.{25,26} */ Tcl_IncrRefCount(elemObj); - if (Tcl_ObjSetVar2(interp, *objv++, NULL, elemObj, TCL_LEAVE_ERR_MSG) == - NULL) { + if (Tcl_ObjSetVar2(interp, *objv++, NULL, elemObj, + TCL_LEAVE_ERR_MSG) == NULL) { Tcl_DecrRefCount(elemObj); return TCL_ERROR; } @@ -2334,8 +2334,7 @@ Tcl_LassignObjCmd( interp, listPtr, fromIdx, toIdx, &resultObjPtr) != TCL_OK) { return TCL_ERROR; } - } - else { + } else { resultObjPtr = TclListObjRange( interp, listPtr, origListObjc - listObjc, origListObjc - 1); if (resultObjPtr == NULL) { @@ -3196,7 +3195,7 @@ Tcl_LreverseObjCmd( } if (Tcl_IsShared(objv[1]) - || ListObjRepIsShared(objv[1])) { /* Bug 1675044 */ + || ListObjRepIsShared(objv[1])) { /* Bug 1675044 */ Tcl_Obj *resultObj, **dataArray; ListRep listRep; @@ -4395,7 +4394,9 @@ Tcl_LseqObjCmd( done: // Free number arguments. while (--value_i>=0) { - if (numValues[value_i]) Tcl_DecrRefCount(numValues[value_i]); + if (numValues[value_i]) { + Tcl_DecrRefCount(numValues[value_i]); + } } // Free constants @@ -4904,8 +4905,7 @@ Tcl_LsortObjCmd( } else if (sortMode == SORTMODE_REAL) { double a; - if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, - &a) != TCL_OK) { + if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) { sortInfo.resultCode = TCL_ERROR; goto done; } @@ -5368,7 +5368,7 @@ DictionaryCompare( int secondaryDiff = 0; while (1) { - if (isdigit(UCHAR(*right)) /* INTL: digit */ + if (isdigit(UCHAR(*right)) /* INTL: digit */ && isdigit(UCHAR(*left))) { /* INTL: digit */ /* * There are decimal numbers embedded in the two strings. Compare |