Thanks Steven
Changelog:
Eric Kohl for ReactOS Project
Add support for both Windows and Unix style line endings to setupapi inf parser.
Index: dlls/setupapi/parser.c
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/parser.c,v
retrieving revision 1.7
diff -u -r1.7 parser.c
--- dlls/setupapi/parser.c 15 Mar 2003 00:12:42 -0000 1.7
+++ dlls/setupapi/parser.c 15 Jun 2003 20:27:40 -0000
@@ -454,7 +454,7 @@
/* check if the pointer points to an end of line */
inline static int is_eol( struct parser *parser, const WCHAR *ptr )
{
- return (ptr >= parser->end || *ptr == CONTROL_Z || *ptr == '\n');
+ return (ptr >= parser->end || *ptr == CONTROL_Z || *ptr == '\n' || (*ptr == '\r'&& *(ptr + 1) == '\n'));
}
@@ -561,6 +561,8 @@ { switch(*p) { + case '\r': + continue; case '\n': parser->line_pos++; close_current_line( parser ); @@ -725,6 +727,8 @@ { switch(*p) { + case '\r': + continue; case '\n': parser->line_pos++; parser->start = p + 1;