TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Bob Lawrence
from: Paul Edwards
date: 1996-11-26 09:08:32
subject: tic

BL> Actually fgets(s, 128, *file); fputs(s, *file); is pretty good, as
BL> long as you use it with the break to avoid adding the extra cr/lf on
BL> the end. 

while (fgets(xxx) != NULL)
{
    fputs(xxx);
}

does not cause an extra CR/LF

BL> How do they do the buffer in fgets()?

Same as all the buffering, they read it into a buffer of 512, 8192 etc
bytes (or whatever you specified with setvbuf()), and fgets just reads it
out of there.  BTW, how did the getc() go in CRC?  BFN.  Paul. 
@EOT:

---
* Origin: X (3:711/934.9)

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™.