OSSP CVS Repository

ossp - Check-in [3508]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3508
Date: 2003-Jul-11 10:49:36 (local)
2003-Jul-11 08:49:36 (UTC)
User:ms
Branch:
Comment: Fix embedded newline regex matching bug.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_const.h      1.34 -> 1.35     1 inserted, 1 deleted
ossp-pkg/rc/rc_file.c      1.6 -> 1.7     1 inserted, 1 deleted
ossp-pkg/rc/rc_script.c      1.35 -> 1.36     1 inserted, 1 deleted

ossp-pkg/rc/rc_const.h 1.34 -> 1.35

--- rc_const.h   2003/07/07 13:30:51     1.34
+++ rc_const.h   2003/07/11 08:49:36     1.35
@@ -143,7 +143,7 @@
 #define RC_DEF_ON     "1"                       /* Digital switch */
 #define RC_DEF_OFF    "0"                       /* Digital switch */
 #define RC_DEF_TMP    "/tmp"                    /* Temporary directory name */
-#define RC_DEF_DEF    "^%(\\w+)[ \t]*(.*?)\\n(.*?)^$" /* Section definition */
+#define RC_DEF_DEF    "(?:^|\\n)%(\\w+)[ \t]*(.*?)\\n(.*?)(?:\\n%|$)" /* Section definition */
 #define RC_DEF_NCF    "config"                  /* Config section name */
 #define RC_DEF_CMN    "common"                  /* Common section name */
 #define RC_DEF_UIG    "-u"                      /* Section user string */


ossp-pkg/rc/rc_file.c 1.6 -> 1.7

--- rc_file.c    2003/07/08 15:09:50     1.6
+++ rc_file.c    2003/07/11 08:49:36     1.7
@@ -149,7 +149,7 @@
         int nSubstrings    = 0;
         int *pnVec         = NULL;
         const char *kszErr = NULL;
-        const int kiRegopt = PCRE_DOTALL | PCRE_MULTILINE;
+        const int kiRegopt = PCRE_DOTALL | PCRE_DOLLAR_ENDONLY;
         /*const int kiRegopt = PCRE_DOTALL | PCRE_MULTILINE | PCRE_UNGREEDY;*/
 
         pcre *pRegex       = NULL;  /* Perl Compatible Regular Expression */


ossp-pkg/rc/rc_script.c 1.35 -> 1.36

--- rc_script.c  2003/07/07 13:30:51     1.35
+++ rc_script.c  2003/07/11 08:49:36     1.36
@@ -178,7 +178,7 @@
     int nSubstrings    = 0;
     int *pnVec         = NULL;
     const char *kszErr = NULL;
-    const int kiRegopt = PCRE_DOTALL | PCRE_MULTILINE;
+    const int kiRegopt = PCRE_DOTALL | PCRE_DOLLAR_ENDONLY;
 /*    const int kiRegopt = PCRE_DOTALL | PCRE_MULTILINE | PCRE_UNGREEDY;*/
 
     pcre *pRegex       = NULL;  /* Perl Compatible Regular Expression */

CVSTrac 2.0.1