2002-05-28 17:26:00 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* *
|
|
|
|
* YAP Prolog *
|
|
|
|
* *
|
|
|
|
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
|
|
|
* *
|
|
|
|
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
|
|
|
* *
|
|
|
|
**************************************************************************
|
|
|
|
* *
|
|
|
|
* File: iopreds.c *
|
|
|
|
* Last rev: 5/2/88 *
|
|
|
|
* mods: *
|
|
|
|
* comments: Input/Output C implemented predicates *
|
|
|
|
* *
|
|
|
|
*************************************************************************/
|
|
|
|
#ifdef SCCS
|
|
|
|
static char SccsId[] = "%W% %G%";
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file defines main data-structure for stream management,
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2008-03-25 22:03:14 +00:00
|
|
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
2006-08-30 02:06:30 +01:00
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2006-11-27 17:42:03 +00:00
|
|
|
#include <wchar.h>
|
|
|
|
|
2002-05-28 17:26:00 +01:00
|
|
|
#if HAVE_LIBREADLINE
|
|
|
|
|
2008-03-25 22:03:14 +00:00
|
|
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
2006-08-30 02:06:30 +01:00
|
|
|
|
2002-05-28 17:26:00 +01:00
|
|
|
FILE *rl_instream, *rl_outstream;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2009-07-29 00:30:15 +01:00
|
|
|
#define MEM_BUF_CODE 0
|
|
|
|
#define MEM_BUF_MALLOC 1
|
|
|
|
|
2006-08-02 19:18:31 +01:00
|
|
|
typedef int (*GetsFunc)(int, UInt, char *);
|
|
|
|
|
2002-05-28 17:26:00 +01:00
|
|
|
#define StdInStream 0
|
|
|
|
#define StdOutStream 1
|
|
|
|
#define StdErrStream 2
|
|
|
|
|
|
|
|
#define ALIASES_BLOCK_SIZE 8
|
|
|
|
|
2013-04-25 23:15:04 +01:00
|
|
|
void Yap_InitStdStreams(void);
|
|
|
|
Term Yap_StreamPosition(struct io_stream *);
|
|
|
|
void Yap_InitPlIO(void);
|
2013-12-02 14:49:41 +00:00
|
|
|
|