Module Name: src
Committed By: rillig
Date: Sun May 2 13:10:36 UTC 2021
Modified Files:
src/games/countmail: countmail
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/countmail/countmail
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/countmail/countmail
diff -u src/games/countmail/countmail:1.7 src/games/countmail/countmail:1.8
--- src/games/countmail/countmail:1.7 Mon Apr 28 20:22:53 2008
+++ src/games/countmail/countmail Sun May 2 13:10:36 2021
@@ -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