DELETED build/update-wiki-docs
Index: build/update-wiki-docs
==================================================================
--- build/update-wiki-docs
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/env bash
-
-version="$1"
-
-cd "$(dirname "$(which "$0")")/.." || exit 1
-
-if [ -z "${version}" ]; then
- version="$(cat configure.ac | grep AC_INIT | head -1 | sed 's@^AC_INIT([^,]*, *@@;s@,.*$@@;s@ *)$@@')"
-fi
-
-newBody="$(cat tls.htm | sed 's@\[@[@g' | sed '/<\/body>/,$ d;0,/
]/ d;// d' | sed 's/@@VERS@@/'"${version}"'/g' | grep -iv '^[@g' | sed '/<\/body>/,$ d;0,/]/ d;// d' | sed 's/@@VERS@@/'"${version}"'/g' | grep -iv '^ EVP_MAX_MD_SIZE ? BUFSIZ : EVP_MAX_MD_SIZE);
- printf("Called\n");
+ dprintf("Called");
if (interp == NULL || cert == NULL || bio == NULL || resultObj == NULL || buffer == NULL) {
Tcl_DecrRefCount(resultObj);
BIO_free(bio);
if (buffer != NULL) ckfree(buffer);
Index: library/tls.tcl
==================================================================
--- library/tls.tcl
+++ library/tls.tcl
@@ -329,11 +329,11 @@
}
"info" {
set type ""
lassign $args major minor msg type
- if {$msg != ""} {
+ if {$msg ne ""} {
append state ": $msg"
}
# For tracing
upvar #0 tls::$chan cb
set cb($major) $minor
@@ -385,11 +385,11 @@
"verify" {
lassign $args depth cert rc err
array set c $cert
- if {$rc != "1"} {
+ if {$rc ne "1"} {
log 1 "TLS/$chan: verify/$depth: Bad Cert: $err (rc = $rc)"
} else {
log 2 "TLS/$chan: verify/$depth: $c(subject)"
}
if {$debug > 0} {
@@ -408,11 +408,11 @@
proc tls::xhandshake {chan} {
upvar #0 tls::$chan cb
if {[info exists cb(handshake)] && \
- $cb(handshake) == "done"} {
+ $cb(handshake) eq "done"} {
return 1
}
while {1} {
vwait tls::${chan}(handshake)
if {![info exists cb(handshake)]} {
@@ -432,13 +432,13 @@
proc tls::log {level msg} {
variable debug
variable logcmd
- if {$level > $debug || $logcmd == ""} {
+ if {$level > $debug || $logcmd eq ""} {
return
}
set cmd $logcmd
lappend cmd $msg
uplevel #0 $cmd
}
Index: tests/common.tcl
==================================================================
--- tests/common.tcl
+++ tests/common.tcl
@@ -1,5 +1,6 @@
+#!/usr/bin/env tclsh
# Common Constraints
package require tls
# Supported protocols
Index: tests/oldTests/tls.tcl
==================================================================
--- tests/oldTests/tls.tcl
+++ tests/oldTests/tls.tcl
@@ -1,11 +1,11 @@
#
# Copyright (C) 1997-2000 Matt Newman
#
set dir [file dirname [info script]]
regsub {\.} [info tclversion] {} vshort
-if {$tcl_platform(platform) == "windows"} {
+if {$tcl_platform(platform) eq "windows"} {
if {[info exists tcl_platform(debug)]} {
load $dir/../win/Debug$vshort/tls.dll
} else {
load $dir/../win/Release$vshort/tls.dll
}
Index: tests/oldTests/tlsAuto.tcl
==================================================================
--- tests/oldTests/tlsAuto.tcl
+++ tests/oldTests/tlsAuto.tcl
@@ -15,11 +15,11 @@
}
if {[eof $chan]} {
close $chan
set ::/Exit 1
}
- if {$data != ""} {
+ if {$data ne ""} {
puts -nonewline stderr "$data"
}
}
proc doit {chan count {delay 1000}} {
if {$count == 0} {
Index: tests/oldTests/tlsSrv.tcl
==================================================================
--- tests/oldTests/tlsSrv.tcl
+++ tests/oldTests/tlsSrv.tcl
@@ -18,11 +18,11 @@
puts stderr "EOF ($data)"
catch {close $chan}
return
}
- if {$verbose && $data != ""} {
+ if {$verbose && $data ne ""} {
puts -nonewline stderr $data
}
if {[eof $chan]} { ;# client gone or finished
puts stderr "EOF"
close $chan ;# release the servers client channel
Index: tests/oldTests/tlsSrv2.tcl
==================================================================
--- tests/oldTests/tlsSrv2.tcl
+++ tests/oldTests/tlsSrv2.tcl
@@ -17,11 +17,11 @@
puts stderr "EOF ($data)"
catch {close $chan}
return
}
- if {$verbose && $data != ""} {
+ if {$verbose && $data ne ""} {
puts -nonewline stderr $data
}
if {[eof $chan]} { ;# client gone or finished
puts stderr "EOF"
close $chan ;# release the servers client channel
Index: tests/oldTests/tlsUpload.tcl
==================================================================
--- tests/oldTests/tlsUpload.tcl
+++ tests/oldTests/tlsUpload.tcl
@@ -15,11 +15,11 @@
}
if {[eof $chan]} {
close $chan
set ::/Exit 1
}
- if {$data != ""} {
+ if {$data ne ""} {
puts -nonewline stderr "$data"
}
}
proc doit {chan count {delay 1000}} {
if {$count == 0} {
Index: tests/remote.tcl
==================================================================
--- tests/remote.tcl
+++ tests/remote.tcl
@@ -1,5 +1,6 @@
+#!/usr/bin/env tclsh
# This file contains Tcl code to implement a remote server that can be
# used during testing of Tcl socket code. This server is used by some
# of the tests in socket.test.
#
# Source this file in the remote server you are using to test Tcl against.
@@ -58,18 +59,18 @@
proc __readAndExecute__ {s} {
global command VERBOSE
set l [gets $s]
- if {[string compare $l "--Marker--Marker--Marker--"] == 0} {
+ if {$l eq "--Marker--Marker--Marker--"} {
if {[info exists command($s)]} {
puts $s [list error incomplete_command]
}
puts $s "--Marker--Marker--Marker--"
return
}
- if {[string compare $l ""] == 0} {
+ if {$l eq ""} {
if {[eof $s]} {
if {$VERBOSE} {
puts "Server closing $s, eof from client"
}
close $s
@@ -101,11 +102,11 @@
fconfigure $s -buffering line -translation crlf
}
set serverIsSilent 0
for {set i 0} {$i < $argc} {incr i} {
- if {[string compare -serverIsSilent [lindex $argv $i]] == 0} {
+ if {[lindex $argv $i] eq "-serverIsSilent"} {
set serverIsSilent 1
break
}
}
if {![info exists serverPort]} {
@@ -113,11 +114,11 @@
set serverPort $env(serverPort)
}
}
if {![info exists serverPort]} {
for {set i 0} {$i < $argc} {incr i} {
- if {[string compare -port [lindex $argv $i]] == 0} {
+ if {[lindex $argv $i] eq "-port"} {
if {$i < [expr $argc - 1]} {
set serverPort [lindex $argv [expr $i + 1]]
}
break
}
@@ -132,11 +133,11 @@
set serverAddress $env(serverAddress)
}
}
if {![info exists serverAddress]} {
for {set i 0} {$i < $argc} {incr i} {
- if {[string compare -address [lindex $argv $i]] == 0} {
+ if {[lindex $argv $i] eq "-address"} {
if {$i < [expr $argc - 1]} {
set serverAddress [lindex $argv [expr $i + 1]]
}
break
}
Index: tests/simpleClient.tcl
==================================================================
--- tests/simpleClient.tcl
+++ tests/simpleClient.tcl
@@ -61,11 +61,11 @@
#dputs "EOF $chan ([shortstr $data])"
incr OPTS(openports) -1
catch {close $chan}
return
}
- #if {$data != ""} { dputs "got $chan ([shortstr $data])" }
+ #if {$data ne ""} { dputs "got $chan ([shortstr $data])" }
if {[string match *CLOSE\n $data]} {
dputs "CLOSE $chan"
incr OPTS(openports) -1
close $chan
return
Index: tests/simpleServer.tcl
==================================================================
--- tests/simpleServer.tcl
+++ tests/simpleServer.tcl
@@ -40,11 +40,11 @@
if {[catch {read $chan} data]} {
#dputs "EOF $chan ([shortstr $data)"
catch {close $chan}
return
}
- #if {$data != ""} { dputs "got $chan ([shortstr $data])" }
+ #if {$data ne ""} { dputs "got $chan ([shortstr $data])" }
if {[eof $chan]} {
# client gone or finished
dputs "EOF $chan"
close $chan ;# release the port
return
Index: tests/tlsIO.test
==================================================================
--- tests/tlsIO.test
+++ tests/tlsIO.test
@@ -85,12 +85,12 @@
set clientKey [file join $certsDir client.key]
# Some tests require the testthread and exec commands
set ::tcltest::testConstraints(testthread) \
- [expr {[info commands testthread] != {}}]
-set ::tcltest::testConstraints(exec) [expr {[info commands exec] != {}}]
+ [expr {[info commands testthread] ne {}}]
+set ::tcltest::testConstraints(exec) [expr {[info commands exec] ne {}}]
#
# If remoteServerIP or remoteServerPort are not set, check in the
# environment variables for externally set values.
#
@@ -119,11 +119,11 @@
# Some errors are normal.
dputs "handshake: $result"
} elseif {$result == 1} {
# Handshake complete
if {[llength $args]} { eval [list fconfigure $s] $args }
- if {$cmd == ""} {
+ if {$cmd eq ""} {
fileevent $s $type ""
} else {
fileevent $s $type "$cmd [list $s]"
}
dputs "handshake: complete"
@@ -136,11 +136,11 @@
#
# Check if we're supposed to do tests against the remote server
#
set doTestsWithRemoteServer 1
-if {![info exists remoteServerIP] && ($tcl_platform(platform) != "macintosh")} {
+if {![info exists remoteServerIP] && ($tcl_platform(platform) ne "macintosh")} {
set remoteServerIP 127.0.0.1
}
if {($doTestsWithRemoteServer == 1) && (![info exists remoteServerPort])} {
set remoteServerPort $tlsServerPort
}
@@ -157,11 +157,11 @@
if {$doTestsWithRemoteServer} {
catch {close $commandSocket}
if {[catch {set commandSocket [tls::socket \
-certfile $clientCert -cafile $caCert -keyfile $clientKey \
$remoteServerIP $remoteServerPort]}] != 0} {
- if {[info commands exec] == ""} {
+ if {[info commands exec] eq ""} {
set noRemoteTestReason "can't exec"
set doTestsWithRemoteServer 0
} else {
set remoteServerIP 127.0.0.1
set remoteFile [file join [pwd] remote.tcl]
@@ -222,12 +222,12 @@
while {1} {
set line [gets $commandSocket]
if {[eof $commandSocket]} {
error "remote server disappeared"
}
- if {[string compare $line "--Marker--Marker--Marker--"] == 0} {
- if {[string compare [lindex $resp 0] error] == 0} {
+ if {$line eq "--Marker--Marker--Marker--"} {
+ if {[lindex $resp 0] eq "error"} {
error [lindex $resp 1]
} else {
return [lindex $resp 1]
}
} else {
@@ -1388,21 +1388,21 @@
-certfile $clientCert -cafile $caCert -keyfile $clientKey \
$remoteServerIP 8836]
fconfigure $f -translation crlf -buffering line
for {set cnt 0} {$cnt < 50} {incr cnt} {
puts $f "hello, $cnt"
- if {[string compare [gets $f] "hello, $cnt"] != 0} {
+ if {[gets $f] ne "hello, $cnt"} {
break
}
}
close $f
sendCommand {close $socket10_7_test_server}
set cnt
} 50
# Macintosh sockets can have more than one server per port
-if {$tcl_platform(platform) == "macintosh"} {
+if {$tcl_platform(platform) eq "macintosh"} {
set conflictResult {0 8836}
} else {
set conflictResult {1 {couldn't open socket: address already in use}}
}
@@ -1722,11 +1722,11 @@
global failed
set status [catch {read $file} data]
if {$status != 0} {
set x "read failed, error was $data"
catch { close $file }
- } elseif {[string compare {} $data]} {
+ } elseif {$data ne {}} {
} elseif {[fblocked $file]} {
} elseif {[eof $file]} {
if {$failed} {
set x "$type socket was inherited"
} else {