From 9306ee40880e21bb8bb85e7fe9a38b878f4e67af Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 13 Nov 2003 19:42:22 +0000 Subject: When using print, do not leave garbage on the dc stack. --- usr.bin/bc/bc.y | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'usr.bin/bc') diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y index 434ba262e02..b7646bdb5bb 100644 --- a/usr.bin/bc/bc.y +++ b/usr.bin/bc/bc.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: bc.y,v 1.17 2003/11/13 19:05:32 otto Exp $ */ +/* $OpenBSD: bc.y,v 1.18 2003/11/13 19:42:21 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek @@ -31,7 +31,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: bc.y,v 1.17 2003/11/13 19:05:32 otto Exp $"; +static const char rcsid[] = "$OpenBSD: bc.y,v 1.18 2003/11/13 19:42:21 otto Exp $"; #endif /* not lint */ #include @@ -656,13 +656,12 @@ print_expression_list print_expression : expression { - $$ = node($1, cs("dds.n"), END_NODE); + $$ = node($1, cs("ds.n"), END_NODE); } | STRING { char *p = escape($1); - $$ = node(cs("["), as(p), cs("]dn"), - END_NODE); + $$ = node(cs("["), as(p), cs("]n"), END_NODE); free(p); } %% -- cgit v1.2.3