Merge ../yap-6.2

This commit is contained in:
Vitor Santos Costa 2010-11-26 23:37:36 +00:00
commit 55d28f6ad5
4 changed files with 21 additions and 14 deletions

View File

@ -608,6 +608,8 @@ do_save(int mode) {
static Int
p_save(void)
{
Int res;
#if defined(YAPOR) && !defined(THREADS)
if (number_workers != 1) {
Yap_Error(SYSTEM_ERROR,TermNil,"cannot perform save: more than a worker/thread running");
@ -620,7 +622,10 @@ p_save(void)
}
#endif
which_save = 1;
return(do_save(DO_EVERYTHING));
Yap_StartSlots();
res = do_save(DO_EVERYTHING);
Yap_CloseSlots();
return res;
}
/* Saves a complete prolog environment */

View File

@ -293,29 +293,30 @@ wrputref(CODEADDR ref, int Quote_illegal, wrf writewch) /* writes a data base
static int
legalAtom(unsigned char *s) /* Is this a legal atom ? */
{
wchar_t ch = *s;
if (ch == '\0')
return(FALSE);
return FALSE;
if (Yap_chtype[ch] != LC) {
if (ch == '[')
return (*++s == ']' && !(*++s));
else if (ch == '{')
return (*++s == '}' && !(*++s));
if (ch == '[') {
return (s[1] == ']' && !s[2]);
} else if (ch == '{') {
return (s[1] == '}' && !s[2]);
// else if (ch == '/')
// return (*++s != '*');
else if (Yap_chtype[ch] == SL)
return (!*++s);
else if ((ch == ',' || ch == '.') && !s[1])
} else if (Yap_chtype[ch] == SL) {
return (!s[1]);
} else if ((ch == ',' || ch == '.') && !s[1]) {
return FALSE;
else
} else {
while (ch) {
if (Yap_chtype[ch] != SY)
if (Yap_chtype[ch] != SY) {
return FALSE;
}
ch = *++s;
}
}
return TRUE;
} else
while ((ch = *++s) != 0)

View File

@ -219,7 +219,7 @@
parameter(texts((+inf))).
parameter(depth((+inf))).
parameter(default_ext('.dot')).
parameter(default_ext('.yap')).
make_diagram(InputFile, OutputFile):-
tell(OutputFile),
write('digraph G {\nrankdir=BT'), nl,

View File

@ -28,7 +28,8 @@
open_chars_stream/2,
with_output_to_chars/2,
with_output_to_chars/3,
with_output_to_chars/4
with_output_to_chars/4,
term_to_atom/2
]).
:- meta_predicate(with_output_to_chars(0,?)).