indenting
This commit is contained in:
parent
7b977c2538
commit
d375d0ffbb
@ -2503,6 +2503,7 @@ static Term GetDBTerm(DBTerm *DBSP, int src USES_REGS) {
|
||||
CalculateStackGap(PASS_REGS1);
|
||||
if (HR + NOf > ASP - EventFlag / sizeof(CELL)) {
|
||||
if (LOCAL_PrologMode & InErrorMode) {
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
if (HR + NOf > ASP)
|
||||
fprintf(stderr,
|
||||
"\n\n [ FATAL ERROR: No Stack for Error Handling ]\n");
|
||||
@ -2713,6 +2714,9 @@ static PredEntry *new_lu_entry(Term t) {
|
||||
pe->PredFlags |= LogUpdatePredFlag;
|
||||
if (IsAtomTerm(t)) {
|
||||
pe->PredFlags |= AtomDBPredFlag;
|
||||
pe->FunctorOfPred = (Functor)AtomOfTerm(t);
|
||||
} else {
|
||||
pe->FunctorOfPred = FunctorOfTerm(t);
|
||||
}
|
||||
pe->ArityOfPE = 3;
|
||||
pe->OpcodeOfPred = Yap_opcode(_op_fail);
|
||||
|
15
C/errors.c
15
C/errors.c
@ -330,20 +330,20 @@ static char tmpbuf[YAP_BUF_SIZE];
|
||||
return mkerrorct(B, ts);
|
||||
|
||||
#define E2(A, B, C, D) \
|
||||
case A: \
|
||||
case A: \
|
||||
ts -= 2; \
|
||||
ts[0] = MkAtomTerm(Yap_LookupAtom(C)); \
|
||||
ts[1] = MkAtomTerm(Yap_LookupAtom(D)); \
|
||||
return mkerrorct(B, ts);
|
||||
|
||||
#define END_ERRORS() \
|
||||
} \
|
||||
}
|
||||
} \
|
||||
}
|
||||
|
||||
#include "YapErrors.h"
|
||||
|
||||
/**
|
||||
* @brief Yap_Error
|
||||
* @brief Yap_Error
|
||||
* This function handles errors in the C code. Check errors.yap for the
|
||||
*corresponding Prolog code.
|
||||
*
|
||||
@ -553,6 +553,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
return (P);
|
||||
default: {
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
Term ts[3];
|
||||
ts[2] = where;
|
||||
nt[0] = mkerrort(type, ts + 2);
|
||||
@ -561,6 +562,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
||||
|
||||
|
||||
}
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
if (type != ABORT_EVENT) {
|
||||
Term location;
|
||||
|
||||
@ -607,9 +609,8 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
||||
/* disable active signals at this point */
|
||||
LOCAL_Signals = 0;
|
||||
CalculateStackGap(PASS_REGS1);
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
#if DEBUG
|
||||
// DumpActiveGoals( PASS_REGS1 );
|
||||
// DumpActiveGoals( PASS_REGS1 );
|
||||
#endif
|
||||
/* wait if we we are in user code,
|
||||
it's up to her to decide */
|
||||
@ -627,7 +628,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
||||
|
||||
LOCAL_PrologMode &= ~InErrorMode;
|
||||
return P;
|
||||
}
|
||||
}
|
||||
|
||||
static Int
|
||||
is_boolean( USES_REGS1 )
|
||||
|
Reference in New Issue
Block a user