]> diplodocus.org Git - minc/commitdiff
(kill_spam): Display progress report since this can be a lengthy
authorepg <>
Sun, 25 Aug 2002 20:26:27 +0000 (20:26 +0000)
committerepg <>
Sun, 25 Aug 2002 20:26:27 +0000 (20:26 +0000)
operation with no output otherwise.

minc

diff --git a/minc b/minc
index 4fc8582..49b9afe 100755 (executable)
--- a/minc
+++ b/minc
@@ -391,16 +391,22 @@ sub kill_spam {
     my @msglist = @_;
     my @result;
     my $msg;
+    my $i;
 
     @result = ();
 
+    $i = 0;
     foreach $msg (@msglist) {
+        printf('%sChecking for spam... %6d/%d',
+               "\r", ++$i, scalar(@msglist));
         if (is_spam($msg)) {
+            print(" SPAM\n");
             store_message($msg, 'SPAM');
         } else {
             push(@result, $msg);
         }
     }
+    print("\nDone: ", scalar(@result), "\n");
 
     return @result;
 }