atom_concat and empty atoms
This commit is contained in:
parent
8baaa70cec
commit
861f185ec6
|
@ -1333,7 +1333,7 @@ restart_aux:
|
|||
}
|
||||
|
||||
while (t1 != TermNil) {
|
||||
inpv[i].type = YAP_STRING_ATOM;
|
||||
inpv[i].type = YAP_STRING_ATOM,
|
||||
inpv[i].val.t = HeadOfTerm(t1);
|
||||
i++;
|
||||
t1 = TailOfTerm(t1);
|
||||
|
|
7
C/text.c
7
C/text.c
|
@ -949,8 +949,8 @@ bool write_Text(unsigned char *inp, seq_tv_t *out USES_REGS) {
|
|||
if (!nbuf) {
|
||||
return NULL;
|
||||
}
|
||||
if (!nbuf[0])
|
||||
continue;
|
||||
// if (!nbuf[0])
|
||||
// continue;
|
||||
bufv[j++] = nbuf;
|
||||
}
|
||||
if (j == 0) {
|
||||
|
@ -1062,7 +1062,8 @@ bool Yap_Splice_Text(int n, size_t cuts[], seq_tv_t *inp,
|
|||
seq_tv_t inp, out;
|
||||
inp.val.t = t;
|
||||
inp.type = Yap_TextType(t);
|
||||
inp.type = YAP_STRING_ATOM | YAP_STRING_STRING | YAP_STRING_ATOMS_CODES| YAP_STRING_TERM;
|
||||
inp.type = YAP_STRING_ATOM | YAP_STRING_STRING | YAP_STRING_ATOMS_CODES |
|
||||
YAP_STRING_TERM;
|
||||
inp.enc = ENC_ISO_UTF8;
|
||||
out.enc = ENC_ISO_UTF8;
|
||||
out.type = YAP_STRING_CHARS;
|
||||
|
|
|
@ -1104,7 +1104,8 @@ static Int peek_char(USES_REGS1) {
|
|||
|
||||
if (sno < 0)
|
||||
return false;
|
||||
if ((ch = Yap_peek(sno)) < 0) {
|
||||
Int ch = Yap_peek(sno);
|
||||
if (ch < 0) {
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
return Yap_unify_constant(ARG2, MkAtomTerm(AtomEof));
|
||||
}
|
||||
|
@ -1114,7 +1115,8 @@ if (sno < 0)
|
|||
return false;
|
||||
}
|
||||
sinp[off] = '\0';
|
||||
return Yap_unify_constant(ARG2, MkAtomTerm(Yap_ULookupAtom(sinp)));
|
||||
printf("%s\n", simp) return Yap_unify_constant(
|
||||
ARG2, MkAtomTerm(Yap_ULookupAtom(sinp)));
|
||||
}
|
||||
|
||||
/** @pred peek_char( - _C_) is iso
|
||||
|
|
Reference in New Issue