summaryrefslogtreecommitdiffstats
path: root/usr.bin/bc
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2010-01-22 23:35:06 +0000
committerdelphij <delphij@FreeBSD.org>2010-01-22 23:35:06 +0000
commit737c980d8c4ca05ce793a19b3ea15819f83ce83e (patch)
tree57967fc6e94764e54934f7dc4c451b91e5591f8b /usr.bin/bc
parent648854da4d73ee19e941de36522c00626473f2b5 (diff)
downloadFreeBSD-src-737c980d8c4ca05ce793a19b3ea15819f83ce83e.zip
FreeBSD-src-737c980d8c4ca05ce793a19b3ea15819f83ce83e.tar.gz
- Remove --debug option and intentionally undocument -d, which is only
kept for compatibility with 4.4BSD behavior. - Sync SYNOPSIS with usage(). - Use an alternative way to represent short and long options which have same semantics. Reviewed by: gabor
Diffstat (limited to 'usr.bin/bc')
-rw-r--r--usr.bin/bc/bc.122
-rw-r--r--usr.bin/bc/bc.y3
2 files changed, 10 insertions, 15 deletions
diff --git a/usr.bin/bc/bc.1 b/usr.bin/bc/bc.1
index a623b9c..8fe21c6 100644
--- a/usr.bin/bc/bc.1
+++ b/usr.bin/bc/bc.1
@@ -35,7 +35,7 @@
.\"
.\" @(#)bc.1 6.8 (Berkeley) 8/8/91
.\"
-.Dd May 31 2007
+.Dd January 22, 2010
.Dt BC 1
.Os
.Sh NAME
@@ -43,7 +43,7 @@
.Nd arbitrary-precision arithmetic language and calculator
.Sh SYNOPSIS
.Nm bc
-.Op Fl cl
+.Op Fl chlqv
.Op Fl e Ar expression
.Op Ar file ...
.Sh DESCRIPTION
@@ -56,8 +56,6 @@ any files given, then reads the standard input.
Options available:
.Bl -tag -width Ds
.It Fl c
-.It Fl d
-.It Fl Fl debug
.Nm
is actually a preprocessor for
.Xr dc 1 ,
@@ -71,24 +69,22 @@ instructions are sent to the standard output,
instead of being interpreted by a running
.Xr dc 1
process.
-.It Fl e Ar exp
-.It Fl Fl expression Ar exp
+.It Fl e Ar expression , Fl Fl expression Ar expression
Evaluate
.Ar expression .
If multiple
.Fl e
options are specified, they are processed in the order given,
separated by newlines.
-.It Fl h
-.It Fl Fl help
+.It Fl h , Fl Fl help
Prints usage information.
-.It Fl l
-.It Fl Fl mathlib
+.It Fl l , Fl Fl mathlib
Allow specification of an arbitrary precision math library.
The definitions in the library are available to command line
expressions.
-.It Fl v
-.It Fl Fl version
+Synonym for
+.Fl l .
+.It Fl v , Fl Fl version
Prints version information.
.El
.Pp
@@ -373,7 +369,7 @@ are extensions to that specification.
.Sh HISTORY
The
.Nm
-first command appeared in
+command first appeared in
.At v6 .
A complete rewrite of the
.Nm
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y
index 6492168..e6393b9 100644
--- a/usr.bin/bc/bc.y
+++ b/usr.bin/bc/bc.y
@@ -129,7 +129,6 @@ extern char *__progname;
const struct option long_options[] =
{
- {"debug", no_argument, NULL, 'd'},
{"expression", required_argument, NULL, 'e'},
{"help", no_argument, NULL, 'h'},
{"mathlib", no_argument, NULL, 'l'},
@@ -1014,7 +1013,7 @@ init(void)
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-cdhlqv] [-e expression] [file ...]\n",
+ fprintf(stderr, "usage: %s [-chlqv] [-e expression] [file ...]\n",
__progname);
exit(1);
}
OpenPOWER on IntegriCloud