X-Git-Url: https://code.th-h.de/?p=usenet%2Fusevote.git;a=blobdiff_plain;f=UVmenu.pm;fp=UVmenu.pm;h=486bb2c1efada9b78533539053f7c62731a3b0e6;hp=46eb7796957291da1e9c6eac7ca5f7183a6db492;hb=c1cc3954b44990c22aef40789195c4c4952cfca4;hpb=c9497882fb70672ae59fd5c5b955dc4fb4dab614 diff --git a/UVmenu.pm b/UVmenu.pm index 46eb779..486bb2c 100644 --- a/UVmenu.pm +++ b/UVmenu.pm @@ -69,6 +69,12 @@ sub menu { my $menucaption = UVmessage::get("MENU_CAPTION"); print "\n\n$menucaption\n"; print "=" x length($menucaption), "\n\n"; + + # don't print this option if called from uvcfv.pl + unless ($mailonly) { + print "(0) ", UVmessage::get("MENU_DIFF_BALLOT"), "\n"; + } + print "(1) ", UVmessage::get("MENU_SHOW_MAIL"), "\n\n", UVmessage::get("MENU_CHANGE_PROPERTIES"), "\n", "(2) ", UVmessage::get("MENU_ADDRESS"), " [$voter_addr]\n"; @@ -95,7 +101,14 @@ sub menu { # only accept 1, 2, i and w if called from uvcfv.pl next if ($mailonly && $input !~ /^[12iw]$/i); - if ($input eq '1') { + if ($input eq '0') { + # ignore SIGPIPE (Bug in more and less) + $SIG{PIPE} = 'IGNORE'; + open (DIFF, "|$config{diff} - $config{sampleballotfile} | $config{pager}"); + print DIFF $$body, "\n"; + close (DIFF); + + } elsif ($input eq '1') { system($config{clearcmd}); # ignore SIGPIPE (Bug in more and less) $SIG{PIPE} = 'IGNORE';