Maybe a problem in binary read/write (PR#1688)
ripley@stats.ox.ac.uk
ripley@stats.ox.ac.uk
Thu, 20 Jun 2002 20:44:04 +0200 (MET DST)
On Thu, 20 Jun 2002, Johnny Accot wrote:
> Hello,
>
> Prof Brian D Ripley wrote:
> > Not a bug: check the documentation of file(), which is documented to work
> > for files but not for devices. No attempt is made to cope with e.g.
> > blocking on non-files.
> >
> > It's a pretty extreme view of the world to consider /dev/psaux to be a
> > file, and R is just using standard C <stdio.h> I/O.
> >
> > However, this is a great opportunity for you to contribute a device()
> > function to R.
>
> I finally checked the code and "wrote" the functions to "handle devices".
> Well, in fact I more or less duplicated the code for FIFOs, removed the
> option for encoding, added an option for synchronous I/O, and added a
> test to check that the file is indeed a character or block special file.
> This works great for me but I'm afraid it is a bit simple and does not
> cover much of device handling in general. Especially I don't know if
> anybody would want to use it for block devices, and what they would need.
> The psaux device is one of the simplest device one could think of, that's
> why it works so well. For other devices one would need at least an
> ioctl function, which I didn't write. But still I have no idea whether
> anybody would use it and what for. Anyway. Please let me know if you
> think this is useful. If yes, I will try to familiarize myself with
> the structure of the R code and make the device handling more general.
Yes, I do think it would be useful, but I know little about it,
Thank you for the offer.
>
> Thanks,
> Johnny
>
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._