2fb26975e2
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@433 2a923420-c742-0410-a762-8d5b09965624
23 lines
426 B
Plaintext
23 lines
426 B
Plaintext
proc _channelsort {v1 v2} {
|
|
set v1s [$v1 get channel_num]
|
|
set v2s [$v2 get channel_num]
|
|
|
|
if {$v1s > $v2s } { return 1 }
|
|
if {$v1s == $v2s} {
|
|
set v1t [$v1 get start]
|
|
set v2t [$v2 get start]
|
|
if {$v1t > $v2t} { return 1 }
|
|
if {$v1t == $v2t} { return 0 }
|
|
return -1
|
|
}
|
|
return -1
|
|
}
|
|
|
|
proc channelsort {records} {
|
|
foreach record $records {
|
|
$record get_channel_info
|
|
}
|
|
return [lsort -command _channelsort $records]
|
|
}
|
|
|