more fixes
This commit is contained in:
parent
d22cb9b6ab
commit
15546096fe
@ -4307,9 +4307,15 @@ BeginPredDefs(file)
|
|||||||
EndPredDefs
|
EndPredDefs
|
||||||
|
|
||||||
#if __YAP_PROLOG__
|
#if __YAP_PROLOG__
|
||||||
|
static pl_Sgetc(IOSTREAM *s)
|
||||||
|
{
|
||||||
|
return Sgetc(s);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_yap_extras()
|
init_yap_extras()
|
||||||
{
|
{
|
||||||
|
PL_YAP_InitSWIIO(FUNCTOR_dstream1, pl_Sgetc, Sputc, Sclose);
|
||||||
initCharTypes();
|
initCharTypes();
|
||||||
initFiles();
|
initFiles();
|
||||||
initGlob();
|
initGlob();
|
||||||
|
@ -3458,3 +3458,4 @@ Scleanup(void)
|
|||||||
*s = S__iob0[i]; /* re-initialise */
|
*s = S__iob0[i]; /* re-initialise */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,6 @@ textToAtom(PL_chars_t *text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if __SWI_PROLOG__
|
|
||||||
word
|
word
|
||||||
textToString(PL_chars_t *text)
|
textToString(PL_chars_t *text)
|
||||||
{ PL_canonise_text(text);
|
{ PL_canonise_text(text);
|
||||||
@ -296,7 +295,6 @@ textToString(PL_chars_t *text)
|
|||||||
{ return globalWString(text->length, text->text.w);
|
{ return globalWString(text->length, text->text.w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -310,7 +308,6 @@ PL_unify_text(term_t term, term_t tail, PL_chars_t *text, int type)
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
case PL_STRING:
|
case PL_STRING:
|
||||||
#if __SWI_PROLOG__
|
|
||||||
{ word w = textToString(text);
|
{ word w = textToString(text);
|
||||||
|
|
||||||
if ( w )
|
if ( w )
|
||||||
@ -318,7 +315,6 @@ PL_unify_text(term_t term, term_t tail, PL_chars_t *text, int type)
|
|||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
case PL_CODE_LIST:
|
case PL_CODE_LIST:
|
||||||
case PL_CHAR_LIST:
|
case PL_CHAR_LIST:
|
||||||
{ if ( text->length == 0 )
|
{ if ( text->length == 0 )
|
||||||
|
@ -72,6 +72,7 @@ extern void PL_save_text(PL_chars_t *text, int flags);
|
|||||||
|
|
||||||
extern int PL_get_text__LD(term_t l, PL_chars_t *text, int flags ARG_LD);
|
extern int PL_get_text__LD(term_t l, PL_chars_t *text, int flags ARG_LD);
|
||||||
extern atom_t textToAtom(PL_chars_t *text);
|
extern atom_t textToAtom(PL_chars_t *text);
|
||||||
|
extern word textToString(PL_chars_t *text);
|
||||||
|
|
||||||
extern IOSTREAM * Sopen_text(PL_chars_t *text, const char *mode);
|
extern IOSTREAM * Sopen_text(PL_chars_t *text, const char *mode);
|
||||||
extern void PL_text_recode(PL_chars_t *text, IOENC encoding);
|
extern void PL_text_recode(PL_chars_t *text, IOENC encoding);
|
||||||
|
@ -62,6 +62,20 @@ codeToAtom(int chrcode)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
word
|
||||||
|
globalString(size_t size, char *s)
|
||||||
|
{
|
||||||
|
// return YAP_MkBlobStringTerm(s, size);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
word
|
||||||
|
globalWString(size_t size, wchar_t *s)
|
||||||
|
{
|
||||||
|
// return YAP_MkBlobWideStringTerm(size, s);
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PL_rethrow(void)
|
PL_rethrow(void)
|
||||||
{ GET_LD
|
{ GET_LD
|
||||||
|
@ -43,6 +43,9 @@ typedef uintptr_t PL_atomic_t; /* same a word */
|
|||||||
|
|
||||||
extern atom_t codeToAtom(int chrcode);
|
extern atom_t codeToAtom(int chrcode);
|
||||||
|
|
||||||
|
extern word globalString(size_t size, char *s);
|
||||||
|
extern word globalWString(size_t size, wchar_t *s);
|
||||||
|
|
||||||
static inline word
|
static inline word
|
||||||
INIT_SEQ_CODES(size_t n)
|
INIT_SEQ_CODES(size_t n)
|
||||||
{
|
{
|
||||||
@ -61,7 +64,7 @@ EXTEND_SEQ_ATOMS(word gstore, int c) {
|
|||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
CLOSE_SEQ_OF_CODES(word gstore, word lp, word arg2, word arg3, term_t l) {
|
CLOSE_SEQ_OF_CODES(word gstore, word lp, word arg2, word arg3, term_t l) {
|
||||||
if (arg3 == (word)ATOM_nil) {
|
if (arg2 == 0) {
|
||||||
if (!YAP_CloseList((YAP_Term)gstore, YAP_TermNil()))
|
if (!YAP_CloseList((YAP_Term)gstore, YAP_TermNil()))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user