Mail Archives: djgpp/1992/07/15/20:05:25
> When you open a file in binary mode, fscanf does not work correctly.
> It doesn't consider '\r' as whitespace, so it fails on files with
> the usal MSDOS "\r\n" end of line. The following patch should help.
> If you want to try it, please let me know, whether it worked or not.
According to the ANSI C definition of fscanf(), "white space" in the
input stream consists of any combination of: space, tab, newline,
vertical tab, formfeed, and carriage return. Those are ASCII
characters 0x20, 0x09, 0x0a, 0x0b, 0x0c, and 0x0d.
So, it appears that we still need to add cases for vertical tab ('\v')
and formfeed ('\f').
--
Eric Backus
ericb%hplsla AT hplabs DOT hp DOT com
(206) 335-2495
- Raw text -