This commit is contained in:
Vítor Santos Costa 2015-10-08 02:13:20 +01:00
parent d1c4db3c4b
commit 4e60e9b0f9
3 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ protected:
BACKUP_MACHINE_REGS();
Term *outp;
out = Yap_StringToTerm(s, strlen(s)+1, LOCAL_encoding, 1200, &vnames ) ;
out = Yap_StringToTerm(s, strlen(s)+1, &LOCAL_encoding, 1200, &vnames ) ;
//extern char *s0;
//fprintf(stderr,"ap=%p arity=%d text=%s", ap, ap->ArityOfPE, s);
// Yap_DebugPlWrite(out);

View File

@ -8,7 +8,7 @@ extern "C" {
#include "YapInterface.h"
#include "blobs.h"
char *Yap_TermToString(Term t, char *s, size_t sz, size_t *length, encoding_t encoding, int flags);
char *Yap_TermToString(Term t, char *s, size_t sz, size_t *length, encoding_t *encodingp, int flags);
void YAP_UserCPredicate(const char *, YAP_UserCPred, YAP_Arity arity);
void YAP_UserCPredicateWithArgs(const char *, YAP_UserCPred, YAP_Arity, YAP_Term);
@ -299,7 +299,7 @@ const char *YAPTerm::text() {
encoding_t enc = LOCAL_encoding;
BACKUP_MACHINE_REGS();
if (!(os = Yap_TermToString(t, os, sze, &length, enc, 0))) { RECOVER_MACHINE_REGS();
if (!(os = Yap_TermToString(t, os, sze, &length, &enc, 0))) { RECOVER_MACHINE_REGS();
return (char *)NULL;
}
RECOVER_MACHINE_REGS();

View File

@ -78,7 +78,7 @@ extern void YAP_UserCPredicateWithArgs(const char *, YAP_UserCPred, YAP_Arity, Y
arity, int extra) */
extern void YAP_UserBackCPredicate(const char *, YAP_UserCPred, YAP_UserCPred, YAP_Arity, unsigned int);
extern Term Yap_StringToTerm(const char *s, size_t len, encoding_t enc, int prio, Term *bindings_p);
extern Term Yap_StringToTerm(const char *s, size_t len, encoding_t *encp, int prio, Term *bindings_p);
}