summaryrefslogtreecommitdiffstats
path: root/bin/sh/arith.y
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-12-14 06:20:03 +0000
committersteve <steve@FreeBSD.org>1996-12-14 06:20:03 +0000
commitc58aca035e2c61510b619368861598623eb95e52 (patch)
tree049d84189a59de29d49254b609a318b17ee59387 /bin/sh/arith.y
parenta958416f1b4a022c358b94db0b8e6bcc6cb54ee0 (diff)
downloadFreeBSD-src-c58aca035e2c61510b619368861598623eb95e52.zip
FreeBSD-src-c58aca035e2c61510b619368861598623eb95e52.tar.gz
Merge in NetBSD mods and -Wall cleaning.
Obtained from: NetBSD, me
Diffstat (limited to 'bin/sh/arith.y')
-rw-r--r--bin/sh/arith.y13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/sh/arith.y b/bin/sh/arith.y
index 0a08dc5..fe04ff1 100644
--- a/bin/sh/arith.y
+++ b/bin/sh/arith.y
@@ -1,4 +1,4 @@
-%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN
+%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN
%left ARITH_OR
%left ARITH_AND
@@ -39,12 +39,12 @@ expr: ARITH_LPAREN expr ARITH_RPAREN = { $$ = $2; }
| expr ARITH_DIV expr = {
if ($3 == 0)
yyerror("division by zero");
- $$ = $1 / $3;
+ $$ = $1 / $3;
}
| expr ARITH_REM expr = {
if ($3 == 0)
yyerror("division by zero");
- $$ = $1 % $3;
+ $$ = $1 % $3;
}
| ARITH_NOT expr = { $$ = !($2); }
| ARITH_BNOT expr = { $$ = ~($2); }
@@ -88,11 +88,11 @@ expr: ARITH_LPAREN expr ARITH_RPAREN = { $$ = $2; }
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: arith.y,v 1.2 1994/09/24 02:57:21 davidg Exp $
+ * $Id: arith.y,v 1.3 1996/09/01 10:19:38 peter Exp $
*/
#ifndef lint
-static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
+static char const sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
#endif /* not lint */
#include "shell.h"
@@ -101,10 +101,11 @@ static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
#include "memalloc.h"
char *arith_buf, *arith_startbuf;
+extern void arith_lex_reset();
int
arith(s)
- char *s;
+ char *s;
{
long result;
OpenPOWER on IntegriCloud