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 | 780e71600c142bee274fbf209304fb0ef2153143 (patch) | |
| tree | bcfa89065ecea0a374bed505c235b77cba3db0a3 /generic/tclStringObj.c | |
| parent | 8925939c12d52f0c01b12796108f74ec08addd1b (diff) | |
| download | tcl-780e71600c142bee274fbf209304fb0ef2153143.zip tcl-780e71600c142bee274fbf209304fb0ef2153143.tar.gz tcl-780e71600c142bee274fbf209304fb0ef2153143.tar.bz2 | |
Fix indentation/brace usage style issues
Diffstat (limited to 'generic/tclStringObj.c')
| -rw-r--r-- | generic/tclStringObj.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 42eaa8d..4f1a145 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -490,7 +490,7 @@ TclCheckEmptyString( } if (TclIsPureByteArray(objPtr) - && Tcl_GetCharLength(objPtr) == 0) { + && Tcl_GetCharLength(objPtr) == 0) { return TCL_EMPTYSTRING_YES; } @@ -1394,10 +1394,8 @@ Tcl_AppendObjToObj( return; } - if ( - TclIsPureByteArray(appendObjPtr) - && (TclIsPureByteArray(objPtr) || objPtr->bytes == &tclEmptyString) - ) { + if (TclIsPureByteArray(appendObjPtr) + && (TclIsPureByteArray(objPtr) || objPtr->bytes == &tclEmptyString)) { /* * Both bytearray objects are pure, so the second internal bytearray value * can be appended to the first, with no need to modify the "bytes" field. @@ -2192,7 +2190,9 @@ Tcl_AppendFormatToObj( } cmpResult = mp_cmp_d(&big, 0); isNegative = (cmpResult == MP_LT); - if (cmpResult == MP_EQ) gotHash = 0; + if (cmpResult == MP_EQ) { + gotHash = 0; + } if (ch == 'u') { if (isNegative) { mp_clear(&big); @@ -2209,7 +2209,9 @@ Tcl_AppendFormatToObj( goto error; } isNegative = (w < (Tcl_WideInt) 0); - if (w == (Tcl_WideInt) 0) gotHash = 0; + if (w == (Tcl_WideInt) 0) { + gotHash = 0; + } #endif } else if (TclGetLongFromObj(NULL, segment, &l) != TCL_OK) { if (TclGetWideBitsFromObj(interp, segment, &w) != TCL_OK) { @@ -2220,18 +2222,26 @@ Tcl_AppendFormatToObj( if (useShort) { s = (short) l; isNegative = (s < (short) 0); - if (s == (short) 0) gotHash = 0; + if (s == (short) 0) { + gotHash = 0; + } } else { isNegative = (l < (long) 0); - if (l == (long) 0) gotHash = 0; + if (l == (long) 0) { + gotHash = 0; + } } } else if (useShort) { s = (short) l; isNegative = (s < (short) 0); - if (s == (short) 0) gotHash = 0; + if (s == (short) 0) { + gotHash = 0; + } } else { isNegative = (l < (long) 0); - if (l == (long) 0) gotHash = 0; + if (l == (long) 0) { + gotHash = 0; + } } TclNewObj(segment); @@ -2544,7 +2554,9 @@ Tcl_AppendFormatToObj( char *q = TclGetString(segment) + 1; *q = 'x'; q = strchr(q, 'P'); - if (q) *q = 'p'; + if (q) { + *q = 'p'; + } } break; } @@ -3275,11 +3287,11 @@ TclStringCat( Tcl_Obj *objPtr = *ov++; if (objPtr->bytes == NULL - && TclCheckEmptyString(objPtr) != TCL_EMPTYSTRING_YES) { + && TclCheckEmptyString(objPtr) != TCL_EMPTYSTRING_YES) { /* No string rep; Take the chance we can avoid making it */ pendingPtr = objPtr; } else { - (void)Tcl_GetStringFromObj(objPtr, &length); /* PANIC? */ + (void) Tcl_GetStringFromObj(objPtr, &length); /* PANIC? */ } } while (--oc && (length == 0) && (pendingPtr == NULL)); |
