Some new commands and improvements

This commit is contained in:
ceriel
1990-09-20 17:51:14 +00:00
parent b68cb52de6
commit 76f1cf30ee
17 changed files with 298 additions and 41 deletions

View File

@@ -307,6 +307,23 @@ do_deref(p, pbuf, psize, ptp)
return 0;
}
static int
do_addr(p, pbuf, psize, ptp)
p_tree p;
char **pbuf;
long *psize;
p_type *ptp;
{
t_addr addr;
if (eval_desig(p->t_args[0], &addr, psize, ptp)) {
*pbuf = Malloc((unsigned) pointer_size);
put_int(*pbuf, pointer_size, (long) addr);
return 1;
}
return 0;
}
static int
do_unmin(p, pbuf, psize, ptp)
p_tree p;
@@ -370,7 +387,7 @@ static int (*un_op[])() = {
0,
do_unplus,
do_unmin,
do_deref,
0,
0,
0,
0,
@@ -383,7 +400,9 @@ static int (*un_op[])() = {
0,
do_bnot,
0,
0
0,
0,
do_addr
};
static p_type
@@ -961,8 +980,10 @@ static int (*bin_op[])() = {
do_arith,
do_arith,
0,
0,
do_sft,
do_sft
do_sft,
0
};
int