update hexdump and fix dict merge problem

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1723 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-11-26 21:47:58 +00:00
parent 2a4ec43ef6
commit 2c62699f00
5 changed files with 25 additions and 30 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.7-7
Version: 1.0.7-8
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.74-2),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)

View File

@ -16,8 +16,7 @@ puts "
puts {
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1">
<meta name="viewport" content="user-scalable=no,initial-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<link rel="stylesheet" href="/lib/jquery.mobile/jquery.mobile.css" />

View File

@ -1,30 +1,16 @@
package require binary
proc hexdump {str} {
set s ""
set addr 0
append s "[format "%07x" $addr]: "
set t ""
for {set i 0} {$i < [string length $str]} {incr i} {
if {$i > 0 && [expr $i % 16] == 0} {
append s " $t\n"
append s "[format "%07x" $addr]: "
incr addr 16
set t ""
} elseif {$i > 0 && [expr $i % 2] == 0} {
append s " "
}
set char [string index $str $i]
binary scan $char H2 cc
append s $cc
if {[string is print $char]} {
append t $char
} else {
append t "."
}
}
puts $s
proc hexdump data {
set dump ""
set n 0
while {$n < [string bytelength $data]} {
set bytes [string byterange $data $n $($n+15)]
binary scan $bytes H* hex
set hex [regexp -all -inline .. $hex]
regsub -all -- {[^a-z]} $bytes . ascii
append dump [format "%04X: %-48s %-16s\n" $n $hex $ascii]
incr n 16
}
puts $dump
}

View File

@ -0,0 +1,10 @@
proc {dict merge} {dict args} {
foreach d $args {
foreach k [dict keys $d] {
dict set dict $k [dict get $d $k]
}
}
return $dict
}

View File

@ -54,6 +54,6 @@ if {![exists -proc require]} {
}
}
require fileops
require fileops overrides
}