fix previous fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1061 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
420bf9e92c
commit
94714907ec
@ -3697,6 +3697,7 @@ format(Term tail, Term args, int sno)
|
||||
Term mytargs[8], *targs;
|
||||
Int tnum, targ = 0;
|
||||
char *fstr = NULL, *fptr;
|
||||
Term oargs = args;
|
||||
|
||||
if (IsVarTerm(tail)) {
|
||||
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
||||
@ -3968,7 +3969,9 @@ format(Term tail, Term args, int sno)
|
||||
if (targ > tnum || has_repeats)
|
||||
goto do_consistency_error;
|
||||
t = targs[targ++];
|
||||
*--ASP = MkIntTerm(0);
|
||||
Yap_plwrite (t, format_putc, Quote_illegal_f|Ignore_ops_f|To_heap_f );
|
||||
ASP++;
|
||||
break;
|
||||
case 'p':
|
||||
if (targ > tnum || has_repeats)
|
||||
@ -3998,13 +4001,17 @@ format(Term tail, Term args, int sno)
|
||||
if (targ > tnum || has_repeats)
|
||||
goto do_consistency_error;
|
||||
t = targs[targ++];
|
||||
*--ASP = MkIntTerm(0);
|
||||
Yap_plwrite (t, format_putc, Handle_vars_f|Quote_illegal_f|To_heap_f);
|
||||
ASP++;
|
||||
break;
|
||||
case 'w':
|
||||
if (targ > tnum || has_repeats)
|
||||
goto do_consistency_error;
|
||||
t = targs[targ++];
|
||||
*--ASP = MkIntTerm(0);
|
||||
Yap_plwrite (t, format_putc, Handle_vars_f|To_heap_f);
|
||||
ASP++;
|
||||
break;
|
||||
case '~':
|
||||
if (has_repeats)
|
||||
@ -4082,7 +4089,7 @@ format(Term tail, Term args, int sno)
|
||||
goto do_default_error;
|
||||
do_consistency_error:
|
||||
default:
|
||||
Yap_Error(CONSISTENCY_ERROR, args, "format/2");
|
||||
Yap_Error(CONSISTENCY_ERROR, oargs, "format/2");
|
||||
do_default_error:
|
||||
if (tnum <= 8)
|
||||
targs = NULL;
|
||||
|
@ -782,7 +782,6 @@ Yap_plwrite(Term t, int (*mywrite) (int, int), int flags)
|
||||
wglb.keep_terms = (flags & (Use_portray_f|To_heap_f));
|
||||
wglb.Ignore_ops = flags & Ignore_ops_f;
|
||||
/* protect slots for portray */
|
||||
*--ASP = MkIntTerm(0);
|
||||
writeTerm(t, 1200, 1, FALSE, &wglb);
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ debugging :-
|
||||
'$format'(user_error,"! g execute goal~n", []).
|
||||
|
||||
'$ilgl'(C) :-
|
||||
'$format'(user_error,"[ Illegal option ~d. Use h for help. ]. ~n", []).
|
||||
'$format'(user_error,"[ Illegal option ~d. Use h for help. ]. ~n", [C]).
|
||||
|
||||
'$skipeol'(10) :- !.
|
||||
'$skipeol'(_) :- get0(user,C), '$skipeol'(C).
|
||||
|
Reference in New Issue
Block a user