From 4f3c0fa94fcc4ce830c4765499a42261934c48e7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 9 Mar 2020 12:49:41 +0000 Subject: Use more uppercase hex (e.g. 0xFF) in stead of lowercase (0xff) consistantly. --- ChangeLog | 2 +- ChangeLog.2005 | 2 +- changes | 2 +- doc/ParseCmd.3 | 2 +- doc/Tcl.n | 8 ++++---- doc/ToUpper.3 | 2 +- doc/Utf.3 | 2 +- doc/binary.n | 6 +++--- library/clock.tcl | 2 +- tools/loadICU.tcl | 2 +- tools/makeTestCases.tcl | 2 +- unix/configure | 2 +- unix/configure.in | 2 +- unix/tclUnixPort.h | 12 ++++++------ 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7150045..50fbeec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1012,7 +1012,7 @@ a better first place to look now. * tools/uniClass.tcl: [FRQ 3473670]: Various Unicode-related * tools/uniParse.tcl: speedups/robustness. Enhanced tools to be - * generic/tclUniData.c: able to handle characters > 0xffff. Done in + * generic/tclUniData.c: able to handle characters > 0xFFFF. Done in * generic/tclUtf.c: all branches in order to simplify merges for * generic/regc_locale.c: new Unicode versions (such as 6.1) diff --git a/ChangeLog.2005 b/ChangeLog.2005 index 0d1d7cf..109ea8e 100644 --- a/ChangeLog.2005 +++ b/ChangeLog.2005 @@ -2913,7 +2913,7 @@ * generic/tclCompCmds.c: Updated callers to call new routine. * generic/tclDictObj.c: Updated callers to call new routine. * tests/obj.test: Corrected bad tests that actually expected - values like "47" and "0xac" to be accepted as booleans. + values like "47" and "0xAC" to be accepted as booleans. * generic/tclLiteral.c: Disabled the code that forces some literals into the "int" Tcl_ObjType during registration. We can re-enable it if diff --git a/changes b/changes index c25f582..88de973 100644 --- a/changes +++ b/changes @@ -2307,7 +2307,7 @@ to the standard channel, do not increment the refcount. The channel can be NULL if there is for example no standard input. (JL) 9/6/96 (portability improvement) Changed parsing of backslash sequences -like \n to translate directly to absolute values like 0xa instead of +like \n to translate directly to absolute values like 0xA instead of letting the compiler do the translation. This guarantees that the translation is done the same everywhere. (JO) diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index ff1be23..e1a8790 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -300,7 +300,7 @@ The token describes a range of literal text that is part of a word. The \fInumComponents\fR field is always 0. .TP \fBTCL_TOKEN_BS\fR -The token describes a backslash sequence such as \fB\en\fR or \fB\e0xa3\fR. +The token describes a backslash sequence such as \fB\en\fR or \fB\e0xA3\fR. The \fInumComponents\fR field is always 0. .TP \fBTCL_TOKEN_COMMAND\fR diff --git a/doc/Tcl.n b/doc/Tcl.n index 980d81f..5c09cb8 100644 --- a/doc/Tcl.n +++ b/doc/Tcl.n @@ -146,19 +146,19 @@ Audible alert (bell) (0x7). Backspace (0x8). .TP 7 \e\fBf\fR -Form feed (0xc). +Form feed (0xC). .TP 7 \e\fBn\fR -Newline (0xa). +Newline (0xA). .TP 7 \e\fBr\fR -Carriage-return (0xd). +Carriage-return (0xD). .TP 7 \e\fBt\fR Tab (0x9). .TP 7 \e\fBv\fR -Vertical tab (0xb). +Vertical tab (0xB). .TP 7 \e\fB\fIwhiteSpace\fR . diff --git a/doc/ToUpper.3 b/doc/ToUpper.3 index 587e76b..ef3e491 100644 --- a/doc/ToUpper.3 +++ b/doc/ToUpper.3 @@ -81,7 +81,7 @@ and all following characters into their lower-case equivalents. .SH BUGS .PP At this time, the case conversions are only defined for the ISO8859-1 -characters. Unicode characters above 0x00ff are not modified by these +characters. Unicode characters above 0x00FF are not modified by these routines. .SH KEYWORDS diff --git a/doc/Utf.3 b/doc/Utf.3 index 903fac7..5361f32 100644 --- a/doc/Utf.3 +++ b/doc/Utf.3 @@ -142,7 +142,7 @@ end and dereference non-existent or random memory; if the source buffer is known to be null-terminated, this will not happen. If the input is not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and -0x00ff and return 1. +0x00FF and return 1. .PP \fBTcl_UniCharToUtfDString\fR converts the given Unicode string to UTF-8, storing the result in a previously initialized \fBTcl_DString\fR. diff --git a/doc/binary.n b/doc/binary.n index ff800f0..5f1efaf 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -561,7 +561,7 @@ stored in \fIvar2\fR. Note that the integers returned are signed, but they can be converted to unsigned 8-bit quantities using an expression like: .CS -set num [expr { $num & 0xff }] +set num [expr { $num & 0xFF }] .CE .RE .IP \fBs\fR 5 @@ -580,7 +580,7 @@ stored in \fIvar2\fR. Note that the integers returned are signed, but they can be converted to unsigned 16-bit quantities using an expression like: .CS -set num [expr { $num & 0xffff }] +set num [expr { $num & 0xFFFF }] .CE .RE .IP \fBS\fR 5 @@ -619,7 +619,7 @@ stored in \fIvar2\fR. Note that the integers returned are signed, but they can be converted to unsigned 32-bit quantities using an expression like: .CS -set num [expr { $num & 0xffffffff }] +set num [expr { $num & 0xFFFFFFFF }] .CE .RE .IP \fBI\fR 5 diff --git a/library/clock.tcl b/library/clock.tcl index eb87251..3018a3b 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -3559,7 +3559,7 @@ proc ::tcl::clock::ReadZoneinfoFile {fileName fname} { set times [linsert $times 0 $MINWIDE] set codes {} foreach c $tempCodes { - lappend codes [expr { $c & 0xff }] + lappend codes [expr { $c & 0xFF }] } set codes [linsert $codes 0 0] diff --git a/tools/loadICU.tcl b/tools/loadICU.tcl index 5b09e2c..1cdd12f 100755 --- a/tools/loadICU.tcl +++ b/tools/loadICU.tcl @@ -588,7 +588,7 @@ proc backslashify { string } { set retval {} foreach char [split $string {}] { scan $char %c ccode - if { $ccode >= 0x0020 && $ccode < 0x007f && $char ne "\"" + if { $ccode >= 0x0020 && $ccode < 0x007F && $char ne "\"" && $char ne "\{" && $char ne "\}" && $char ne "\[" && $char ne "\]" && $char ne "\\" && $char ne "\$" } { append retval $char diff --git a/tools/makeTestCases.tcl b/tools/makeTestCases.tcl index d96a221..c230d57 100755 --- a/tools/makeTestCases.tcl +++ b/tools/makeTestCases.tcl @@ -592,7 +592,7 @@ proc testcases5 { f2 } { foreach { t offset isdst tzname } $row break if { $t > -4000000000000 } { set conds [list detroit] - if { $t > wide(0x7fffffff) } { + if { $t > wide(0x7FFFFFFF) } { set conds [list detroit y2038] } incr t -1 diff --git a/unix/configure b/unix/configure index a06ac5a..b02525b 100755 --- a/unix/configure +++ b/unix/configure @@ -18983,7 +18983,7 @@ echo "${ECHO_T}static library" >&6 TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}' - echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xA000000' TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' diff --git a/unix/configure.in b/unix/configure.in index 92ba199..c110c21 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -767,7 +767,7 @@ if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TCL_LIB_FILE}' - echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xa000000' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -seg1addr 0xA000000' TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tcl-Info.plist' EXTRA_TCLSH_LIBS='-sectcreate __TEXT __info_plist Tclsh-Info.plist' EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic' diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 9a923ef..086dd91 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -227,27 +227,27 @@ extern int TclUnixSetBlockingMode(int fd, int mode); */ #ifndef WIFEXITED -# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xff) == 0) +# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xFF) == 0) #endif #ifndef WEXITSTATUS -# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff) +# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xFF) #endif #ifndef WIFSIGNALED -# define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff))) +# define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0xFF))) #endif #ifndef WTERMSIG -# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7f) +# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7F) #endif #ifndef WIFSTOPPED -# define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xff) == 0177) +# define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xFF) == 0177) #endif #ifndef WSTOPSIG -# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xff) +# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xFF) #endif /* -- cgit v0.12