From 4588d7300e53e7403a693eedb0d10d54efccb972 Mon Sep 17 00:00:00 2001 From: kjnash Date: Fri, 13 Apr 2018 15:48:13 +0000 Subject: Restore Tcl 8+4 tab convention --- library/http/http.tcl | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/library/http/http.tcl b/library/http/http.tcl index e0382e7..30b69e6 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -256,7 +256,7 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} { set state(status) "error" } if {[info commands ${token}EventCoroutine] ne {}} { - rename ${token}EventCoroutine {} + rename ${token}EventCoroutine {} } if { ($state(status) eq "timeout") || ($state(status) eq "error") @@ -333,10 +333,10 @@ proc http::KeepSocket {token} { if {$TEST_EOF} { # ONLY for testing reaction to server eof. # No server timeouts will be caught. - catch {fileevent $state(sock) readable {}} + catch {fileevent $state(sock) readable {}} } else { - # Normal operation. - # Test constraint normalEof. + # Normal operation. + # Test constraint normalEof. } if { [info exists state(socketinfo)] @@ -1555,14 +1555,14 @@ proc http::registerError {sock args} { variable registeredErrors if { ([llength $args] == 0) - && (![info exists registeredErrors($sock)]) + && (![info exists registeredErrors($sock)]) } { - return + return } elseif { ([llength $args] == 1) - && ([lindex $args 0] eq {}) + && ([lindex $args 0] eq {}) } { - unset -nocomplain registeredErrors($sock) - return + unset -nocomplain registeredErrors($sock) + return } set registeredErrors($sock) {*}$args # N.B. Implicit Return @@ -2303,7 +2303,7 @@ proc http::cleanup {token} { variable $token upvar 0 $token state if {[info commands ${token}EventCoroutine] ne {}} { - rename ${token}EventCoroutine {} + rename ${token}EventCoroutine {} } if {[info exists state(after)]} { after cancel $state(after) @@ -2876,7 +2876,7 @@ proc http::Event {sock token} { # $state(-blocksize) bytes, the last part of the # resource does not get read until the server times out. set reqSize [expr { $state(totalsize) - - $state(currentsize)}] + - $state(currentsize)}] # The workaround fails if reqSize is # capped at $state(-blocksize). @@ -3076,19 +3076,19 @@ proc http::getTextLine {sock} { proc http::BlockingRead {sock size} { if {$size < 1} { - return + return } set result {} while 1 { - set need [expr {$size - [string length $result]}] - set block [read $sock $need] - set eof [eof $sock] - append result $block - if {[string length $result] >= $size || $eof} { - return $result - } else { - yield - } + set need [expr {$size - [string length $result]}] + set block [read $sock $need] + set eof [eof $sock] + append result $block + if {[string length $result] >= $size || $eof} { + return $result + } else { + yield + } } } @@ -3101,13 +3101,13 @@ proc http::BlockingRead {sock size} { proc http::BlockingGets {sock} { while 1 { - set count [gets $sock line] - set eof [eof $sock] - if {$count > -1 || $eof} { - return $line - } else { - yield - } + set count [gets $sock line] + set eof [eof $sock] + if {$count > -1 || $eof} { + return $line + } else { + yield + } } } -- cgit v0.12