+ #
+ # Check the PVs first. if they're invalid, just wait, as our data
+ # is most likely out of sync. This isn't a very good solution, as
+ # it can frequently miss stuff, but it's good enough for most users.
+ #
+ eval {
+ my $dummy;
+ if (exists($uciinfo{'pv'})) {
+ $dummy = prettyprint_pv($ficsinfo{'board'}, @{$uciinfo{'pv'}});
+ }
+
+ my $mpv = 1;
+ while (exists($uciinfo{'pv' . $mpv})) {
+ $dummy = prettyprint_pv($ficsinfo{'board'}, @{$uciinfo{'pv' . $mpv}});
+ ++$mpv;
+ }
+ };
+ if ($@) {
+ return;
+ }
+
+ print "\e[H\e[2J"; # clear the screen
+ if (exists($uciid{'name'})) {
+ print "Analysis by $uciid{'name'}:\n\n";
+ } else {
+ print "Analysis:\n\n";
+ }