[Expat-discuss] file pointers or descriptors?
Carlos Pereira
carlos at pehoe.civil.ist.utl.pt
Wed Apr 16 20:07:45 EDT 2003
Hi,
I am reading both local and remote files,
using HTTP and FTP (anonymous) protocols,
and then sending the relevant contents to Expat.
For the sake of elegance and maintenance, I want
to handle all the three cases using the same
routine to read the file contents.
At the moment I am using file descriptors and is
working fine, but I think it would be better to
use file pointers instead, which is ansi standard,
Is this a good ideia, to convert the internet socket
file descriptors to file pointers with fdopen and
then just use the normal stdio.h functions? is there
something that I should be worried about?
According to K&R, BSD and System V Unixes even
use different headers (<unistd.h> and sys/file.h)
to declare the open system call...
Thanks for the comments!
Carlos
More information about the Expat-discuss
mailing list