add SWI-compatible flags
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1948 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
8182645ab9
commit
85d463e170
@ -23,7 +23,7 @@ LIBDIR=$(EROOTDIR)/lib/Yap
|
||||
#
|
||||
#
|
||||
CC=@CC@
|
||||
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../../.. -I$(srcdir)/../../../include $(JVM_INC) -DIN_YAP=1 -DJAVA_HOME=\"$(JAVA_HOME)\"
|
||||
CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../../.. -I$(srcdir)/../../../include $(JVM_INC) -DJAVA_HOME=\"$(JAVA_HOME)\"
|
||||
#
|
||||
#
|
||||
# You shouldn't need to change what follows.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: jpl.c,v 1.13 2007-09-27 15:25:33 vsc Exp $
|
||||
/* $Id: jpl.c,v 1.14 2007-10-09 11:43:43 vsc Exp $
|
||||
|
||||
Part of JPL -- SWI-Prolog/Java interface
|
||||
|
||||
@ -1910,7 +1910,7 @@ jni_ensure_jvm_plc(void)
|
||||
|
||||
|
||||
|
||||
#if IN_YAP
|
||||
#if __YAP_PROLOG__
|
||||
#include "hacks.c"
|
||||
#endif
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
<h2>Yap-5.1.3:</h2>
|
||||
<ul>
|
||||
<li> NEW: define dialect and version_data flags.</li>
|
||||
<li> NEW: define __YAP_PROLOG__.</li>
|
||||
<li> FIXED: LAM compilation was broken (obs from Bernd Gutmann).</li>
|
||||
<li> FIXED: profon was broken.</li>
|
||||
<li> NEW: send newline even for unleashed ports (obs from Miguel
|
||||
|
16
docs/yap.tex
16
docs/yap.tex
@ -6822,6 +6822,11 @@ it is bound to @code{off} disable debugging.
|
||||
If bound, set the argument to the @code{write_term/3} options the
|
||||
debugger uses to write terms. If unbound, show the current options.
|
||||
|
||||
@item dialect
|
||||
@findex dialect (yap_flag/2 option)
|
||||
@*
|
||||
Read-only flag that always returns @code{yap}.
|
||||
|
||||
@item discontiguous_warnings
|
||||
@findex discontiguous_warnings (yap_flag/2 option)
|
||||
@*
|
||||
@ -7175,8 +7180,15 @@ corresponding to the Unix @code{stdout} stream.
|
||||
|
||||
@item version
|
||||
@findex version (yap_flag/2 option)
|
||||
@*
|
||||
Read-only flag that giving the current version of YAP.
|
||||
@* Read-only flag that returns an atom with the current version of
|
||||
YAP.
|
||||
|
||||
@item version_data
|
||||
@findex version_data (yap_flag/2 option)
|
||||
@* Read-only flag that reads a term of the form
|
||||
@code{yap}(@var{Major},@var{Minor},@var{Patch},@var{Undefined}), where
|
||||
@var{Major} is the major version, @var{Minor} is the minor version,
|
||||
and @var{Patch} is the patch number.
|
||||
|
||||
@item windows
|
||||
@findex windoes (yap_flag/2 option)
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
#define _yap_c_interface_h 1
|
||||
|
||||
#define __YAP_PROLOG__ 1
|
||||
|
||||
#include "yap_structs.h"
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
|
@ -315,6 +315,27 @@ yap_flag(version,X) :-
|
||||
yap_flag(version,X) :-
|
||||
'$do_error'(permission_error(modify,flag,version),yap_flag(version,X)).
|
||||
|
||||
yap_flag(version_data,X) :-
|
||||
var(X), !,
|
||||
'$get_version_codes(Major,Minor,Patch),
|
||||
X = yap(Major, Minor, Patch, _).
|
||||
yap_flag(version_data,X) :-
|
||||
'$do_error'(permission_error(modify,flag,version),yap_flag(version_data,X)).
|
||||
|
||||
'$get_version_codes(Major,Minor,Patch) :-
|
||||
get_value('$version_name',X),
|
||||
atom_codes(X,[0'Y,0'a,0'p,0'-|VersionTag]),
|
||||
'$fetch_num_code'(VersionTag,0,Major,L1),
|
||||
'$fetch_num_code'(L1,0,Minor,L2),
|
||||
'$fetch_num_code'(L2,0,Patch,[]).
|
||||
|
||||
'$fetch_num_code'([],Code,Code,[]).
|
||||
'$fetch_num_code'([C|Cs],Code0,CodeF,L) :-
|
||||
C >= 0'0, C =< 0'9, !,
|
||||
CodeI is Code0*10+(C-0'0),
|
||||
'$fetch_num_code'(Cs,CodeI,CodeF,L).
|
||||
'$fetch_num_code'([_|Cs],Code,Code,Cs).
|
||||
|
||||
yap_flag(max_integer,X) :-
|
||||
var(X), !,
|
||||
'$access_yap_flags'(0, 1),
|
||||
@ -684,6 +705,8 @@ yap_flag(max_threads,X) :-
|
||||
yap_flag(max_threads,X) :-
|
||||
'$do_error'(domain_error(flag_value,max_threads+X),yap_flag(max_threads,X)).
|
||||
|
||||
yap_flag(dialect,yap).
|
||||
|
||||
'$show_yap_flag_opts'(V,Out) :-
|
||||
(
|
||||
V = answer_format ;
|
||||
@ -694,6 +717,7 @@ yap_flag(max_threads,X) :-
|
||||
V = chr_toplevel_show_store ;
|
||||
V = debug ;
|
||||
V = debugger_print_options ;
|
||||
V = dialect ;
|
||||
V = discontiguous_warnings ;
|
||||
V = dollar_as_lower_case ;
|
||||
V = double_quotes ;
|
||||
@ -740,6 +764,7 @@ yap_flag(max_threads,X) :-
|
||||
V = user_output ;
|
||||
V = verbose_auto_load ;
|
||||
V = version ;
|
||||
V = version_data ;
|
||||
V = windows ;
|
||||
V = write_strings
|
||||
),
|
||||
|
Reference in New Issue
Block a user