|
|
|
@ -681,12 +681,16 @@ tcl::namespace::eval punk::ansi { |
|
|
|
} |
|
|
|
} |
|
|
|
set opt_crm_mode [dict get $opts -crm_mode] |
|
|
|
set opt_crm_mode [dict get $opts -crm_mode] |
|
|
|
|
|
|
|
|
|
|
|
#if SAUCE data is present - it may give an indication of encoding as well as number of columns/lines |
|
|
|
|
|
|
|
package require punk::ansi::sauce |
|
|
|
|
|
|
|
set binarytext "" |
|
|
|
set binarytext "" |
|
|
|
if {[catch {punk::ansi::sauce::from_file $fname} sdict]} { |
|
|
|
set sdict [dict create] |
|
|
|
#no 128 Byte SAUCE record at end of file |
|
|
|
#if SAUCE data is present - it may give an indication of encoding as well as number of columns/lines |
|
|
|
set sdict [dict create] |
|
|
|
if {![catch {package require punk::ansi::sauce}]} { |
|
|
|
|
|
|
|
if {[catch {punk::ansi::sauce::from_file $fname} sdict]} { |
|
|
|
|
|
|
|
#no 128 Byte SAUCE record at end of file |
|
|
|
|
|
|
|
set sdict [dict create] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
puts stderr "Warning punk::ansi::sauce package not loaded - unable to detect or use any SAUCE data to aid in display" |
|
|
|
} |
|
|
|
} |
|
|
|
if {![dict size $sdict]} { |
|
|
|
if {![dict size $sdict]} { |
|
|
|
if {[string tolower [file extension $fname]] eq ".bin"} { |
|
|
|
if {[string tolower [file extension $fname]] eq ".bin"} { |
|
|
|
|