From owner-freebsd-standards Fri Mar 1 0:33:26 2002 Delivered-To: freebsd-standards@freebsd.org Received: from marvin.idsi.net (66-168-58-99.jvl.wi.charter.com [66.168.58.99]) by hub.freebsd.org (Postfix) with ESMTP id 1599B37B402 for ; Fri, 1 Mar 2002 00:33:19 -0800 (PST) Received: from marvin.idsi.net (localhost [127.0.0.1]) by marvin.idsi.net (8.12.2/8.12.2) with ESMTP id g218Wt0M039490 for ; Fri, 1 Mar 2002 02:32:58 -0600 (CST) (envelope-from mkm@marvin.idsi.net) Received: (from mkm@localhost) by marvin.idsi.net (8.12.2/8.12.2/Submit) id g218WtKD039489 for freebsd-standards@freebsd.org; Fri, 1 Mar 2002 02:32:55 -0600 (CST) Date: Fri, 1 Mar 2002 02:32:55 -0600 From: Kyle Martin To: freebsd-standards@freebsd.org Subject: wc(1) patch for review Message-ID: <20020301023255.A39275@marvin.idsi.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG heres a patch to take care of wc's -m argument, option, which evedently is the same as -c. i left -c in their but it could easily be taken out diff -U 5 /usr/src/usr.bin/wc/wc.1 wc/wc.1 --- wc/wc.1.old Wed Aug 15 04:09:45 2001 +++ wc/wc.1 Thu Feb 28 05:16:29 2002 @@ -41,11 +41,11 @@ .Sh NAME .Nm wc .Nd word, line, and byte count .Sh SYNOPSIS .Nm -.Op Fl clw +.Op Fl clmw .Op Ar .Sh DESCRIPTION The .Nm utility displays the number of lines, words, and bytes contained in each @@ -68,10 +68,13 @@ .It Fl c The number of bytes in each input file is written to the standard output. .It Fl l The number of lines in each input file +is written to the standard output. +.It Fl m +The number of bytes in each input file is written to the standard output. .It Fl w The number of words in each input file is written to the standard output. .El diff -U 5 /usr/src/usr.bin/wc/wc.c wc/wc.c --- wc/wc.c.old Tue Dec 11 16:23:53 2001 +++ wc/wc.c Thu Feb 28 05:11:05 2002 @@ -70,19 +70,22 @@ { int ch, errors, total; (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "lwc")) != -1) + while ((ch = getopt(argc, argv, "lwcm")) != -1) switch((char)ch) { case 'l': doline = 1; break; case 'w': doword = 1; break; case 'c': + dochar = 1; + break; + case 'm': dochar = 1; break; case '?': default: usage(); -- Kyle Martin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message