keep trying to fix atoms

This commit is contained in:
Vitor Santos Costa
2013-12-04 23:01:30 +00:00
parent 0d749059a4
commit 2665f71112
17 changed files with 1362 additions and 610 deletions

View File

@@ -302,17 +302,17 @@ Yap_LookupMaybeWideAtom(wchar_t *atom)
}
Atom
Yap_LookupMaybeWideAtomWithLength(wchar_t *atom, size_t len)
Yap_LookupMaybeWideAtomWithLength(wchar_t *atom, size_t len0)
{ /* lookup atom in atom table */
wchar_t *p = atom, c;
size_t len0 = 0;
size_t len = 0;
Atom at;
int wide = FALSE;
while ((c = *p++)) {
if (c > 255) wide = TRUE;
len0++;
if (len0 == len) break;
len++;
if (len == len0) break;
}
if (p[0] == '\0' && wide) return LookupWideAtom(atom);
else if (wide) {