Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!decvax!decwrl!ucbvax!info-vax From: jon@CSVAX.CALTECH.EDU (Jonathan P. Leech) Newsgroups: mod.computers.vax Subject: read() in VAX C 2.1 (VMS 4.2) Message-ID: <8602250254.AA02340@csvax.caltech.edu> Date: Mon, 24-Feb-86 21:54:24 EST Article-I.D.: csvax.8602250254.AA02340 Posted: Mon Feb 24 21:54:24 1986 Date-Received: Thu, 27-Feb-86 03:16:01 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 13 Approved: info-vax@sri-kl.arpa Is it a 'feature' of this release of DEC's C library that the read() function will not read more than 1 RMS record at a time? I.e. fd = open("FOO", O_RDONLY, 0); bytes = read(fd, buffer, 1024); invariably returns less than the requested 1024 bytes. If done on a .EXE file, it returns 512 bytes (1 block); on a text file, it returns the number of bytes in the first line, etc. Is there any way to defeat this behavior with additional options to the open()? None of the RMS options mentioned in table 18.2 in the C manual seem relevant, but I'm not familiar enough with RMS to be sure. -- Jon Leech (jon@csvax.caltech.edu) __@/