Mail Archives: djgpp/1996/12/23/20:09:15
On 21 Dec 1996 11:12:19 GMT, roland DOT nilsson AT communique DOT se (Roland
Nilsson) wrote:
>Yes, I'm parsing binary files. I believe C FILE i/o is always in raw
>mode. The only fopen() flags available are those relating to i/o
>direction and overwrite, according to my djgpp function list.
>I usually fopen() with "r".
In MS-DOS, you have the option of using binary or text files. Which
is the default is compiler dependent, so you should always specify
which mode you want to use.
fopen(name,"rb") will open in binary read mode
fopen(name,"wb") will open in binary write mode
fopen(name,"r+b") will open in binary read/write mode (if the file
already exists)
fopen(name,"w+b") will open in binary read/write mode (and overwrite
an existing file)
- Raw text -