More fixes for expr weirdness

This commit is contained in:
prpr 2022-09-25 16:59:39 +01:00
parent 3f1832387a
commit 8c2a33b54d
3 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,7 @@ if {[catch {set db [sqlite3.open /var/lib/humaxtv/channel.db]} msg]} {
pkg loadmuxdb
proc f2c {frequency} {
set ch int($((($frequency / 1000) - 303.25) / 8))
return [expr {int($ch)}]
return $(int((($frequency / 1000) - 303.25) / 8))
}
proc svc2mux {svcid mux} {

View File

@ -23,7 +23,7 @@ lmap i \
#set svcmap [lreverse $hmap]
proc lsum {l} {
expr [join $l +] + 0
expr [join [linsert $l 0 0] +]
}
proc pop_event {} {

View File

@ -201,10 +201,11 @@ puts "</div>"
######################################################################
# Events
if {[catch {set stt2 [expr {$stt + 0}]}]} { set stt2 0 }
puts "
<script type=text/javascript>
var hours = $hours;
var stt = [expr {$stt + 0}];
var stt = $stt2;
var nowoffset = $offset;
</script>
"