Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!ukc!pyrltd!root44!jan From: jan@root.co.uk (Joseph Nave) Newsgroups: comp.lang.c Subject: Re: fread() Message-ID: <2724@root44.co.uk> Date: 29 May 91 17:13:35 GMT References: <42589@cup.portal.com> Organization: UniSoft Ltd., London, England Lines: 33 In <42589@cup.portal.com> Joe_W_Wright@cup.portal.com writes: >I have a K&R C compiler and would write, as functions, the fread() >and fwrite() routines which don't exist in old C. [We have only >getc(fp) and putc(c,fp).] >As I understand them, the prototype calls would be: > fread(&memory, sizeof(object), num_of_objects, fp); >and the function might be: > int > fread(buf,size,num,fp) char *buf; int size,num; FILE *fp; { > } >Questions: 1 # 7 >Thanks to any and all. >Joe_Wright@cup.portal.com You might like to take a look at the XPG3 guide for this function where all these are answered Joe Nave -- "I opened Pandora's box, let the cat out of the bag and put the ball in their court" Hon. J. Hacker (The Ministry of Administrative Affairs)