string support
This commit is contained in:
parent
b3aa3e37c6
commit
f11b0518a8
@ -6,7 +6,6 @@
|
|||||||
:- module(system, [concat_atom/2,
|
:- module(system, [concat_atom/2,
|
||||||
concat_atom/3,
|
concat_atom/3,
|
||||||
read_clause/1,
|
read_clause/1,
|
||||||
string/1,
|
|
||||||
chdir/1,
|
chdir/1,
|
||||||
compile_aux_clauses/1,
|
compile_aux_clauses/1,
|
||||||
convert_time/2,
|
convert_time/2,
|
||||||
@ -15,8 +14,6 @@
|
|||||||
'$set_predicate_attribute'/3,
|
'$set_predicate_attribute'/3,
|
||||||
stamp_date_time/3,
|
stamp_date_time/3,
|
||||||
date_time_stamp/2,
|
date_time_stamp/2,
|
||||||
format_time/3,
|
|
||||||
format_time/4,
|
|
||||||
time_file/2,
|
time_file/2,
|
||||||
flag/3,
|
flag/3,
|
||||||
require/1,
|
require/1,
|
||||||
@ -96,6 +93,7 @@
|
|||||||
|
|
||||||
:- set_prolog_flag(user_flags,silent).
|
:- set_prolog_flag(user_flags,silent).
|
||||||
|
|
||||||
|
|
||||||
% Time is given as a float in SWI-Prolog.
|
% Time is given as a float in SWI-Prolog.
|
||||||
swi_get_time(FSecs) :- datime(Datime), mktime(Datime, Secs), FSecs is Secs*1.0.
|
swi_get_time(FSecs) :- datime(Datime), mktime(Datime, Secs), FSecs is Secs*1.0.
|
||||||
|
|
||||||
@ -157,8 +155,6 @@ concat_atom(List, New) :-
|
|||||||
read_clause(X,Y) :-
|
read_clause(X,Y) :-
|
||||||
read_term(X,Y,[singetons(warning)]).
|
read_term(X,Y,[singetons(warning)]).
|
||||||
|
|
||||||
string(_) :- fail.
|
|
||||||
|
|
||||||
bindings_message(V) -->
|
bindings_message(V) -->
|
||||||
{ cvt_bindings(V, Bindings) },
|
{ cvt_bindings(V, Bindings) },
|
||||||
prolog:message(query(_YesNo,Bindings)), !.
|
prolog:message(query(_YesNo,Bindings)), !.
|
||||||
|
@ -160,7 +160,7 @@ X_API char* PL_atom_nchars(atom_t a, size_t *len) /* SAM check type */
|
|||||||
X_API term_t PL_copy_term_ref(term_t from)
|
X_API term_t PL_copy_term_ref(term_t from)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
return YAP_InitSlot(Yap_GetFromSlot(from PASS_REGS));
|
return Yap_InitSlot(Yap_GetFromSlot(from PASS_REGS) PASS_REGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API term_t PL_new_term_ref(void)
|
X_API term_t PL_new_term_ref(void)
|
||||||
@ -182,7 +182,7 @@ X_API void PL_reset_term_refs(term_t after)
|
|||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
term_t new = Yap_NewSlots(1 PASS_REGS);
|
term_t new = Yap_NewSlots(1 PASS_REGS);
|
||||||
YAP_RecoverSlots(after-new);
|
Yap_RecoverSlots(after-new PASS_REGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* begin PL_get_* functions =============================*/
|
/* begin PL_get_* functions =============================*/
|
||||||
|
@ -58,3 +58,6 @@ install: all
|
|||||||
clean:
|
clean:
|
||||||
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
||||||
|
|
||||||
|
realclean: clean
|
||||||
|
rm -f Makefile
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user