Tk Library Source Code

Artifact [31fdc1000b]
Login

Artifact 31fdc1000b69fc3611b8c511f93541d341318f7d:

Attachment "crc.patch" to ticket [1274120fff] added by dgp 2005-08-26 22:40:49.
Index: modules/crc/crc16.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/crc/crc16.tcl,v
retrieving revision 1.11
diff -u -r1.11 crc16.tcl
--- modules/crc/crc16.tcl	25 Jan 2004 07:29:21 -0000	1.11
+++ modules/crc/crc16.tcl	26 Aug 2005 15:21:59 -0000
@@ -65,7 +65,8 @@
     # calculate the sign bit for the current platform.
     variable signbit
     if {![info exists signbit]} {
-        for {set v 1} {$v != 0} {set signbit $v; set v [expr {$v<<1}]} {}
+	variable v
+        for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
     }
 }
 
Index: modules/crc/crc32.tcl
===================================================================
RCS file: /cvsroot/tcllib/tcllib/modules/crc/crc32.tcl,v
retrieving revision 1.19
diff -u -r1.19 crc32.tcl
--- modules/crc/crc32.tcl	25 Aug 2005 20:47:00 -0000	1.19
+++ modules/crc/crc32.tcl	26 Aug 2005 15:22:00 -0000
@@ -87,7 +87,8 @@
     # calculate the sign bit for the current platform.
     variable signbit
     if {![info exists signbit]} {
-        for {set v 1} {$v != 0} {set signbit $v; set v [expr {$v<<1}]} {}
+	variable v
+        for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
     }
     
     variable uid ; if {![info exists uid]} {set uid 0}