August 2011
Intermediate to advanced
552 pages
23h 48m
English
Here are some miscellaneous buffered I/O functions.
int fileno (FILE *stream);This returns the file descriptor that the stream is wrapped around. This is handy if you need to use fcntl(), fchmod(), fstat(), or the dup() functions.
int getw (FILE *stream);
int putw (int w, FILE *stream);These are like getc()/putc() but read or write an integer. The integers are not written in a canonical form (discussed in Chapter 14: Network Programming With Sockets), so if you want to be portable, you will need to put the bytes into a known byte order.
Read now
Unlock full access