diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2024-05-13 15:41:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2024-05-13 15:41:44 (GMT) |
commit | 444e06f208e9503a7e93cd68a51ed73c3c82298b (patch) | |
tree | 5b346cf1401c23c69c43d84a1eb6986e442c7dfd /generic/tclBinary.c | |
parent | 6b9279d4f7c2ab12d40ffbce3629b8c79bc94136 (diff) | |
download | tcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.zip tcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.tar.gz tcl-444e06f208e9503a7e93cd68a51ed73c3c82298b.tar.bz2 |
Clean up a lot of small whitespace issues
This is the dullest commit ever. Sorry.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r-- | generic/tclBinary.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c index d95452b..b2e9e03 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -183,14 +183,16 @@ typedef struct { * above. */ } ByteArray; -#define BYTEARRAY_MAX_LEN (TCL_SIZE_MAX - (Tcl_Size)offsetof(ByteArray, bytes)) +#define BYTEARRAY_MAX_LEN \ + (TCL_SIZE_MAX - (Tcl_Size)offsetof(ByteArray, bytes)) #define BYTEARRAY_SIZE(len) \ - ( (len < 0 || BYTEARRAY_MAX_LEN < (len)) \ + ( (len < 0 || BYTEARRAY_MAX_LEN < (len)) \ ? (Tcl_Panic("negative length specified or max size of a Tcl value exceeded"), 0) \ : (offsetof(ByteArray, bytes) + (len)) ) -#define GET_BYTEARRAY(irPtr) ((ByteArray *) (irPtr)->twoPtrValue.ptr1) +#define GET_BYTEARRAY(irPtr) \ + ((ByteArray *) (irPtr)->twoPtrValue.ptr1) #define SET_BYTEARRAY(irPtr, baPtr) \ - (irPtr)->twoPtrValue.ptr1 = (baPtr) + (irPtr)->twoPtrValue.ptr1 = (baPtr) int TclIsPureByteArray( @@ -440,7 +442,7 @@ unsigned char * Tcl_SetByteArrayLength( Tcl_Obj *objPtr, /* The ByteArray object. */ Tcl_Size numBytes) /* Number of bytes in resized array - * Must be >= 0 */ + * Must be >= 0 */ { ByteArray *byteArrayPtr; Tcl_ObjInternalRep *irPtr; @@ -736,7 +738,7 @@ TclAppendBytesToByteArray( Tcl_ObjInternalRep *irPtr; if (Tcl_IsShared(objPtr)) { - Tcl_Panic("%s called with shared object","TclAppendBytesToByteArray"); + Tcl_Panic("%s called with shared object", "TclAppendBytesToByteArray"); } if (len < 0) { Tcl_Panic("%s must be called with definite number of bytes to append", @@ -2040,7 +2042,7 @@ FormatNumber( if (fabs(dvalue) > (FLT_MAX + pow(2, (FLT_MAX_EXP - FLT_MANT_DIG - 1)))) { fvalue = (dvalue >= 0.0) ? INFINITY : -INFINITY; // c99 } else { - fvalue = (dvalue >= 0.0) ? FLT_MAX : -FLT_MAX; + fvalue = (dvalue >= 0.0) ? FLT_MAX : -FLT_MAX; } } else { fvalue = (float) dvalue; @@ -2586,19 +2588,19 @@ BinaryDecodeHex( */ #define OUTPUT(c) \ - do { \ - *cursor++ = (c); \ - outindex++; \ - if (maxlen > 0 && cursor != limit) { \ - if (outindex == maxlen) { \ - memcpy(cursor, wrapchar, wrapcharlen); \ - cursor += wrapcharlen; \ - outindex = 0; \ - } \ - } \ - if (cursor > limit) { \ - Tcl_Panic("limit hit"); \ - } \ + do { \ + *cursor++ = (c); \ + outindex++; \ + if (maxlen > 0 && cursor != limit) { \ + if (outindex == maxlen) { \ + memcpy(cursor, wrapchar, wrapcharlen); \ + cursor += wrapcharlen; \ + outindex = 0; \ + } \ + } \ + if (cursor > limit) { \ + Tcl_Panic("limit hit"); \ + } \ } while (0) static int @@ -2783,7 +2785,8 @@ BinaryEncodeUu( case '\v': case '\f': case '\r': - p++; numBytes--; + p++; + numBytes--; continue; case '\n': numBytes--; |