iallow checking for readline and gmp
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1917 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
dc0c04d9d2
commit
ba761e7a47
13
C/bignum.c
13
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);
|
||||
}
|
||||
|
11
C/iopreds.c
11
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
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
<h2>Yap-5.1.3:</h2>
|
||||
<ul>
|
||||
<li> FIXED: support checking for big_nums and readline. (obs from
|
||||
Rui Camacho)</li>
|
||||
<li> FIXED: make thread_create more compatible with SWI. (obs from
|
||||
Paulo Moura)</li>
|
||||
<li> FIXED: give startup path to chr. (obs from Paulo Moura)</li>
|
||||
|
@ -6753,9 +6753,9 @@ Just fail
|
||||
@item system_options
|
||||
@findex system_options (yap_flag/2 option)
|
||||
@* This read only flag tells which options were used to compile
|
||||
YAP. Currently it informs whether the system supports
|
||||
YAP. Currently it informs whether the system supports @code{big_numbers},
|
||||
@code{coroutining}, @code{depth_limit}, @code{low_level_tracer},
|
||||
@code{or-parallelism}, @code{rational_trees}, @code{tabling},
|
||||
@code{or-parallelism}, @code{rational_trees}, @code{readline}, @code{tabling},
|
||||
@code{threads}, or the @code{wam_profiler}.
|
||||
|
||||
@item tabling_mode
|
||||
|
@ -492,6 +492,8 @@ yap_flag(single_var_warnings,X) :-
|
||||
yap_flag(system_options,X) :-
|
||||
'$system_options'(X).
|
||||
|
||||
'$system_options'(big_numbers) :-
|
||||
'$has_bignums'.
|
||||
'$system_options'(coroutining) :-
|
||||
'$yap_has_coroutining'.
|
||||
'$system_options'(depth_limit) :-
|
||||
@ -502,6 +504,8 @@ yap_flag(system_options,X) :-
|
||||
\+ '$undefined'('$yapor_on', prolog).
|
||||
'$system_options'(rational_trees) :-
|
||||
'$yap_has_rational_trees'.
|
||||
'$system_options'(readline) :-
|
||||
'$has_readline'.
|
||||
'$system_options'(tabling) :-
|
||||
\+ '$undefined'('$do_table'(_,_), prolog).
|
||||
'$system_options'(threads) :-
|
||||
|
Reference in New Issue
Block a user