From de02daca3d377ebdd1e53689e5c3470f7284b726 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 13 Dec 2009 13:07:38 +0000 Subject: [PATCH] where-vessels: fix bugs due to split code and abbrev --- yarrg/where-vessels | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/yarrg/where-vessels b/yarrg/where-vessels index 7129910..9ec3b35 100755 --- a/yarrg/where-vessels +++ b/yarrg/where-vessels @@ -188,9 +188,9 @@ proc parse-notes {} { } } -proc note-info {lno vid name description} { +proc note-info {lno vid name island description} { global note_infos - lappend note_infos [list $lno $vid $name $description] + lappend note_infos [list $lno $vid $name $island $description] } proc display-note-infos {} { @@ -210,15 +210,17 @@ proc display-note-infos {} { set infodata {} foreach info $note_infos { - manyset $info lno vid name description + manyset $info lno vid name island description append infodata "vessel" append infodata " $vid" if {[string length $name]} { append infodata " $name" } + if {[string length $island]} { append infodata " ($island)" } append infodata ": " $description "\n" } if {$nmissing} { - append infodata "$nmissing vessels not mentioned in notes:\n" + if {[string length $infodata]} { append infodata "\n" } + append infodata "$nmissing vessel(s) not mentioned in notes:\n" set last_island {} foreach info [lsort $note_missings] { manyset $info island name vid @@ -233,8 +235,8 @@ proc display-note-infos {} { parser-control-failed-core .ctrl.notes notes \ white blue 0 \ $tiny \ - "[llength $note_infos] warnings;\ - $nmissing vessels missing" \ + "[llength $note_infos] warning(s);\ + $nmissing vessel(s) missing" \ "Full description of warnings and missing vessels:" \ $infodata } @@ -320,7 +322,7 @@ proc vessel {vin} { manyset $note lno notename owner xabbrev if {[string compare -nocase $realname $notename]} { note-info $lno $vid $realname $island \ - "notes say name is $notename - perhaps renamed" + "notes say name is $notename" } if {[string length $owner]} { if {![string compare $owner $pirate]} { -- 2.30.2