Subject: Re: read/write I/O streams from foreign code?

From: Jan Wielemaker <[email-masked]>
Date: Mon, 13 Sep 1999 12:22:00 +0200

On Tue, 17 Aug 1999, Paul Singleton wrote:
>Can I read from, or write to, SWI-Prolog I/O streams from foreign code?
>
>E.g. if I could use ANSI C stdio routines such as fread() on FILE*
>structures associated with streams, this would be great, even if
>(for my application at least), the line/character counts etc. are
>not updated...
>
>Paul Singleton

Streams are not necessarily associated to files.  Include <SWI-Stream.h>
and use the functions therein.  Basically, all the stdio functions are
defined there4 with there name prefixed with "S": Sgetc(stream), etc.

	Regards --- Jan