Date: Thu, 21 Feb 2013 19:08:45 GMT From: Glen Barber <gjb@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/176332: [patch] dc(1) - Properly handle '-h' argument Message-ID: <201302211908.r1LJ8jK1094064@red.freebsd.org> Resent-Message-ID: <201302211910.r1LJA1sS008558@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 176332
>Category: bin
>Synopsis: [patch] dc(1) - Properly handle '-h' argument
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 21 19:10:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Glen Barber
>Release: 10.0-CURRENT r246768
>Organization:
>Environment:
FreeBSD nucleus 10.0-CURRENT FreeBSD 10.0-CURRENT #60 r246768: Wed Feb 13 14:55:15 EST 2013 root@nucleus:/usr/obj/usr/src/sys/NUCLEUS amd64
>Description:
dc(1) manual page advertises '-h' and '--help' as valid arguments, however 'h' is not in the getopt_long() list.
gjb@nucleus:~ % dc -h
dc: invalid option -- h
usage: dc [-hVx] [-e expression] [file]
>How-To-Repeat:
>Fix:
Patch is attached.
Patch attached with submission follows:
Index: usr.bin/dc/dc.c
===================================================================
--- usr.bin/dc/dc.c (revision 247114)
+++ usr.bin/dc/dc.c (working copy)
@@ -84,7 +84,7 @@
bool extended_regs = false, preproc_done = false;
/* accept and ignore a single dash to be 4.4BSD dc(1) compatible */
- while ((ch = getopt_long(argc, argv, "e:f:Vx", long_options, NULL)) != -1) {
+ while ((ch = getopt_long(argc, argv, "e:f:hVx", long_options, NULL)) != -1) {
switch (ch) {
case 'e':
if (!preproc_done)
>Release-Note:
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302211908.r1LJ8jK1094064>
