Author: Daniel Clausen
Date: 01:33:54 12/04/03
Go up one level in this thread
On December 04, 2003 at 02:08:24, Matt Thomas wrote: >On December 03, 2003 at 14:25:30, Daniel Clausen wrote: > >>On December 03, 2003 at 12:51:53, Robert Hyatt wrote: >> >>[snip] >> >> guess Robert means read(). As said above, I would prefer Standard C functions >>>>(if possible). read() is not a Standard C function. >>> >>>I'm not sure what that means. read() is in every C implementation I have >>>ever used. As are the others such as getc/putc, gets/puts, scanf/printf, >>>fread/fwrite, read/write, etc... read/write are specifically non-buffered >>>calls, and they even worked on MSDOS just fine. >> >>getc() etc conform to ANSI-C and POSIX.1. >>read() etc conform to SVr4, SVID, AT&T, POSIX, X/OPEN, BSD 4.3 (but not ANSI-C) >> >Was it dropped from ANSI? My Bjarne Strousup book circa 1997 shows it. -Matt Are you sure you mean read() and not fread()? fread() belongs to the ANSI-C standard and is defined in stdio.h. read()/write() don't and are defined in unistd.h. Sargon PS. My engine uses (or more.. will use) read/write system calls because they want a filedescriptor (as opposed to a filehandle) and therefore can also be used to read from / write to sockets. (although now that I mention it, I could easily encapsulate that since I'm using C++ wrapper classes for input/output anyway... Anthony couldn't :-D) Sargon
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.