fix
This commit is contained in:
parent
48540ccc78
commit
21a7a3ef44
@ -2065,7 +2065,7 @@ Atom Yap_ConsultingFile(USES_REGS1) {
|
||||
if (LOCAL_consult_level == 0) {
|
||||
return (AtomUser);
|
||||
} else {
|
||||
return (Yap_ULookupAtom(LOCAL_ConsultBase[2].f_name));
|
||||
return LOCAL_ConsultBase[2].f_name;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ static bool typein(Term inp) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool list_atom( Term inp ) {
|
||||
x static bool list_atom( Term inp ) {
|
||||
if (IsVarTerm(inp)) {
|
||||
Yap_Error(INSTANTIATION_ERROR, inp, "set_prolog_flag in \"...\"");
|
||||
return false;
|
||||
|
@ -345,7 +345,7 @@ INLINE_ONLY Term __MkCharPTerm(char *s USES_REGS);
|
||||
INLINE_ONLY Term __MkCharPTerm(char *s USES_REGS) {
|
||||
Term t = AbsAppl(HR);
|
||||
size_t sz;
|
||||
if ((s[0] == '\0')) {
|
||||
if (s[0] == '\0') {
|
||||
sz = sizeof(CELL);
|
||||
HR[0] = (CELL)FunctorString;
|
||||
HR[1] = (CELL)sz;
|
||||
|
@ -98,7 +98,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
It is `true` by default, but it is disabled by packages like CLP(BN) and
|
||||
ProbLog.
|
||||
*/
|
||||
YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, "true", NULL),
|
||||
YAP_FLAG(BACK_QUOTES_FLAG, "back_quotes", true, isatom, "true", bqs),
|
||||
/**>
|
||||
If _Value_ is unbound, tell whether a back quoted list of characters
|
||||
token is converted to a list of atoms, `chars`, to a list of integers,
|
||||
@ -155,7 +155,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
*/
|
||||
YAP_FLAG(DEBUGGER_PRINT_OPTIONS_FLAG, "debugger_print_options", true,
|
||||
list_option,
|
||||
"[quoted(true),numbervars(true),portrayed(true),max_depth(10)]",
|
||||
"[quoted(true),numbervars(true),portrayed(true),max_depth(10)]",
|
||||
NULL),
|
||||
YAP_FLAG(DEBUGGER_SHOW_CONTEXT_FLAG, "debugger_show_context", true,
|
||||
booleanFlag, "false", NULL),
|
||||
@ -180,7 +180,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
booleanFlag, "false", NULL),
|
||||
/**<
|
||||
If `off` (default) consider the character `$` a control character, if
|
||||
`on` consider `$` a lower case character.
|
||||
vxu `on` consider `$` a lower case character.
|
||||
*/
|
||||
YAP_FLAG(DOUBLE_QUOTES_FLAG, "double_quotes", true, isatom, "codes", dqs),
|
||||
/**< iso
|
||||
@ -476,9 +476,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
*/
|
||||
YAP_FLAG(THREADS_FLAG, "threads", false, ro, "MAX_THREADS", NULL),
|
||||
YAP_FLAG(TIMEZONE_FLAG, "timezone", false, ro, "18000", NULL),
|
||||
YAP_FLAG(TOPLEVEL_PRINT_ANON_FLAG, "toplevel_print_anon", true, booleanFlag,
|
||||
"true", NULL),
|
||||
YAP_FLAG(TOPLEVEL_HOOK_FLAG, "toplevel_hook", true,
|
||||
YAP_FLAG(TOPLEVEL_HOOK_FLAG, "toplevel_hook", true,
|
||||
booleanFlag, "true",
|
||||
NULL),
|
||||
/**< `toplevel_hook `
|
||||
@ -489,6 +487,8 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
backtracked into.
|
||||
|
||||
*/
|
||||
YAP_FLAG(TOPLEVEL_PRINT_ANON_FLAG, "toplevel_print_anon", true, booleanFlag,
|
||||
"true", NULL),
|
||||
YAP_FLAG(TOPLEVEL_PRINT_OPTIONS_FLAG, "toplevel_print_options", true,
|
||||
list_option, "[quoted(true),numbervars(true),portrayed(true)]",
|
||||
NULL),
|
||||
|
@ -24,7 +24,7 @@
|
||||
/* consulting files */
|
||||
|
||||
typedef union CONSULT_OBJ {
|
||||
const unsigned char *f_name;
|
||||
Atom f_name;
|
||||
int mode;
|
||||
Prop p;
|
||||
UInt c;
|
||||
|
@ -82,7 +82,6 @@ Term Yap_StringToNumberTerm(const char *s, encoding_t *encp, bool error_on) {
|
||||
CACHE_REGS
|
||||
int sno;
|
||||
int i = push_text_stack();
|
||||
char buf [16];
|
||||
Atom nat = Yap_LookupAtom(Yap_StrPrefix(s, 16));
|
||||
sno = Yap_open_buf_read_stream(s, strlen(s), encp, MEM_BUF_USER, nat, MkAtomTerm(Yap_LookupAtom("eval")));
|
||||
if (sno < 0)
|
||||
|
@ -163,7 +163,7 @@ int Yap_open_buf_read_stream(const char *buf, size_t nchars,
|
||||
f = st->file = fmemopen((void *)buf, nchars, "r");
|
||||
st->vfs = NULL;
|
||||
flags = Input_Stream_f | InMemory_Stream_f | Seekable_Stream_f;
|
||||
Yap_initStream(sno, f, fname, "r", uname, encoding, flags, NULL);
|
||||
Yap_initStream(sno, f, RepAtom(fname)->StrOfAE, "r", uname, encoding, flags, NULL);
|
||||
// like any file stream.
|
||||
Yap_DefaultStreamOps(st);
|
||||
UNLOCK(st->streamlock);
|
||||
|
@ -1396,7 +1396,7 @@ static Int start_mega(USES_REGS1) {
|
||||
Term rval;
|
||||
int sno;
|
||||
encoding_t l = ENC_ISO_UTF8;
|
||||
sno = Yap_open_buf_read_stream((char *)s, strlen((const char *)s+1), &l,
|
||||
sno = Yap_open_buf_read_stream((char *)s, strlen(s)+1, &l,
|
||||
MEM_BUF_USER, Yap_LookupAtom(Yap_StrPrefix(s,16)), TermNone );
|
||||
|
||||
GLOBAL_Stream[sno].status |= CloseOnException_Stream_f;
|
||||
|
@ -48,7 +48,6 @@
|
||||
'$new_system_predicate'(Name,Arity,M),
|
||||
sub_atom(Name,0,1,_, '$'),
|
||||
functor(P,Name,Arity),
|
||||
writeln(M:P),
|
||||
'$hide_predicate'(P,M),
|
||||
fail.
|
||||
'$protect' :-
|
||||
|
@ -236,6 +236,7 @@ qend_program :-
|
||||
prolog_flag_property(X, [access(read_write)]),
|
||||
atom(X),
|
||||
yap_flag(X, V),
|
||||
writeln(X:V),
|
||||
X \= gc_margin, % different machines will have different needs,
|
||||
X \= argv,
|
||||
X \= os_argv,
|
||||
|
Reference in New Issue
Block a user