X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fwhere-vessels;h=eacde3aa7eda581375a39ea13281259f0abdf120;hp=99929dbfc4e6794209c89f1c0c334673b4072b40;hb=31495d4cf6b336aec269629da32ddae7f499029a;hpb=579410edbae28cc350c353db289ba4cc6788d30a diff --git a/yarrg/where-vessels b/yarrg/where-vessels index 99929db..eacde3a 100755 --- a/yarrg/where-vessels +++ b/yarrg/where-vessels @@ -136,6 +136,7 @@ proc have-notes {} { return [string length $notes_loc] } proc have-ownership {} { + global pirate return [expr {[have-notes] && [string length $pirate]}] } @@ -146,7 +147,13 @@ proc argdefaults {} { set cmd {./yarrg --find-window-only --quiet} if {[info exists ocean]} { lappend cmd --ocean $ocean } if {[info exists pirate]} { lappend cmd --pirate $pirate } - manyset [split [eval exec $cmd] " "] ocean pirate + if {[catch { + manyset [split [eval exec $cmd] " "] ocean pirate + } emsg]} { + puts stderr "yarrg: [string trim $emsg]" + puts stderr "Alternatively pass, --ocean and perhaps --pirate options to where-vessels" + exit 1 + } if {![llength $ocean] || ![llength $pirate]} { error "$ocean $pirate ?" } @@ -473,7 +480,7 @@ proc show-report-decode {code} { 1 { report-set own "Other pirate's" } 2 { report-set own "Owner unknown" } 3 { report-set own "(All ownerships)" } - 4 - 5 { report-set own "(Yours/unknown)" } + 4 - 5 { report-set own "(Not yours / unknown)" } default { report-set own "?? $notown" } } } @@ -623,7 +630,7 @@ proc smash-code {code} { proc smash-prepare {} { global vc_codes smash_sizemap smash_size smash_sizeinexact set mapto {} - catch { unset smash_sizeplus } + catch { unset smash_sizeinexact } foreach size $vc_codes { if {!$smash_size($size)} { set mapto $size