allow the option to have priorities above 1200

This commit is contained in:
Vítor Santos Costa
2015-12-15 08:38:56 +00:00
parent c6f1c328f8
commit edb6189512
13 changed files with 37 additions and 37 deletions

View File

@@ -446,9 +446,9 @@ static xarg *setReadEnv(Term opts, FEnv *fe, struct renv *re, int inp_stream) {
}
if (args[READ_PRIORITY].used) {
re->prio = IntegerOfTerm(args[READ_PRIORITY].tvalue);
if (re->prio > 1200) {
if (re->prio > GLOBAL_MaxPriority) {
Yap_Error(DOMAIN_ERROR_OPERATOR_PRIORITY, opts,
"max priority in Prolog is 1200, not %ld", re->prio);
"max priority in Prolog is %d, not %ld", GLOBAL_MaxPriority, re->prio);
}
} else {
re->prio = LOCAL_default_priority;