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;
|
Term mytargs[8], *targs;
|
||||||
Int tnum, targ = 0;
|
Int tnum, targ = 0;
|
||||||
char *fstr = NULL, *fptr;
|
char *fstr = NULL, *fptr;
|
||||||
|
Term oargs = args;
|
||||||
|
|
||||||
if (IsVarTerm(tail)) {
|
if (IsVarTerm(tail)) {
|
||||||
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
||||||
@ -3968,7 +3969,9 @@ format(Term tail, Term args, int sno)
|
|||||||
if (targ > tnum || has_repeats)
|
if (targ > tnum || has_repeats)
|
||||||
goto do_consistency_error;
|
goto do_consistency_error;
|
||||||
t = targs[targ++];
|
t = targs[targ++];
|
||||||
|
*--ASP = MkIntTerm(0);
|
||||||
Yap_plwrite (t, format_putc, Quote_illegal_f|Ignore_ops_f|To_heap_f );
|
Yap_plwrite (t, format_putc, Quote_illegal_f|Ignore_ops_f|To_heap_f );
|
||||||
|
ASP++;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
if (targ > tnum || has_repeats)
|
if (targ > tnum || has_repeats)
|
||||||
@ -3998,13 +4001,17 @@ format(Term tail, Term args, int sno)
|
|||||||
if (targ > tnum || has_repeats)
|
if (targ > tnum || has_repeats)
|
||||||
goto do_consistency_error;
|
goto do_consistency_error;
|
||||||
t = targs[targ++];
|
t = targs[targ++];
|
||||||
|
*--ASP = MkIntTerm(0);
|
||||||
Yap_plwrite (t, format_putc, Handle_vars_f|Quote_illegal_f|To_heap_f);
|
Yap_plwrite (t, format_putc, Handle_vars_f|Quote_illegal_f|To_heap_f);
|
||||||
|
ASP++;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
if (targ > tnum || has_repeats)
|
if (targ > tnum || has_repeats)
|
||||||
goto do_consistency_error;
|
goto do_consistency_error;
|
||||||
t = targs[targ++];
|
t = targs[targ++];
|
||||||
|
*--ASP = MkIntTerm(0);
|
||||||
Yap_plwrite (t, format_putc, Handle_vars_f|To_heap_f);
|
Yap_plwrite (t, format_putc, Handle_vars_f|To_heap_f);
|
||||||
|
ASP++;
|
||||||
break;
|
break;
|
||||||
case '~':
|
case '~':
|
||||||
if (has_repeats)
|
if (has_repeats)
|
||||||
@ -4082,7 +4089,7 @@ format(Term tail, Term args, int sno)
|
|||||||
goto do_default_error;
|
goto do_default_error;
|
||||||
do_consistency_error:
|
do_consistency_error:
|
||||||
default:
|
default:
|
||||||
Yap_Error(CONSISTENCY_ERROR, args, "format/2");
|
Yap_Error(CONSISTENCY_ERROR, oargs, "format/2");
|
||||||
do_default_error:
|
do_default_error:
|
||||||
if (tnum <= 8)
|
if (tnum <= 8)
|
||||||
targs = NULL;
|
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.keep_terms = (flags & (Use_portray_f|To_heap_f));
|
||||||
wglb.Ignore_ops = flags & Ignore_ops_f;
|
wglb.Ignore_ops = flags & Ignore_ops_f;
|
||||||
/* protect slots for portray */
|
/* protect slots for portray */
|
||||||
*--ASP = MkIntTerm(0);
|
|
||||||
writeTerm(t, 1200, 1, FALSE, &wglb);
|
writeTerm(t, 1200, 1, FALSE, &wglb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,7 +577,7 @@ debugging :-
|
|||||||
'$format'(user_error,"! g execute goal~n", []).
|
'$format'(user_error,"! g execute goal~n", []).
|
||||||
|
|
||||||
'$ilgl'(C) :-
|
'$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'(10) :- !.
|
||||||
'$skipeol'(_) :- get0(user,C), '$skipeol'(C).
|
'$skipeol'(_) :- get0(user,C), '$skipeol'(C).
|
||||||
|
Reference in New Issue
Block a user