mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.0.3
This commit is contained in:
20
codegen.c
20
codegen.c
@@ -19,8 +19,8 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* @(#) $Revision: 29.18 $
|
||||
* @(#) $Id: codegen.c,v 29.18 2006/06/03 22:47:28 chongo Exp $
|
||||
* @(#) $Revision: 29.20 $
|
||||
* @(#) $Id: codegen.c,v 29.20 2006/06/11 07:25:14 chongo Exp $
|
||||
* @(#) $Source: /usr/local/src/cmd/calc/RCS/codegen.c,v $
|
||||
*
|
||||
* Under source code control: 1990/02/15 01:48:13
|
||||
@@ -1953,7 +1953,8 @@ getreference(void)
|
||||
|
||||
switch(gettoken()) {
|
||||
case T_ANDAND:
|
||||
scanerror(T_NULL, "Non-variable operand for &");
|
||||
scanerror(T_NULL, "&& used as prefix operator");
|
||||
/*FALLTHRU*/
|
||||
case T_AND:
|
||||
type = getreference();
|
||||
addop(OP_PTR);
|
||||
@@ -2108,6 +2109,19 @@ getterm(void)
|
||||
type = getidexpr(TRUE, 0);
|
||||
break;
|
||||
|
||||
case T_MULT:
|
||||
(void) getterm();
|
||||
addop(OP_DEREF);
|
||||
type = 0;
|
||||
break;
|
||||
|
||||
case T_POWER: /* '**' or '^' */
|
||||
(void) getterm();
|
||||
addop(OP_DEREF);
|
||||
addop(OP_DEREF);
|
||||
type = 0;
|
||||
break;
|
||||
|
||||
case T_GLOBAL:
|
||||
if (gettoken() != T_SYMBOL) {
|
||||
scanerror(T_NULL, "Global id expected");
|
||||
|
Reference in New Issue
Block a user