diff --git a/C/bignum.c b/C/bignum.c index adcb5031f..66bf3672c 100644 --- a/C/bignum.c +++ b/C/bignum.c @@ -100,12 +100,23 @@ p_is_bignum(void) Term t = Deref(ARG1); return(IsNonVarTerm(t) && IsApplTerm(t) && FunctorOfTerm(t) == FunctorBigInt); #else - return(FALSE); + return FALSE; +#endif +} + +static Int +p_has_bignums(void) +{ +#ifdef USE_GMP + return TRUE; +#else + return FALSE; #endif } void Yap_InitBigNums(void) { + Yap_InitCPred("$has_bignums", 0, p_has_bignums, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$bignum", 1, p_is_bignum, SafePredFlag|HiddenPredFlag); } diff --git a/C/iopreds.c b/C/iopreds.c index 2a15c70fc..35487d529 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -1080,6 +1080,16 @@ ReadlineGetc(int sno) #endif /* HAVE_LIBREADLINE */ +static Int +p_has_readline(void) +{ +#if HAVE_LIBREADLINE + return TRUE; +#else + return FALSE; +#endif +} + int Yap_GetCharForSIGINT(void) @@ -5937,6 +5947,7 @@ Yap_InitIOPreds(void) #endif Yap_InitCPred ("$same_file", 2, p_same_file, SafePredFlag|SyncPredFlag|HiddenPredFlag); Yap_InitCPred ("$float_format", 1, p_float_format, SafePredFlag|SyncPredFlag|HiddenPredFlag); + Yap_InitCPred ("$has_readline", 0, p_has_readline, SafePredFlag|HiddenPredFlag); Yap_InitReadUtil (); #if USE_SOCKET diff --git a/changes-5.1.html b/changes-5.1.html index 31cd83802..61fdb2ec2 100644 --- a/changes-5.1.html +++ b/changes-5.1.html @@ -16,6 +16,8 @@

Yap-5.1.3: