From jan@swi.psy.uva.nl  Mon Sep 13 12:23:34 1999
Received: from gollem.swi.psy.uva.nl (jan@gollem [145.18.114.15])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA26255
	for <prolog@swi.psy.uva.nl>; Mon, 13 Sep 1999 12:23:34 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.8.8/8.8.8) id MAA00878;
	Mon, 13 Sep 1999 12:24:18 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
To: prolog@swi.psy.uva.nl, Paul Singleton <p.singleton@keele.ac.uk>
Subject: Re: read/write I/O streams from foreign code?
Date: Mon, 13 Sep 1999 12:22:00 +0200
X-Mailer: KMail [version 0.7.9]
Content-Type: text/plain
References: <37B979B8.58697AF0@keele.ac.uk>
MIME-Version: 1.0
Message-Id: <9909131224180J.00286@gollem>
Content-Transfer-Encoding: 8bit

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

