be less enthusiastsis about writing (op).

This commit is contained in:
Vitor Santos Costa
2010-02-26 14:14:10 +00:00
parent b4481ca98c
commit 5778730b62
3 changed files with 19 additions and 2 deletions

View File

@@ -2960,6 +2960,22 @@ Yap_IsOp(Atom at)
return (!EndOfPAEntr(op));
}
int
Yap_IsOpMaxPrio(Atom at)
{
OpEntry *op = NextOp(RepOpProp((Prop)(RepAtom(at)->PropsOfAE)));
int max;
if (EndOfPAEntr(op))
return 0;
max = (op->Prefix & 0xfff);
if ((op->Infix & 0xfff) > max)
max = op->Infix & 0xfff;
if ((op->Posfix & 0xfff) > max)
max = op->Posfix & 0xfff;
return max;
}
static Int
unify_op(OpEntry *op)
{