Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/countmail countmail: remove outdated comments
details: https://anonhg.NetBSD.org/src/rev/30a50f6b0b8a
branches: trunk
changeset: 378978:30a50f6b0b8a
user: rillig <rillig%NetBSD.org@localhost>
date: Sun May 02 13:10:36 2021 +0000
description:
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.
diffstat:
games/countmail/countmail | 25 +++----------------------
1 files changed, 3 insertions(+), 22 deletions(-)
diffs (42 lines):
diff -r 31bb039dcb04 -r 30a50f6b0b8a games/countmail/countmail
--- a/games/countmail/countmail Sun May 02 12:50:43 2021 +0000
+++ b/games/countmail/countmail Sun May 02 13:10:36 2021 +0000
@@ -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.
-#
-# Caveats:
+# Count the messages in your mailbox.
#
-# 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
Home |
Main Index |
Thread Index |
Old Index