allow writing constraints, and small fix for writing after prefix ops.

This commit is contained in:
Vítor Santos Costa 2012-03-22 21:40:42 +00:00
parent 7b78832aa7
commit 4484dec044

View File

@ -669,7 +669,6 @@ write_var(CELL *t, struct write_globs *wglb, struct rewind_term *rwt)
/* make sure we don't get no creepy spaces where they shouldn't be */ /* make sure we don't get no creepy spaces where they shouldn't be */
lastw = separator; lastw = separator;
if (IsAttVar(t)) { if (IsAttVar(t)) {
#if defined(COROUTINING) && defined(DEBUG)
Int vcount = (t-H0); Int vcount = (t-H0);
if (Yap_Portray_delays) { if (Yap_Portray_delays) {
exts ext = ExtFromCell(t); exts ext = ExtFromCell(t);
@ -698,7 +697,6 @@ write_var(CELL *t, struct write_globs *wglb, struct rewind_term *rwt)
} }
wrputc('D', wglb->stream); wrputc('D', wglb->stream);
wrputn(vcount,wglb); wrputn(vcount,wglb);
#endif
} else { } else {
wrputn(((Int) (t- H0)),wglb); wrputn(((Int) (t- H0)),wglb);
} }
@ -947,7 +945,7 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str
} else if (atom == AtomMinus) { } else if (atom == AtomMinus) {
last_minus = TRUE; last_minus = TRUE;
} }
writeTerm(from_pointer(RepAppl(t)+1, &nrwt, wglb), rp, depth + 1, FALSE, wglb, &nrwt); writeTerm(from_pointer(RepAppl(t)+1, &nrwt, wglb), rp, depth + 1, TRUE, wglb, &nrwt);
restore_from_write(&nrwt, wglb); restore_from_write(&nrwt, wglb);
if (bracket_right) { if (bracket_right) {
wrputc(')', wglb->stream); wrputc(')', wglb->stream);