[Pcre-svn] [419] code/trunk: Open with "rb" in pcregrep.

Página Inicial
Delete this message
Autor: Subversion repository
Data:  
Para: pcre-svn
Assunto: [Pcre-svn] [419] code/trunk: Open with "rb" in pcregrep.
Revision: 419
          http://vcs.pcre.org/viewvc?view=rev&revision=419
Author:   ph10
Date:     2009-08-12 11:45:33 +0100 (Wed, 12 Aug 2009)


Log Message:
-----------
Open with "rb" in pcregrep.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/pcre_ucd.c
    code/trunk/pcregrep.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2009-04-24 09:17:18 UTC (rev 418)
+++ code/trunk/ChangeLog    2009-08-12 10:45:33 UTC (rev 419)
@@ -8,6 +8,10 @@
     was out-of-date, and there was no check on the pcre_compile() error code 
     being within the table. This could lead to an OK return being given in 
     error.
+    
+2.  Changed the call to open a subject file in pcregrep from fopen(pathname, 
+    "r") to fopen(pathname, "rb"), which fixed a problem with some of the tests 
+    in a Windows environment. 



Version 7.9 11-Apr-09

Modified: code/trunk/pcre_ucd.c
===================================================================
--- code/trunk/pcre_ucd.c    2009-04-24 09:17:18 UTC (rev 418)
+++ code/trunk/pcre_ucd.c    2009-08-12 10:45:33 UTC (rev 419)
@@ -14,7 +14,6 @@
 pcre_int32 property_2;
 } ucd_record; */


-
 const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */
   {     9,      0,      0, }, /*   0 */
   {     9,     29,      0, }, /*   1 */


Modified: code/trunk/pcregrep.c
===================================================================
--- code/trunk/pcregrep.c    2009-04-24 09:17:18 UTC (rev 418)
+++ code/trunk/pcregrep.c    2009-08-12 10:45:33 UTC (rev 419)
@@ -1530,7 +1530,7 @@
 PLAIN_FILE:
 #endif
   {
-  in = fopen(pathname, "r");
+  in = fopen(pathname, "rb");
   handle = (void *)in;
   frtype = FR_PLAIN;
   }