patch by UN: Avoid writing quoted for bar. Conforms to 6.3.4.3 of ISO/IEC 13211-1:1995/Cor 2:2012
This commit is contained in:
parent
65e61cfefd
commit
573c11e8b2
12
C/write.c
12
C/write.c
@ -1014,13 +1014,15 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb, str
|
||||
wrputc(')', wglb->stream);
|
||||
lastw = separator;
|
||||
}
|
||||
/* avoid quoting commas */
|
||||
if (strcmp(RepAtom(atom)->StrOfAE,","))
|
||||
putAtom(atom, wglb->Quote_illegal, wglb);
|
||||
else {
|
||||
/* avoid quoting commas and bars */
|
||||
if (!strcmp(RepAtom(atom)->StrOfAE,",")) {
|
||||
wrputc(',', wglb->stream);
|
||||
lastw = separator;
|
||||
}
|
||||
} else if (!strcmp(RepAtom(atom)->StrOfAE,"|")) {
|
||||
wrputc('|', wglb->stream);
|
||||
lastw = separator;
|
||||
} else
|
||||
putAtom(atom, wglb->Quote_illegal, wglb);
|
||||
if (bracket_right) {
|
||||
wrputc('(', wglb->stream);
|
||||
lastw = separator;
|
||||
|
Reference in New Issue
Block a user