From stolz@i2.informatik.rwth-aachen.de  Wed Feb  5 05:10:31 2003
Return-Path: <stolz@i2.informatik.rwth-aachen.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5E93937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Feb 2003 05:10:31 -0800 (PST)
Received: from atlas.informatik.rwth-aachen.de (atlas.Informatik.RWTH-Aachen.DE [137.226.194.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0F72343FA7
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  5 Feb 2003 05:10:29 -0800 (PST)
	(envelope-from stolz@i2.informatik.rwth-aachen.de)
Received: from menelaos.informatik.rwth-aachen.de (menelaos.Informatik.RWTH-Aachen.DE [137.226.194.73])
	by atlas.informatik.rwth-aachen.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id h15DARW17730
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Feb 2003 14:10:27 +0100
Received: (from stolz@localhost)
	by menelaos.informatik.rwth-aachen.de (8.12.6/8.12.6/Submit) id h15DBgdJ074878;
	Wed, 5 Feb 2003 14:11:42 +0100 (CET)
	(envelope-from stolz)
Message-Id: <200302051311.h15DBgdJ074878@menelaos.informatik.rwth-aachen.de>
Date: Wed, 5 Feb 2003 14:11:42 +0100 (CET)
From: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
Reply-To: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] Teach /usr/bin/msgs difference between singular and plural
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47953
>Category:       bin
>Synopsis:       [patch] Teach /usr/bin/msgs difference between singular and plural
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mike
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 05 05:20:05 PST 2003
>Closed-Date:    Tue Feb 11 13:33:35 PST 2003
>Last-Modified:  Tue Feb 11 13:33:35 PST 2003
>Originator:     Volker Stolz
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Lehrstuhl fr Informatik II
>Environment:
System: FreeBSD menelaos.informatik.rwth-aachen.de 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Jan 23 16:45:31 CET 2003 root@menelaos.informatik.rwth-aachen.de:/usr/src/sys/compile/MENELAOS i386


>Description:
/usr/bin/msgs was asking me if I'd like to see "1 lines". No, I won't.
Simple fix to printf to remove this little bit of friction between OS
and user.
>How-To-Repeat:
- Setup msgs mechanism (yes, I actually use this!)
- mail msgs
   Subject: Test
   Foo
   .
- /usr/bin/msgs -> "(1 lines)"
>Fix:
Straight forward:
--- msgs/msgs.c.orig	Fri Jan 31 17:28:09 2003
+++ msgs/msgs.c	Wed Feb  5 13:58:40 2003
@@ -518,7 +518,7 @@
 
 		lct = linecnt(newmsg);
 		if (lct)
-			printf("(%d%slines) ", lct, seensubj? " " : " more ");
+			printf("(%d%sline%s) ", lct, seensubj? " " : " more ", (lct==1)? "" : "s");
 
 		if (hdrs) {
 			printf("\n-----\n");
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: mike 
State-Changed-When: Thu Feb 6 14:38:30 PST 2003 
State-Changed-Why:  
Committed to -current; MFC in 3 days. 


Responsible-Changed-From-To: freebsd-bugs->mike 
Responsible-Changed-By: mike 
Responsible-Changed-When: Thu Feb 6 14:38:30 PST 2003 
Responsible-Changed-Why:  
Over to me. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47953 
State-Changed-From-To: patched->closed 
State-Changed-By: mike 
State-Changed-When: Tue Feb 11 13:33:21 PST 2003 
State-Changed-Why:  
MFC completed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47953 
>Unformatted:
