Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions sources/argument.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,12 @@ ScaledVariety:;
break;
}
else {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("Unknown fast notation found (TYPEARGTOEXTRASYMBOL)");
MesPrint("!>Unknown fast notation found (TYPEARGTOEXTRASYMBOL)");
MUNLOCK(ErrorMessageLock);
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
}
n = FindSubexpression(tmp);
Expand Down Expand Up @@ -2004,8 +2006,10 @@ int ArgumentExplode(PHEAD WORD *term, WORD *thelist)
if ( i > 1 ) {
TooMany: old = AN.currentTerm;
AN.currentTerm = term;
MLOCK(ErrorMessageLock);
MesPrint("Too many arguments in output of ArgExplode");
MesPrint("Term = %t");
MUNLOCK(ErrorMessageLock);
AN.currentTerm = old;
return(-1);
}
Expand Down Expand Up @@ -2231,7 +2235,9 @@ int ArgFactorize(PHEAD WORD *argin, WORD *argout)
t += *t;
}
if ( sumcommu > 1 ) {
MLOCK(ErrorMessageLock);
MesPrint("ERROR: Cannot factorize an argument with more than one noncommuting object");
MUNLOCK(ErrorMessageLock);
Terminate(-1);
}
}
Expand Down Expand Up @@ -3294,11 +3300,15 @@ nextterm: mm = mnext;
if ( argin2 != argin ) TermFree(argin2,"TakeArgContent2");
return(argfree);
Irreg:
MesPrint("Irregularity while sorting argument in TakeArgContent");
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("!>Irregularity while sorting argument in TakeArgContent");
MUNLOCK(ErrorMessageLock);
if ( argin3 != argin2 ) TermFree(argin3,"TakeArgContent3");
if ( argin2 != argin ) TermFree(argin2,"TakeArgContent2");
Terminate(-1);
return(0);
/* INTERNAL_ERROR_EXCL_STOP */
}

/*
Expand Down
12 changes: 9 additions & 3 deletions sources/comexpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ int DoExpr(UBYTE *inp, int type, int par)
AC.ProtoType[1] = osize;
AC.ProtoType[2] = i;
if ( PutOut(BHEAD OldWork+2,&pos,AR.outfile,0) < 0 ) {
MesPrint("&Cannot create expression");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Cannot create expression");
error = -1;
/* INTERNAL_ERROR_EXCL_STOP */
}
else {
Expressions[j].sizeprototype = OldWork[2];
Expand All @@ -270,8 +272,10 @@ int DoExpr(UBYTE *inp, int type, int par)
OldWork[SUBEXPSIZE+6] = 0;
if ( PutOut(BHEAD OldWork+2,&pos,AR.outfile,0) < 0
|| FlushOut(&pos,AR.outfile,0) ) {
MesPrint("&Cannot create expression");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Cannot create expression");
error = -1;
/* INTERNAL_ERROR_EXCL_STOP */
}
AR.outfile->POfull = AR.outfile->POfill;
}
Expand Down Expand Up @@ -1472,9 +1476,11 @@ int CoFillExpression(UBYTE *inp)
SeekFile(fi->handle,&oldposition,SEEK_CUR);
SetScratch(fi,&(Expressions[expnum].onfile));
if ( ISNEGPOS(Expressions[expnum].onfile) ) {
MesPrint("&File error in FillExpression");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>File error in FillExpression");
BACKINOUT
goto noway;
/* INTERNAL_ERROR_EXCL_STOP */
}
}
else {
Expand Down
4 changes: 3 additions & 1 deletion sources/compcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,10 @@ int CoDelete(UBYTE *s)
int error = 0;
if ( StrICmp(s,(UBYTE *)"storage") == 0 ) {
if ( DeleteStore(1) < 0 ) {
MesPrint("&Cannot restart storage file");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Cannot restart storage file");
error = 1;
/* INTERNAL_ERROR_EXCL_STOP */
}
}
else {
Expand Down
36 changes: 27 additions & 9 deletions sources/compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,11 @@ doexpr: s += 2;
#endif
*/
if ( ( renumber = GetTable(x2,&position,0) ) == 0 ) {
/* INTERNAL_ERROR_EXCL_START */
error = 1;
MesPrint("&Problems getting information about stored expression %s(1)"
MesPrint("!>Problems getting information about stored expression %s(1)"
,EXPRNAME(x2));
/* INTERNAL_ERROR_EXCL_STOP */
}
if ( renumber->symb.lo != AN.dummyrenumlist )
M_free(renumber->symb.lo,"VarSpace");
Expand Down Expand Up @@ -1372,9 +1374,11 @@ dofunction: firstsumarg = 1;
#endif
*/
if ( ( renumber = GetTable(x2,&position,0) ) == 0 ) {
/* INTERNAL_ERROR_EXCL_START */
error = 1;
MesPrint("&Problems getting information about stored expression %s(2)"
MesPrint("!>Problems getting information about stored expression %s(2)"
,EXPRNAME(x2));
/* INTERNAL_ERROR_EXCL_STOP */
}
if ( renumber->symb.lo != AN.dummyrenumlist )
M_free(renumber->symb.lo,"VarSpace");
Expand Down Expand Up @@ -1445,9 +1449,11 @@ dofunction: firstsumarg = 1;
case TNUMBER1:
*t++ = -SNUMBER; *t++ = x2; break;
default:
MesPrint("&Internal error 435");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal error 435");
error = 1;
*t++ = -SYMBOL; *t++ = x2; break;
/* INTERNAL_ERROR_EXCL_STOP */
}
break;
case TSUBEXP:
Expand Down Expand Up @@ -1610,9 +1616,11 @@ dofunction: firstsumarg = 1;
case TNUMBER1:
*t++ = SNUMBER; *t++ = 4; *t++ = x2; *t++ = 1; break;
default:
MesPrint("&Internal error 435");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal error 435");
error = 1;
*t++ = SYMBOL; *t++ = 4; *t++ = x2; *t++ = 1; break;
/* INTERNAL_ERROR_EXCL_STOP */
}
break;
default:
Expand Down Expand Up @@ -1658,9 +1666,11 @@ dofunction: firstsumarg = 1;
#endif
*/
if ( ( renumber = GetTable(x1,&position,0) ) == 0 ) {
/* INTERNAL_ERROR_EXCL_START */
error = 1;
MesPrint("&Problems getting information about stored expression %s(3)"
MesPrint("!>Problems getting information about stored expression %s(3)"
,EXPRNAME(x1));
/* INTERNAL_ERROR_EXCL_STOP */
}
if ( renumber->symb.lo != AN.dummyrenumlist )
M_free(renumber->symb.lo,"VarSpace");
Expand All @@ -1676,8 +1686,10 @@ dofunction: firstsumarg = 1;
*/
s++;
if ( *s != TSUBEXP ) {
MesPrint("&Internal error 23");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal error 23");
Terminate(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
s++; x2 = 0; while ( *s >= 0 ) { x2 = 128*x2 + *s++; }
r = cbuf[subexpbuffers[x2].buffernum].rhs[subexpbuffers[x2].subexpnum];
Expand All @@ -1689,8 +1701,10 @@ dofunction: firstsumarg = 1;
error = -1;
}
if ( *s != RBRACE ) {
MesPrint("&Internal error 23b");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal error 23b");
Terminate(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
s++;
}
Expand Down Expand Up @@ -2156,8 +2170,10 @@ int CodeFactors(SBYTE *tokens)
tt++;
}
if ( *tt != TNUMBER ) {
MesPrint("Internal problems(1) in CodeFactors");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal problems(1) in CodeFactors");
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
tt++; x2 = 0; while ( *tt >= 0 ) { x2 = 100*x2 + *tt++; }
/*
Expand Down Expand Up @@ -2207,8 +2223,10 @@ int CodeFactors(SBYTE *tokens)
tt++;
}
if ( *tt != TNUMBER ) {
MesPrint("Internal problems(2) in CodeFactors");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>Internal problems(2) in CodeFactors");
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
tt++; x2 = 0; while ( *tt >= 0 ) { x2 = 100*x2 + *tt++; }
/*
Expand Down
42 changes: 30 additions & 12 deletions sources/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ int SetupOutputGZIP(FILEHANDLE *f)
6: Initiate the deflation
*/
if ( deflateInit(f->zsp,AR.gzipCompress) != Z_OK ) {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("Error from zlib: %s",f->zsp->msg);
MesPrint("!>Error from zlib: %s",f->zsp->msg);
MesCall("SetupOutputGZIP");
MUNLOCK(ErrorMessageLock);
Terminate(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}

return(0);
Expand Down Expand Up @@ -210,16 +212,20 @@ int PutOutputGZIP(FILEHANDLE *f)
return(0);
}
else {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%w avail_in = %d, avail_out = %d.",f->zsp->avail_in,f->zsp->avail_out);
MesPrint("!>%w avail_in = %d, avail_out = %d.",f->zsp->avail_in,f->zsp->avail_out);
MUNLOCK(ErrorMessageLock);
break;
/* INTERNAL_ERROR_EXCL_STOP */
}
}
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%wError in gzip handling of output. zerror = %d",zerror);
MesPrint("!>%wError in gzip handling of output. zerror = %d",zerror);
MUNLOCK(ErrorMessageLock);
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}

/*
Expand Down Expand Up @@ -350,21 +356,23 @@ int FlushOutputGZIP(FILEHANDLE *f)
f->zsp->avail_out = f->ziosize;
f->zsp->total_out = 0;
if ( ( zerror = deflateEnd(f->zsp) ) == Z_OK ) return(0);
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
if ( f->zsp->msg ) {
MesPrint("%wError in finishing gzip handling of output: %s",f->zsp->msg);
MesPrint("!>%wError in finishing gzip handling of output: %s",f->zsp->msg);
}
else {
MesPrint("%wError in finishing gzip handling of output.");
MesPrint("!>%wError in finishing gzip handling of output.");
}
MUNLOCK(ErrorMessageLock);
}
else {
MLOCK(ErrorMessageLock);
MesPrint("%wError in gzip handling of output.");
MesPrint("!>%wError in gzip handling of output.");
MUNLOCK(ErrorMessageLock);
}
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}

/*
Expand Down Expand Up @@ -451,12 +459,14 @@ int SetupAllInputGZIP(SORTING *S)
4: Initiate the inflation
*/
if ( inflateInit(zsp) != Z_OK ) {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
if ( zsp->msg ) MesPrint("%wError from inflateInit: %s",zsp->msg);
else MesPrint("%wError from inflateInit");
if ( zsp->msg ) MesPrint("!>%wError from inflateInit: %s",zsp->msg);
else MesPrint("!>%wError from inflateInit");
MesCall("SetupAllInputGZIP");
MUNLOCK(ErrorMessageLock);
Terminate(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
NumberOpened++;
}
Expand Down Expand Up @@ -527,10 +537,12 @@ LONG FillInputGZIP(FILEHANDLE *f, POSITION *position, UBYTE *buffer, LONG buffer
return(zsp->total_out);
}
if ( readsize < 0 ) {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%wFillInputGZIP: Read error during compressed sort.");
MesPrint("!>%wFillInputGZIP: Read error during compressed sort.");
MUNLOCK(ErrorMessageLock);
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
ADDPOS(f->filesize,readsize);
ADDPOS(f->POposition,readsize);
Expand Down Expand Up @@ -630,10 +642,12 @@ LONG FillInputGZIP(FILEHANDLE *f, POSITION *position, UBYTE *buffer, LONG buffer
return(zsp->total_out);
}
if ( readsize < 0 ) {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%wFillInputGZIP: Read error during compressed sort.");
MesPrint("!>%wFillInputGZIP: Read error during compressed sort.");
MUNLOCK(ErrorMessageLock);
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
ADDPOS(f->filesize,readsize);
ADDPOS(f->POposition,readsize);
Expand Down Expand Up @@ -690,10 +704,12 @@ LONG FillInputGZIP(FILEHANDLE *f, POSITION *position, UBYTE *buffer, LONG buffer
if ( zerror == Z_OK || zerror == Z_STREAM_END ) return(readsize);
}

/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%wFillInputGZIP: Error in gzip handling of input. zerror = %d",zerror);
MesPrint("!>%wFillInputGZIP: Error in gzip handling of input. zerror = %d",zerror);
MUNLOCK(ErrorMessageLock);
return(-1);
/* INTERNAL_ERROR_EXCL_STOP */
}
else {
#ifdef GZIPDEBUG
Expand All @@ -711,10 +727,12 @@ LONG FillInputGZIP(FILEHANDLE *f, POSITION *position, UBYTE *buffer, LONG buffer
UNLOCK(f->pthreadslock);
#endif
if ( readsize < 0 ) {
/* INTERNAL_ERROR_EXCL_START */
MLOCK(ErrorMessageLock);
MesPrint("%wFillInputGZIP: Read error during uncompressed sort.");
MesPrint("!>%wFillInputGZIP: Read error during uncompressed sort.");
MesPrint("%w++Reading %l bytes at position %10p",buffersize,position);
MUNLOCK(ErrorMessageLock);
/* INTERNAL_ERROR_EXCL_STOP */
}
return(readsize);
}
Expand Down
10 changes: 4 additions & 6 deletions sources/comtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ WORD *DoubleCbuffer(int num, WORD *w,int par)
WORD *w1, *w2;
LONG offset, j, i;
DUMMYUSE(par)
/*
MLOCK(ErrorMessageLock);
MesPrint(" doubleCbuffer: par = %d",par);
MUNLOCK(ErrorMessageLock);
*/

w1 = C->Buffer; w2 = newbuffer;
i = w - w1;
j = i & 7;
Expand Down Expand Up @@ -441,8 +437,10 @@ int InsTree(int bufnum, int h)
return(p->value);
}
}
MesPrint("We vallen uit de boom!");
/* INTERNAL_ERROR_EXCL_START */
MesPrint("!>We vallen uit de boom!");
Terminate(-1);
/* INTERNAL_ERROR_EXCL_STOP */
return(h);
balance:;
for (;;) {
Expand Down
Loading
Loading