2017-04-19  Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* bc/bc.c (yyparse): Typo fixed in string.

	* bc/main.c (use_quit) [READLINE]: Call rl_initialize.

	* doc/bc.1: Space characters at end of line removed.
	"\(en" used as a dash to indicate a range instead of "-".
	"\&" added after a full stop if it is not an end of sentence.
	"\e" used to print a backslash.
	"\," used when mixing roman and italic, "\/" used for italic and roman.
	Corrected hyphens used as minus signs.

	* doc/bc.texi: @var replced by @code where appropriate and other fixes.

	* doc/dc.1: Corrected hyphens used as minus signs.





diff -aprNU5 bc-1.07.1.orig/bc/bc.c bc-1.07.1/bc/bc.c
--- bc-1.07.1.orig/bc/bc.c	2017-04-08 00:20:22 +0200
+++ bc-1.07.1/bc/bc.c	2017-04-19 20:10:26 +0200
@@ -2060,11 +2060,11 @@ yyreduce:
 
   case 76:
 #line 470 "../../bc/bc.y" /* yacc.c:1646  */
     {
 			      if ((yyvsp[0].i_value) & EX_COMP)
-				ct_warn ("comparison in return expresion");
+				ct_warn ("comparison in return expression");
 			      if (!((yyvsp[0].i_value) & EX_PAREN))
 				ct_warn ("return expression requires parenthesis");
 			      if ((yyvsp[0].i_value) & EX_VOID)
 				yyerror("return requires non-void expression");
 			      if (cur_func == -1)
diff -aprNU5 bc-1.07.1.orig/bc/main.c bc-1.07.1/bc/main.c
--- bc-1.07.1.orig/bc/main.c	2017-04-08 00:20:02 +0200
+++ bc-1.07.1/bc/main.c	2017-04-19 22:27:42 +0200
@@ -351,8 +351,11 @@ use_quit (int sig)
   write (1, "\n(interrupt) use quit to exit.\n", 31);
   signal (SIGINT, use_quit);
   errno = save;
 #else
   write (1, "\n(interrupt) Exiting bc.\n", 26);
+#ifdef READLINE
+  rl_initialize (); /* Clear readline buffer */
+#endif
   bc_exit(0);
 #endif
 }
diff -aprNU5 bc-1.07.1.orig/doc/bc.1 bc-1.07.1/doc/bc.1
--- bc-1.07.1.orig/doc/bc.1	2017-04-08 00:13:02 +0200
+++ bc-1.07.1/doc/bc.1	2017-04-19 22:27:40 +0200
@@ -34,23 +34,23 @@ bc - An arbitrary precision calculator l
 .SH SYNTAX
 \fBbc\fR [ \fB-hlwsqv\fR ] [long-options] [ \fI file ...\fR ]
 .SH DESCRIPTION
 \fBbc\fR is a language that supports arbitrary precision numbers
 with interactive execution of statements.  There are some similarities
-in the syntax to the C programming language. 
+in the syntax to the C programming language.
 A standard math library is available by command line option.
 If requested, the math library is defined before processing any files.
 \fBbc\fR starts by processing code from all the files listed
 on the command line in the order listed.  After all files have been
 processed, \fBbc\fR reads from the standard input.  All code is
 executed as it is read.  (If a file contains a command to halt the
 processor, \fBbc\fR will never read from the standard input.)
 .PP
 This version of \fBbc\fR contains several extensions beyond
 traditional \fBbc\fR implementations and the POSIX draft standard.
-Command line options can cause these extensions to print a warning 
-or to be rejected.  This 
+Command line options can cause these extensions to print a warning
+or to be rejected.  This
 document describes the language accepted by this processor.
 Extensions will be identified as such.
 .SS OPTIONS
 .IP "-h, --help"
 Print the usage and exit.
@@ -85,17 +85,17 @@ point.  For example:
 .SS VARIABLES
 Numbers are stored in two types of variables, simple variables and
 arrays.  Both simple variables and array variables are named.  Names
 begin with a letter followed by any number of letters, digits and
 underscores.  All letters must be lower case.  (Full alpha-numeric
-names are an extension. In POSIX \fBbc\fR all names are a single
+names are an extension.  In POSIX \fBbc\fR all names are a single
 lower case letter.)  The type of variable is clear by the context
 because all array variable names will be followed by brackets ([]).
 .PP
 There are four special variables, \fBscale, ibase, obase,\fR and
 \fBlast\fR.  \fBscale\fR defines how some operations use digits after the
-decimal point.  The default value of \fBscale\fR is 0. \fBibase\fR
+decimal point.  The default value of \fBscale\fR is 0.  \fBibase\fR
 and \fBobase\fR define the conversion base for input and output
 numbers.  The default for both input and output is base 10.
 \fBlast\fR (an extension) is a variable that has the value of the last
 printed number.  These will be discussed in further detail where
 appropriate.  All of these variables may have values assigned to them
@@ -123,14 +123,14 @@ A simple expression is just a constant.
 into internal decimal numbers using the current input base, specified
 by the variable \fBibase\fR. (There is an exception in functions.)
 The legal values of \fBibase\fR are 2 through 36. (Bases greater than
 16 are an extension.) Assigning a value outside this range to
 \fBibase\fR will result in a value of 2 or 36.  Input numbers may
-contain the characters 0-9 and A-Z. (Note: They must be capitals.
+contain the characters 0\(en9 and A\(enZ. (Note: They must be capitals.
 Lower case letters are variable names.)  Single digit numbers always
 have the value of the digit regardless of the value of
-\fBibase\fR. (i.e. A = 10.)  For multi-digit numbers, \fBbc\fR changes
+\fBibase\fR. (i.e.\& A = 10.)  For multi-digit numbers, \fBbc\fR changes
 all input digits greater or equal to ibase to the value of
 \fBibase\fR-1.  This makes the number \fBZZZ\fR always be the largest
 3 digit number of the input base.
 .PP
 Full expressions are similar to many other high level languages.
@@ -147,11 +147,12 @@ A simple variable is just a
 .RS
 \fIname\fR
 .RE
 and an array variable is specified as
 .RS
-\fIname\fR[\fIexpr\fR]
+.\"\fIname\fR[\fIexpr\fR]
+.IR name [ expr ]
 .RE
 Unless specifically
 mentioned the scale of the result is the maximum scale of the
 expressions involved.
 .IP "- expr"
@@ -185,17 +186,17 @@ digits.  That result is used to compute
 maximum of \fBscale\fR+scale(b) and scale(a).  If \fBscale\fR is set
 to zero and both expressions are integers this expression is the
 integer remainder function.
 .IP "expr ^ expr"
 The result of the expression is the value of the first raised to the
-second. The second expression must be an integer.  (If the second
+second.  The second expression must be an integer.  (If the second
 expression is not an integer, a warning is generated and the
 expression is truncated to get an integer value.)  The scale of the
 result is \fBscale\fR if the exponent is negative.  If the exponent
 is positive the scale of the result is the minimum of the scale of the
 first expression times the value of the exponent and the maximum of
-\fBscale\fR and the scale of the first expression.  (e.g. scale(a^b)
+\fBscale\fR and the scale of the first expression.  (e.g.\& scale(a^b)
 = min(scale(a)*b, max( \fBscale,\fR scale(a))).)  It should be noted
 that expr^0 will always return the value of 1.
 .IP "( expr )"
 This alters the standard precedence to force the evaluation of the
 expression.
@@ -224,11 +225,11 @@ The result is 1 if expr1 is greater than
 The result is 1 if expr1 is equal to expr2.
 .IP "expr1 != expr2"
 The result is 1 if expr1 is not equal to expr2.
 .PP
 Boolean operations are also legal.  (POSIX \fBbc\fR does NOT have
-boolean operations). The result of all boolean operations are 0 and 1
+boolean operations).  The result of all boolean operations are 0 and 1
 (for false and true) as in relational expressions.  The boolean
 operators are:
 .IP "!expr"
 The result is 1 if expr is 0.
 .IP "expr && expr"
@@ -251,11 +252,11 @@ unary - operator, nonassociative
 ++ and -- operators, nonassociative
 .RE
 .fi
 .PP
 This precedence was chosen so that POSIX compliant \fBbc\fR programs
-will run correctly. This will cause the use of the relational and
+will run correctly.  This will cause the use of the relational and
 logical operators to have some unusual behavior when used with
 assignment expressions.  Consider the expression:
 .RS
 a = 3 < 5
 .RE
@@ -266,11 +267,11 @@ assign the value 3 to the variable "a" a
 best to use parenthesis when using relational and logical operators
 with the assignment operators.
 .PP
 There are a few more special expressions that are provided in \fBbc\fR.
 These have to do with user defined functions and standard
-functions.  They all appear as "\fIname\fB(\fIparameters\fB)\fR".
+functions.  They all appear as "\,\fIname\/\fB(\,\fIparameters\/\fB)\fR".
 See the section on functions for user defined functions.  The standard
 functions are:
 .IP "length ( expression )"
 The value of the length function is the number of significant digits in the
 expression.
@@ -279,11 +280,11 @@ The read function (an extension) will re
 input, regardless of where the function occurs.   Beware, this can
 cause problems with the mixing of data and program in the standard input.
 The best use for this function is in a previously written program that
 needs input from the user, but never allows program code to be input
 from the user.  The value of the read function is the number read from
-the standard input using the current value of the variable 
+the standard input using the current value of the variable
 \fBibase\fR for the conversion base.
 .IP "scale ( expression )"
 The value of the scale function is the number of digits after the decimal
 point in the expression.
 .IP "sqrt ( expression )"
@@ -310,11 +311,11 @@ This statement does one of two things.
 statement.  If the expression is not an assignment statement, the
 expression is evaluated and printed to the output.  After the number
 is printed, a newline is printed.  For example, "a=1" is an assignment
 statement and "(a=1)" is an expression that has an embedded
 assignment.  All numbers that are printed are printed in the base
-specified by the variable \fBobase\fR. The legal values for \fB
+specified by the variable \fBobase\fR.  The legal values for \fB
 obase\fR are 2 through BC_BASE_MAX.  (See the section LIMITS.)  For
 bases 2 through 16, the usual method of writing numbers is used.  For
 bases greater than 16, \fBbc\fR uses a multi-character digit method
 of printing the numbers where each higher base digit is printed as a
 base 10 number.  The multi-character digits are separated by spaces.
@@ -323,17 +324,17 @@ base ten value of "obase-1".  Since numb
 precision, some numbers may not be printable on a single output line.
 These long numbers will be split across lines using the "\e" as the
 last character on a line.  The maximum number of characters printed
 per line is 70.  Due to the interactive nature of \fBbc\fR, printing
 a number causes the side effect of assigning the printed value to the
-special variable \fBlast\fR. This allows the user to recover the
+special variable \fBlast\fR.  This allows the user to recover the
 last value printed without having to retype the expression that
 printed the number.  Assigning to \fBlast\fR is legal and will
 overwrite the last printed value with the assigned value.  The newly
 assigned value will remain until the next number is printed or another
-value is assigned to \fBlast\fR.  (Some installations may allow the 
-use of a single period (.) which is not part of a number as a short
+value is assigned to \fBlast\fR.  (Some installations may allow the
+use of a single period (.\&) which is not part of a number as a short
 hand notation for for \fBlast\fR.)
 .IP "string"
 The string is printed to the output.  Strings start with a double quote
 character and contain all characters until the next double quote character.
 All characters are take literally, including any newline.  No newline
@@ -341,17 +342,17 @@ character is printed after the string.
 .IP "\fBprint\fR list"
 The print statement (an extension) provides another method of output.
 The "list" is a list of strings and expressions separated by commas.
 Each string or expression is printed in the order of the list.  No
 terminating newline is printed.  Expressions are evaluated and their
-value is printed and assigned to the variable \fBlast\fR. Strings
+value is printed and assigned to the variable \fBlast\fR.  Strings
 in the print statement are printed to the output and may contain
 special characters.  Special characters start with the backslash
 character (\e).  The special characters recognized by \fBbc\fR are
 "a" (alert or bell), "b" (backspace), "f" (form feed), "n" (newline),
 "r" (carriage return), "q" (double quote), "t" (tab), and "\e" (backslash).
-Any other character following the backslash will be ignored.  
+Any other character following the backslash will be ignored.
 .IP "{ statement_list }"
 This is the compound statement.  It allows multiple statements to be
 grouped together for execution.
 .IP "\fBif\fR ( expression ) statement1 [\fBelse\fR statement2]"
 The if statement evaluates the expression and executes statement1 or
@@ -363,20 +364,20 @@ else clause is an extension.)
 The while statement will execute the statement while the expression
 is non-zero.  It evaluates the expression before each execution of
 the statement.   Termination of the loop is caused by a zero
 expression value or the execution of a break statement.
 .IP "\fBfor\fR ( [expression1] ; [expression2] ; [expression3] ) statement"
-The for statement controls repeated execution of the statement.  
+The for statement controls repeated execution of the statement.
 Expression1 is evaluated before the loop.  Expression2 is evaluated
 before each execution of the statement.  If it is non-zero, the statement
 is evaluated.  If it is zero, the loop is terminated.  After each
 execution of the statement, expression3 is evaluated before the reevaluation
 of expression2.  If expression1 or expression3 are missing, nothing is
 evaluated at the point they would be evaluated.
 If expression2 is missing, it is the same as substituting
 the value 1 for expression2.  (The optional expressions are an
-extension. POSIX \fBbc\fR requires all three expressions.)
+extension.  POSIX \fBbc\fR requires all three expressions.)
 The following is equivalent code for the for statement:
 .nf
 .RS
 expression1;
 while (expression2) {
@@ -387,21 +388,21 @@ while (expression2) {
 .fi
 .IP "\fBbreak\fR"
 This statement causes a forced exit of the most recent enclosing while
 statement or for statement.
 .IP "\fBcontinue\fR"
-The continue statement (an extension)  causes the most recent enclosing
+The continue statement (an extension) causes the most recent enclosing
 for statement to start the next iteration.
 .IP "\fBhalt\fR"
 The halt statement (an extension) is an executed statement that causes
 the \fBbc\fR processor to quit only when it is executed.  For example,
 "if (0 == 1) halt" will not cause \fBbc\fR to terminate because the halt is
 not executed.
 .IP "\fBreturn\fR"
 Return the value 0 from a function.  (See the section on functions.)
 .IP "\fBreturn\fR ( expression )"
-Return the value of the expression from a function.  (See the section on 
+Return the value of the expression from a function.  (See the section on
 functions.)  As an extension, the parenthesis are not required.
 .SS PSEUDO STATEMENTS
 These statements are not statements in the traditional sense.  They are
 not executed statements.  Their function is performed at "compile" time.
 .IP "\fBlimits\fR"
@@ -413,11 +414,11 @@ is terminated, regardless of where the q
 example, "if (0 == 1) quit" will cause \fBbc\fR to terminate.
 .IP "\fBwarranty\fR"
 Print a longer warranty notice.  This is an extension.
 .SS FUNCTIONS
 Functions provide a method of defining a computation that can be executed
-later.  Functions in 
+later.  Functions in
 .B bc
 always compute a value and return it to the caller.  Function definitions
 are "dynamic" in the sense that a function is undefined until a definition
 is encountered in the input.  That definition is then used until another
 definition function for the same name is encountered.  The new definition
@@ -427,17 +428,17 @@ then replaces the older definition.  A f
 \fBdefine \fIname \fB( \fIparameters \fB) { \fInewline
 \fI    auto_list   statement_list \fB}\fR
 .RE
 .fi
 A function call is just an expression of the form
-"\fIname\fB(\fIparameters\fB)\fR".
+"\,\fIname\/\fB(\,\fIparameters\/\fB)\fR".
 .PP
 Parameters are numbers or arrays (an extension).  In the function definition,
 zero or more parameters are defined by listing their names separated by
-commas.  All parameters are call by value parameters.  
+commas.  All parameters are call by value parameters.
 Arrays are specified in the parameter definition by
-the notation "\fIname\fB[]\fR".   In the function call, actual parameters
+the notation "\,\fIname\/\fB[]\fR".   In the function call, actual parameters
 are full expressions for number parameters.  The same notation is used
 for passing arrays as for defining array parameters.  The named array is
 passed by value to the function.  Since function definitions are dynamic,
 parameter numbers and types are checked when a function is called.  Any
 mismatch in number or types of parameters will cause a runtime error.
@@ -462,11 +463,11 @@ parameters are pushed onto a stack, \fBb
 .PP
 The function body is a list of \fBbc\fR statements.  Again, statements
 are separated by semicolons or newlines.  Return statements cause the
 termination of a function and the return of a value.  There are two
 versions of the return statement.  The first form, "\fBreturn\fR", returns
-the value 0 to the calling expression.  The second form, 
+the value 0 to the calling expression.  The second form,
 "\fBreturn ( \fIexpression \fB)\fR", computes the value of the expression
 and returns that value to the calling expression.  There is an implied
 "\fBreturn (0)\fR" at the end of every function.  This allows a function
 to terminate and return 0 without an explicit return statement.
 .PP
@@ -492,11 +493,11 @@ define d (n)
 \fR
 .RE
 .fi
 .PP
 Functions may be defined as \fBvoid\fR.  A void
-funtion returns no value and thus may not be used in any place that needs
+function returns no value and thus may not be used in any place that needs
 a value.  A void function does not produce any output when called by itself
 on an input line.  The key word \fBvoid\fR is placed between the key word
 \fBdefine\fR and the function name.  For example, consider the following
 session.
 .nf
@@ -518,43 +519,43 @@ the function.  Since the value of a func
 explicit return statement is zero, the zero is printed.  For \fBpx(1)\fR,
 no zero is printed because the function is a void function.
 .PP
 Also, call by variable for arrays was added.  To declare
 a call by variable array, the declaration of the array parameter in the
-function definition looks like "\fI*name\fB[]\fR".  The call to the
-function remains the same as call by value arrays. 
+function definition looks like "\,\fI*name\/\fB[]\fR".  The call to the
+function remains the same as call by value arrays.
 .SS MATH LIBRARY
 If \fBbc\fR is invoked with the \fB-l\fR option, a math library is preloaded
 and the default scale is set to 20.   The math functions will calculate their
-results to the scale set at the time of their call.  
+results to the scale set at the time of their call.
 The math library defines the following functions:
-.IP "s (\fIx\fR)"
+.IP "s (\,\fIx\/\fR)"
 The sine of x, x is in radians.
-.IP "c (\fIx\fR)"
+.IP "c (\,\fIx\/\fR)"
 The cosine of x, x is in radians.
-.IP "a (\fIx\fR)"
+.IP "a (\,\fIx\/\fR)"
 The arctangent of x, arctangent returns radians.
-.IP "l (\fIx\fR)"
+.IP "l (\,\fIx\/\fR)"
 The natural logarithm of x.
-.IP "e (\fIx\fR)"
+.IP "e (\,\fIx\/\fR)"
 The exponential function of raising e to the value x.
-.IP "j (\fIn,x\fR)"
+.IP "j (\,\fIn,x\/\fR)"
 The Bessel function of integer order n of x.
 .SS EXAMPLES
-In /bin/sh,  the following will assign the value of "pi" to the shell
+In /bin/sh, the following will assign the value of "pi" to the shell
 variable \fBpi\fR.
 .RS
-\f(CW
-pi=$(echo "scale=10; 4*a(1)" | bc -l)
+\fI
+pi=$(echo "scale=10; 4*a(1)" | bc \-l)
 \fR
 .RE
 .PP
 The following is the definition of the exponential function used in the
 math library.  This function is written in POSIX \fBbc\fR.
 .nf
 .RS
-\f(CW
+\fI
 scale = 20
 
 /* Uses the fact that e^x = (e^(x/2))^2
    When x is small enough, we use the series:
      e^x = 1 + x + x^2/2! + x^3/3! + ...
@@ -564,12 +565,12 @@ define e(x) {
   auto  a, d, e, f, i, m, v, z
 
   /* Check the sign of x. */
   if (x<0) {
     m = 1
-    x = -x
-  } 
+    x = \-x
+  }
 
   /* Precondition x. */
   z = scale;
   scale = 4 + z + .44*x;
   while (x > 1) {
@@ -597,15 +598,15 @@ define e(x) {
 .RE
 .fi
 .PP
 The following is code that uses the extended features of \fBbc\fR to
 implement a simple program for calculating checkbook balances.  This
-program is best kept in a file so that it can be used many times 
+program is best kept in a file so that it can be used many times
 without having to retype it at every use.
 .nf
 .RS
-\f(CW
+\fI
 scale=2
 print "\enCheck book program!\en"
 print "  Remember, deposits are negative transactions.\en"
 print "  Exit by a 0 transaction.\en\en"
 
@@ -614,22 +615,22 @@ bal /= 1
 print "\en"
 while (1) {
   "current balance = "; bal
   "transaction? "; trans = read()
   if (trans == 0) break;
-  bal -= trans
+  bal \-= trans
   bal /= 1
 }
 quit
 \fR
 .RE
 .fi
 .PP
 The following is the definition of the recursive factorial function.
 .nf
 .RS
-\f(CW
+\fI
 define f (x) {
   if (x <= 1) return (1);
   return (f(x-1) * x);
 }
 \fR
@@ -640,37 +641,37 @@ GNU \fBbc\fR can be compiled (via a conf
 \fBreadline\fR input editor library or the BSD \fBlibedit\fR library.
 This allows the user to do editing of lines before sending them
 to \fBbc\fR.  It also allows for a history of previous lines typed.
 When this option is selected, \fBbc\fR has one more special variable.
 This special variable, \fBhistory\fR is the number of lines of history
-retained.  For \fBreadline\fR, a value of -1 means that an unlimited
+retained.  For \fBreadline\fR, a value of \-1 means that an unlimited
 number of history lines are retained.  Setting the value of
 \fBhistory\fR to a positive number restricts the number of history
 lines to the number given.  The value of 0 disables the history
 feature.  The default value is 100. For more information, read the
 user manuals for the GNU \fBreadline\fR, \fBhistory\fR and BSD \fBlibedit\fR
 libraries.  One can not enable both \fBreadline\fR and \fBlibedit\fR
 at the same time.
 .SS DIFFERENCES
-This version of 
+This version of
 .B bc
 was implemented from the POSIX P1003.2/D11 draft and contains
 several differences and extensions relative to the draft and
 traditional implementations.
 It is not implemented in the traditional way using
 .I dc(1).
 This version is a single process which parses and runs a byte code
-translation of the program.  There is an "undocumented" option (-c)
+translation of the program.  There is an "undocumented" option (\-c)
 that causes the program to output the byte code to
 the standard output instead of running it.  It was mainly used for
 debugging the parser and preparing the math library.
 .PP
 A major source of differences is
 extensions, where a feature is extended to add more functionality and
-additions, where new features are added. 
+additions, where new features are added.
 The following is the list of differences and extensions.
-.IP "LANG environment"
+.IP "environment"
 This version does not conform to the POSIX standard in the processing
 of the LANG environment variable and all environment variables starting
 with LC_.
 .IP "names"
 Traditional and POSIX
@@ -681,11 +682,11 @@ may contain letters, numbers and the und
 .IP "Strings"
 Strings are not allowed to contain NUL characters.  POSIX says all characters
 must be included in strings.
 .IP "last"
 POSIX \fBbc\fR does not have a \fBlast\fR variable.  Some implementations
-of \fBbc\fR use the period (.) in a similar way.  
+of \fBbc\fR use the period (.\&) in a similar way.
 .IP "comparisons"
 POSIX \fBbc\fR allows comparisons only in the if statement, the while
 statement, and the second expression of the for statement.  Also, only
 one relational operation is allowed in each of those statements.
 .IP "if statement, else clause"
@@ -707,19 +708,19 @@ POSIX \fBbc\fR does not (currently) supp
 The POSIX grammar allows for arrays in function definitions, but does
 not provide a method to specify an array as an actual parameter.  (This
 is most likely an oversight in the grammar.)  Traditional implementations
 of \fBbc\fR have only call by value array parameters.
 .IP "function format"
-POSIX \fBbc\fR requires the opening brace on the same line as the 
+POSIX \fBbc\fR requires the opening brace on the same line as the
 \fBdefine\fR key word and the \fBauto\fR statement on the next line.
-.IP "=+, =-, =*, =/, =%, =^"
+.IP "=+, =\-, =*, =/, =%, =^"
 POSIX \fBbc\fR does not require these "old style" assignment operators to
 be defined.  This version may allow these "old style" assignments.  Use
 the limits statement to see if the installed version supports them.  If
 it does support the "old style" assignment operators, the statement
-"a =- 1" will decrement \fBa\fR by 1 instead of setting \fBa\fR to the
-value -1.
+"a =\- 1" will decrement \fBa\fR by 1 instead of setting \fBa\fR to the
+value \-1.
 .IP "spaces in numbers"
 Other implementations of \fBbc\fR allow spaces in numbers.  For example,
 "x=1 3" would assign the value 13 to the variable x.  The same statement
 would cause a syntax error in this version of \fBbc\fR.
 .IP "errors and execution"
@@ -730,11 +731,11 @@ recovery tries to find the beginning of
 parse the function.  Once a syntax error is found in the function, the
 function will not be callable and becomes undefined.
 Syntax errors in the interactive execution code will invalidate the
 current execution block.  The execution block is terminated by an
 end of line that appears after a complete sequence of statements.
-For example, 
+For example,
 .nf
 .RS
 a = 1
 b = 2
 .RE
@@ -760,11 +761,11 @@ remain defined and the value of all non-
 the point of interruption.  All auto variables and function parameters
 are removed during the
 clean up process.  During a non-interactive
 session, the SIGINT signal will terminate the entire run of \fBbc\fR.
 .SS LIMITS
-The following are the limits currently in place for this 
+The following are the limits currently in place for this
 .B bc
 processor.  Some of them may have been changed by an installation.
 Use the limits statement to see the actual values.
 .IP "BC_BASE_MAX"
 The maximum output base is currently set at 999.  The maximum input base
@@ -797,11 +798,11 @@ at every invocation of \fBbc\fR.  The fi
 variables would typically contain function definitions for functions
 the user wants defined every time \fBbc\fR is run.
 .IP "BC_LINE_LENGTH"
 This should be an integer specifying the number of characters in an
 output line for numbers. This includes the backslash and newline characters
-for long numbers.  As an extension, the value of zero disables the 
+for long numbers.  As an extension, the value of zero disables the
 multi-line feature.  Any other value of this variable that is less than
 3 sets the line length to 70.
 .SH DIAGNOSTICS
 If any file on the command line can not be opened, \fBbc\fR will report
 that the file is unavailable and terminate.  Also, there are compile
@@ -812,11 +813,11 @@ Error recovery is not very good yet.
 Email bug reports to
 .BR bug-bc@gnu.org .
 Be sure to include the word ``bc'' somewhere in the ``Subject:'' field.
 .SH AUTHOR
 .nf
-Philip A. Nelson
+Philip A.\& Nelson
 philnelson@acm.org
 .fi
 .SH ACKNOWLEDGEMENTS
 The author would like to thank Steve Sommars (Steve.Sommars@att.com) for
 his extensive help in testing the implementation.  Many great suggestions
diff -aprNU5 bc-1.07.1.orig/doc/bc.texi bc-1.07.1/doc/bc.texi
--- bc-1.07.1.orig/doc/bc.texi	2017-04-07 23:55:48 +0200
+++ bc-1.07.1/doc/bc.texi	2017-04-20 20:59:24 +0200
@@ -89,11 +89,11 @@ Bellingham, WA 98226-9062
 @end menu
 
 @node Description, Command Line Options, Introduction, Introduction
 @section Description
 
-@command{bc} [ -hlwsqv ] [long-options] [ @var{ file ...} ]
+bc [ -hlwsqv ] [long-options] [ @var{file ...} ]
 
 @command{bc} is a language that supports arbitrary precision numbers
 with interactive execution of statements.  There are some similarities
 in the syntax to the C programming language. 
 A standard math library is available by command line option.
@@ -176,16 +176,16 @@ begin with a letter followed by any numb
 underscores.  All letters must be lower case.  (Full alphanumeric
 names are an extension. In POSIX @command{bc} all names are a single
 lower case letter.)  The type of variable is clear by the context
 because all array variable names will be followed by brackets ( [ ] ).
 
-There are four special variables, @var{scale}, @var{ibase}, @var{obase}, and
-@var{last}.  @var{scale} defines how some operations use digits after the
-decimal point.  The default value of @var{scale} is 0. @var{ibase}
-and @var{obase} define the conversion base for input and output
+There are four special variables, @code{scale}, @code{ibase}, @code{obase}, and
+@code{last}.  @code{scale} defines how some operations use digits after the
+decimal point.  The default value of @code{scale} is 0. @code{ibase}
+and @code{obase} define the conversion base for input and output
 numbers.  The default for both input and output is base 10.
-@var{last} (an extension) is a variable that has the value of the last
+@code{last} (an extension) is a variable that has the value of the last
 printed number.  These will be discussed in further detail where
 appropriate.  All of these variables may have values assigned to them
 as well as used in expressions.
 
 @node Comments, , Variables, Basic Elements
@@ -224,28 +224,28 @@ are executed as soon as possible.  There
 code is executed as it is encountered.  (Functions, discussed in
 detail later, are defined when encountered.)
 
 A simple expression is just a constant. @command{bc} converts constants
 into internal decimal numbers using the current input base, specified by
-the variable @var{ibase}. (There is an exception in functions.)  The
-legal values of @var{ibase} are 2 through 36.  (Bases greater than
+the variable @code{ibase}. (There is an exception in functions.)  The
+legal values of @code{ibase} are 2 through 36.  (Bases greater than
 16 are an extension.)  Assigning a value outside
-this range to @var{ibase} will result in a value of 2 or 36.  Input
+this range to @code{ibase} will result in a value of 2 or 36.  Input
 numbers may contain the characters 0-9 and A-Z. (Note: They must be
 capitals.  Lower case letters are variable names.)  Single digit numbers
 always have the value of the digit regardless of the value of
-@var{ibase}. (i.e. A = 10.)  For multi-digit numbers, @command{bc}
-changes all input digits greater or equal to @var{ibase} to the value of
-@var{ibase}-1.  This makes the number @code{ZZZ} always be the largest
+@code{ibase}. (i.e. A = 10.)  For multi-digit numbers, @command{bc}
+changes all input digits greater or equal to @code{ibase} to the value of
+@code{ibase}-1.  This makes the number @code{ZZZ} always be the largest
 3 digit number of the input base.
 
 Full expressions are similar to many other high level languages.
 Since there is only one kind of number, there are no rules for mixing
 types.  Instead, there are rules on the scale of expressions.  Every
 expression has a scale.  This is derived from the scale of original
 numbers, the operation performed and in many cases, the value of the
-variable @var{scale}. Legal values of the variable @var{scale} are
+variable @code{scale}. Legal values of the variable @code{scale} are
 0 to the maximum number representable by a C integer.
 
 @node Basic Expressions, Relational Expressions, About Expressions and Special Variables, Expressions
 @section Basic Expressions
 
@@ -465,49 +465,49 @@ character.  The sequence "\<nl>", where
 series of statements separated by semicolons and newlines.  The
 following is a list of @command{bc} statements and what they do: (Things
 enclosed in brackets ( [ ] ) are optional parts of the statement.)
 
 @table @code
-@item @var{expression}
+@item expression
 This statement does one of two things.  If the expression starts with
 "<variable> <assignment> ...", it is considered to be an assignment
 statement.  If the expression is not an assignment statement, the
 expression is evaluated and printed to the output.  After the number is
 printed, a newline is printed.  For example, "a=1" is an assignment
 statement and "(a=1)" is an expression that has an embedded assignment.
 All numbers that are printed are printed in the base specified by the
-variable @var{obase}. The legal values for @var{obase} are 2 through
+variable @code{obase}. The legal values for @code{obase} are 2 through
 BC_BASE_MAX (@pxref{Environment Variables}).  For bases 2 through 16,
 the usual method of writing numbers is used.  For bases greater than 16,
 @command{bc} uses a multi-character digit method of printing the numbers
 where each higher base digit is printed as a base 10 number.  The
 multi-character digits are separated by spaces.  Each digit contains the
 number of characters required to represent the base ten value of
-"@var{obase} -1".  Since numbers are of arbitrary precision, some
+"@code{obase} -1".  Since numbers are of arbitrary precision, some
 numbers may not be printable on a single output line.  These long
 numbers will be split across lines using the "\" as the last character
 on a line.  The maximum number of characters printed per line is 70.
 Due to the interactive nature of @command{bc}, printing a number causes
 the side effect of assigning the printed value to the special variable
-@var{last}. This allows the user to recover the last value printed
+@code{last}. This allows the user to recover the last value printed
 without having to retype the expression that printed the number.
-Assigning to @var{last} is legal and will overwrite the last printed
+Assigning to @code{last} is legal and will overwrite the last printed
 value with the assigned value.  The newly assigned value will remain
 until the next number is printed or another value is assigned to
-@var{last}.  (Some installations may allow the use of a single period
+@code{last}.  (Some installations may allow the use of a single period
 (.) which is not part of a number as a short hand notation for for
-@var{last}.)
+@code{last}.)
 
-@item @var{string}
+@item string
 The string is printed to the output.  Strings start with a double quote
 character and contain all characters until the next double quote character.
 All characters are taken literally, including any newline.  No newline
 character is printed after the string.
 
-@item print @var{list}
+@item print list
 The @code{print} statement (an extension) provides another method of
-output.  The @var{list} is a list of strings and expressions separated by
+output.  The @code{list} is a list of strings and expressions separated by
 commas.  Each string or expression is printed in the order of the list.
 No terminating newline is printed.  Expressions are evaluated and their
 value is printed and assigned to the variable @code{last}. Strings in
 the print statement are printed to the output and may contain special
 characters.  Special characters start with the backslash character (\e).
@@ -658,16 +658,16 @@ the value 0 to the calling expression.
 "@code{return} ( @var{expression} )", computes the value of the expression
 and returns that value to the calling expression.  There is an implied
 "@code{return} (0)" at the end of every function.  This allows a function
 to terminate and return 0 without an explicit @code{return} statement.
 
-Functions also change the usage of the variable @var{ibase}.  All
+Functions also change the usage of the variable @code{ibase}.  All
 constants in the function body will be converted using the value of
-@var{ibase} at the time of the function call.  Changes of @var{ibase}
+@code{ibase} at the time of the function call.  Changes of @code{ibase}
 will be ignored during the execution of the function except for the
 standard function @code{read}, which will always use the current value
-of @var{ibase} for conversion of numbers.
+of @code{ibase} for conversion of numbers.
 
 Several extensions have been added to functions.  First, the format of
 the definition has been slightly relaxed.  The standard requires the
 opening brace be on the same line as the @code{define} keyword and all
 other parts must be on following lines.  This version of @command{bc}
@@ -710,39 +710,39 @@ to the function remains the same as call
 
 @node Math Library Functions, , Functions, Functions
 @section Math Library Functions
 
 If @command{bc} is invoked with the @code{-l} option, a math library is
-preloaded and the default @var{scale} is set to 20.  The math functions will
+preloaded and the default @code{scale} is set to 20.  The math functions will
 calculate their results to the scale set at the time of their call.  The
 math library defines the following functions:
 
 @table @code
-@item s (@var{x})
-The sine of @var{x}, @var{x} is in radians.
+@item s (x)
+The sine of @code{x}, @code{x} is in radians.
 
-@item c (@var{x})
-The cosine of @var{x}, @var{x} is in radians.
+@item c (x)
+The cosine of @code{x}, @code{x} is in radians.
 
-@item a (@var{x})
-The arctangent of @var{x}, arctangent returns radians.
+@item a (x)
+The arctangent of @code{x}, arctangent returns radians.
 
-@item l (@var{x})
-The natural logarithm of @var{x}.
+@item l (x)
+The natural logarithm of @code{x}.
 
-@item e (@var{x})
-The exponential function of raising @var{e} to the value @var{x}.
+@item e (x)
+The exponential function of raising @code{e} to the value @code{x}.
 
-@item j (@var{n}, @var{x})
-The Bessel function of integer order @var{n} of @var{x}.
+@item j (n, x)
+The Bessel function of integer order @code{n} of @code{x}.
 @end table
 
 @node Examples, Readline and Libedit Options, Functions, Top
 @chapter Examples
 
 In /bin/sh,  the following will assign the value of "pi" to the shell
-variable @var{pi}.
+variable @code{pi}.
 @example
 
 pi=$(echo "scale=10; 4*a(1)" | bc -l)
 
 @end example
@@ -867,11 +867,11 @@ A major source of differences is extensi
 to add more functionality and additions, where new features are added.
 The following is the list of differences and extensions.
 
 @table @asis
 
-@item LANG environment
+@item environment
 This version does not conform to the POSIX standard in the processing
 of the LANG environment variable and all environment variables starting
 with LC_.
 
 @item names
diff -aprNU5 bc-1.07.1.orig/doc/dc.1 bc-1.07.1/doc/dc.1
--- bc-1.07.1.orig/doc/dc.1	2016-12-14 01:24:40 +0100
+++ bc-1.07.1/doc/dc.1	2017-04-19 22:12:32 +0200
@@ -15,13 +15,13 @@
 .ds dc \fIdc\fP
 .ds Dc \fIdc\fP
 .SH NAME
 dc \- an arbitrary precision calculator
 .SH SYNOPSIS
-dc [-V] [--version] [-h] [--help]
-   [-e scriptexpression] [--expression=scriptexpression]
-   [-f scriptfile] [--file=scriptfile]
+dc [\-V] [\-\-version] [\-h] [\-\-help]
+   [\-e scriptexpression] [\-\-expression=scriptexpression]
+   [\-f scriptfile] [\-\-file=scriptfile]
    [file ...]
 .SH DESCRIPTION
 .PP
 \*(Dc is a reverse-polish desk calculator which supports
 unlimited precision arithmetic.
