TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: david nugent
from: Brian Reynolds
date: 1993-12-10 12:33:00
subject: Sharing problemo`s....

G'day david!

07 Dec 93, david nugent writes to Jason Lingohr:


 >> My question is basically this: is it
 >> silly/dangerous/stupid/insane to mix file handles and
 >> buffered, high-level I/O??

 dn> It can be done safely (although not portably), but there are some
 dn> gotchas. It depends on what you're "mixing".


I have had many problems doing this type of thing, and now avoid it
entirely. I once wrote a set of file copying routines, all of which
filtered down to handle-based function calls. Eg) there was a function
which took FILE * args, and this function called a lower handle-based
function with the associated handles. I found however that because I was
bypassing the stream buffers, files were not being completely copied, and
bits were missing of both the beginning and the ends. In short, anything
involving disk writes or reads, I would avoid.

Brian

--- FMail 0.94

* Origin: Fountain Of Salmalcis (3:713/700.1)
SEEN-BY: 50/99 54/54 620/243 622/405 623/630 711/409 430 807 808 809 932 934
SEEN-BY: 712/623 713/317 601 615 617 618 700 729 805 807 888 905 714/906
SEEN-BY: 800/1
@PATH: 713/700 888 54/54 711/808 809 934

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