From: Eric Backus Subject: Re: patch for doscan.c To: buers AT dg1 DOT chemie DOT uni-konstanz DOT de (Dieter Buerssner) (Dieter Buerssner) Date: Wed, 15 Jul 92 16:05:29 PDT Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Mailer: Elm [revision: 66.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