improve WIN32 support and installation
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2170 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
22
C/adtdefs.c
22
C/adtdefs.c
@@ -273,6 +273,28 @@ LookupWideAtom(wchar_t *atom)
|
||||
return na;
|
||||
}
|
||||
|
||||
Atom
|
||||
Yap_LookupMaybeWideAtom(wchar_t *atom)
|
||||
{ /* lookup atom in atom table */
|
||||
wchar_t *p = atom, c;
|
||||
size_t len = 0;
|
||||
char *ptr, *ptr0;
|
||||
Atom at;
|
||||
|
||||
while ((c = *p++)) {
|
||||
if (c > 255) return LookupWideAtom(atom);
|
||||
len++;
|
||||
}
|
||||
/* not really a wide atom */
|
||||
ptr0 = ptr = Yap_AllocCodeSpace(len+1);
|
||||
if (!ptr)
|
||||
return NIL;
|
||||
while ((*ptr++ = *p++));
|
||||
at = LookupAtom(ptr0);
|
||||
Yap_FreeCodeSpace(ptr0);
|
||||
return at;
|
||||
}
|
||||
|
||||
Atom
|
||||
Yap_LookupAtom(char *atom)
|
||||
{ /* lookup atom in atom table */
|
||||
|
Reference in New Issue
Block a user