TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Kurt Kuzba
from: Tom Torfs
date: 1998-08-27 00:50:38
subject: 100% (?) ANSI/ISO-complia

Kurt Kuzba wrote in a message to Tom Torfs:

[snip code that uses getc() to calculate size of file in case
implementation doesn't support SEEK_END]

 KK>    That could be done much faster in most cases with fread()    and
 KK> a good sized buffer, couldn't it?

Sure. But the whole matter is a bit academical. Do you know of any
implementations that don't support SEEK_END ? (I suspect that such
implementations probably don't have any reliable method of detecting end of
file, so the getc()/fread() approach will probably fail as well)

(the reason for writing this small program was a discussion in c.l.c on
this subject; thought I'd share it with you as well)

greetings,
Tom
tomtorfs{at}village.uunet.be

--- timEd/2 1.10+
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)
SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 292/516 252/356 140/1 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.