fix write '$VAR'('_A').

This commit is contained in:
Vitor Santos Costa 2012-02-14 06:54:32 +00:00
parent 247aa54046
commit 98b2cf70c2

View File

@ -987,7 +987,7 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str
if (lastw == alphanum) {
wrputc(' ', wglb->stream);
}
if (!IsVarTerm(ti) && (IsIntTerm(ti) || IsStringTerm(ti))) {
if (!IsVarTerm(ti) && (IsIntTerm(ti) || IsStringTerm(ti)) || IsAtomTerm(ti)) {
if (IsIntTerm(ti)) {
Int k = IntOfTerm(ti);
if (k == -1) {
@ -1003,6 +1003,8 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str
} else
lastw = alphanum;
}
} else if (IsAtomTerm(ti)) {
putAtom(AtomOfTerm(ti), FALSE, wglb->stream);
} else {
putUnquotedString(ti, wglb->stream);
}