emptybuffer
This commit is contained in:
parent
2d94bba498
commit
9e5675755e
@ -110,11 +110,11 @@ static void clean_vars(VarEntry *p) {
|
||||
#ifdef O_QUASIQUOTATIONS
|
||||
/** '$qq_open'(+QQRange, -Stream) is det.
|
||||
|
||||
Opens a quasi-quoted memory range.
|
||||
Opens a quasi-quoted memory range.
|
||||
|
||||
@arg QQRange is a term '$quasi_quotation'(ReadData, Start, Length)
|
||||
@arg Stream is a UTF-8 encoded string, whose position indication
|
||||
reflects the location in the real file.
|
||||
@arg QQRange is a term '$quasi_quotation'(ReadData, Start, Length)
|
||||
@arg Stream is a UTF-8 encoded string, whose position indication
|
||||
reflects the location in the real file.
|
||||
*/
|
||||
|
||||
static Int qq_open(USES_REGS1) {
|
||||
@ -1208,12 +1208,12 @@ static Int read2(
|
||||
|
||||
/** @pred read(- _T_) is iso
|
||||
|
||||
Reads the next term from the current input stream, and unifies it with
|
||||
_T_. The term must be followed by a dot (`.`) and any blank-character
|
||||
as previously defined. The syntax of the term must match the current
|
||||
declarations for operators (see op). If the end-of-stream is reached,
|
||||
_T_ is unified with the atom `end_of_file`. Further reads from of
|
||||
the same stream may cause an error failure (see open/3).
|
||||
Reads the next term from the current input stream, and unifies it with
|
||||
_T_. The term must be followed by a dot (`.`) and any blank-character
|
||||
as previously defined. The syntax of the term must match the current
|
||||
declarations for operators (see op). If the end-of-stream is reached,
|
||||
_T_ is unified with the atom `end_of_file`. Further reads from of
|
||||
the same stream may cause an error failure (see open/3).
|
||||
|
||||
*/
|
||||
static Int read1(
|
||||
@ -1224,8 +1224,8 @@ static Int read1(
|
||||
|
||||
/** @pred fileerrors
|
||||
|
||||
Switches on the file_errors flag so that in certain error conditions
|
||||
Input/Output predicates will produce an appropriated message and abort.
|
||||
Switches on the file_errors flag so that in certain error conditions
|
||||
Input/Output predicates will produce an appropriated message and abort.
|
||||
|
||||
*/
|
||||
static Int fileerrors(USES_REGS1) {
|
||||
@ -1296,6 +1296,13 @@ X_API Term Yap_StringToTerm(const char *s, size_t len, encoding_t *encp,
|
||||
Term bvar = MkVarTerm(), ctl;
|
||||
yhandle_t sl;
|
||||
|
||||
if (len == 0) {
|
||||
Term rval = TermEof;
|
||||
if (rval && bindings) {
|
||||
*bindings = TermNil;
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
if (bindings) {
|
||||
ctl = Yap_MkApplTerm(Yap_MkFunctor(AtomVariableNames, 1), 1, &bvar);
|
||||
sl = Yap_PushHandle(bvar);
|
||||
|
Reference in New Issue
Block a user