bad typo in bom

This commit is contained in:
Vítor Santos Costa 2016-03-06 01:09:02 +00:00
parent bc914e9e91
commit bac60d2d94
2 changed files with 5 additions and 3 deletions

View File

@ -481,7 +481,7 @@ probed for the BOM when opened for reading. If a BOM is found, the
encoding is set accordingly and the property `bom(true)` is
available through stream_property/2. When opening a file for
writing, writing a BOM can be requested using the option
`bom(true)` with `open/4`. Do notice that YAP will write a BOM by default on UTF-16 (including UCS-2) and
`bom(true)` with `open/4`. YAP will parse an UTF-8 file for a BOM only if explicitly required to do so. Do notice that YAP will write a BOM by default on UTF-16 (including UCS-2) and
UTF-32; otherwise the default is not to write a BOM. BOMs are not avaliable for ASCII and
ISO-LATIN-1.

View File

@ -219,9 +219,10 @@ is_output(int sno USES_REGS) { /* '$set_output'(+Stream,-ErrorMessage) */
static Int
has_bom(int sno, Term t2 USES_REGS) { /* '$set_output'(+Stream,-ErrorMessage) */
bool rc = GLOBAL_Stream[sno].status & Seekable_Stream_f;
bool rc = GLOBAL_Stream[sno].status & HAS_BOM_f;
if (!IsVarTerm(t2) && !booleanFlag(t2)) {
return FALSE;
// Yap_Error( DOMAIN_ERROR_BOOLEAN, t2, " stream_property/2");
return false;
}
if (rc) {
return Yap_unify_constant(t2, TermTrue);
@ -235,6 +236,7 @@ has_reposition(int sno,
Term t2 USES_REGS) { /* '$set_output'(+Stream,-ErrorMessage) */
bool rc = GLOBAL_Stream[sno].status & Seekable_Stream_f;
if (!IsVarTerm(t2) && !booleanFlag(t2)) {
// Yap_Error( DOMAIN_ERROR_BOOLEAN, t2, " stream_property/2");
return false;
}
if (rc) {