Skip to content

Commit

Permalink
Additional MaxTermSize related messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Davies committed Aug 12, 2018
1 parent 6ca4aca commit e494197
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sources/proces.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,7 +2593,7 @@ ComAct: if ( t < u ) do { *m++ = *t++; } while ( t < u );
*termout = WORDDIF(m,termout);
if ( (*termout)*((LONG)sizeof(WORD)) > AM.MaxTer ) {
MLOCK(ErrorMessageLock);
MesPrint("Term too complex during substitution. MaxTermSize of %l is too small",AM.MaxTer);
MesPrint("Term too complex during substitution: %l words. MaxTermSize of %l words is too small", *termout, AM.MaxTer/(LONG)sizeof(WORD) );
goto InsCall2;
}
AT.WorkPointer = coef;
Expand Down Expand Up @@ -5453,7 +5453,7 @@ WORD PolyFunMul(PHEAD WORD *term)
*AT.WorkPointer = n1 = WORDDIF(t,AT.WorkPointer);
if ( n1*((LONG)sizeof(WORD)) > AM.MaxTer ) {
MLOCK(ErrorMessageLock);
MesPrint("Term too complex. Maybe increasing MaxTermSize can help");
MesPrint("Term too complex: %d words. Maybe increasing MaxTermSize (%d words) can help", n1, AM.MaxTer/(LONG)sizeof(WORD) );
goto PolyCall2;
}
m = term; t = AT.WorkPointer;
Expand Down
7 changes: 6 additions & 1 deletion sources/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,12 @@ LONG EndSort(PHEAD WORD *buffer, int par)
to = buffer;
if ( to >= AT.WorkSpace && to < AT.WorkTop && to+j > AT.WorkTop )
goto WorkSpaceError;
if ( j > AM.MaxTer ) goto TooLarge;
if ( j > AM.MaxTer ) {
MLOCK(ErrorMessageLock);
MesPrint("Encountered term of size: %d words.", j/(LONG)sizeof(WORD) );
MUNLOCK(ErrorMessageLock);
goto TooLarge;
}
NCOPY(to,t,j);
}
}
Expand Down

0 comments on commit e494197

Please sign in to comment.