improve SWI compatibility.

This commit is contained in:
Vitor Santos Costa
2009-03-13 19:40:27 +00:00
parent d6a06fe092
commit 67b29f3c85
8 changed files with 283 additions and 233 deletions

View File

@@ -19,6 +19,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stddef.h>
#include <wchar.h>
#if HAVE_TIME_H
#include <time.h>
#endif
@@ -450,10 +451,16 @@ UNICODE file functions.
#ifdef SIO_MAGIC /* defined from <SWI-Stream.h> */
extern X_API int PL_unify_stream(term_t t, IOSTREAM *s);
extern X_API int PL_open_stream(term_t t, IOSTREAM *s); /* compat */
extern X_API int PL_get_stream_handle(term_t t, IOSTREAM **s);
#define PL_open_stream PL_unify_stream
extern X_API int PL_get_stream_handle(term_t t, IOSTREAM **s);\
extern X_API IOSTREAM *Snew(void *handle,int flags,IOFUNCTIONS *functions);
extern X_API int Sgetcode(IOSTREAM *);
extern X_API int Sfeof(IOSTREAM *);
#endif
#define succeed return TRUE
#define fail return FALSE
extern X_API const char *PL_cwd(void);
void swi_install(void);