summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-05-02 13:10:36 +0000
committerCameron Katri <me@cameronkatri.com>2021-05-05 14:38:04 -0400
commit2442661e769456700d67fac92056d18b3046633e (patch)
tree50be9404a948d97f41c8e55a59ebb5a6b3eb309c
parentccaf446a63995afde0c89b9c24ab8734e727bbf3 (diff)
downloadbsdgames-darwin-2442661e769456700d67fac92056d18b3046633e.tar.gz
bsdgames-darwin-2442661e769456700d67fac92056d18b3046633e.tar.zst
bsdgames-darwin-2442661e769456700d67fac92056d18b3046633e.zip
countmail: remove outdated comments
Using the shell builtin 'read' command was necessarily slow because it is specified to read a single byte at a time.
-rw-r--r--countmail/countmail25
1 files changed, 3 insertions, 22 deletions
diff --git a/countmail/countmail b/countmail/countmail
index 539cebf2..17537bed 100644
--- a/countmail/countmail
+++ b/countmail/countmail
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: countmail,v 1.7 2008/04/28 20:22:53 martin Exp $
+# $NetBSD: countmail,v 1.8 2021/05/02 13:10:36 rillig Exp $
#
# Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -30,29 +30,10 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-# Count the messages in your mailbox, using only POSIX shell builtins.
+# Count the messages in your mailbox.
#
-# Caveats:
-#
-# The read loop is horrendously slow on every implementation I've
-# tried. I suggest using from(1) and wc(1) instead, though these are
-# not shell builtins.
-
-# for krb.
-#set -- `from -t`
-#v=$3
-set -- `from 2>/dev/null |wc -l`
+set -- `from 2>/dev/null | wc -l`
v=$1
-#v=`from | wc -l`
-
-#v=0
-#exec 0</var/mail/$USER
-#while read line; do
-# case "$line" in
-# "From "*) v=$(($v + 1)) ;;
-# esac
-#done
-#exec 0<&-
set --
g=0