Print this page
9083 replace regex implementation with tre

@@ -39,12 +39,10 @@
  *      This must be fixed, plus a general cleanup should be performed
  *      if this is to be integrated into libc.
  *
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include <stdio.h>
 #include <widec.h>
 #include <sys/types.h>
 #include <regex.h>
 #include <locale.h>

@@ -371,12 +369,10 @@
  * +---------------------------------+--------------------------------------+
  * 0 REG_OK       Pattern matched       1  - Pattern matched
  * 1 REG_NOMATCH  No match              0  - Pattern didn't match
  * 2 REG_ECOLLATE Bad collation elmnt.  67 - Returned by compile on mbtowc err
  * 3 REG_EESCAPE  trailing \ in patrn   45 - } expected after \.
- * 4 REG_ENEWLINE \n before end pattrn  36 - Illegal or missing delimiter.
- * 5 REG_ENSUB    Over 9 \( \) pairs    43 - Too many \(
  * 6 REG_ESUBREG  Bad number in \[0-9]  25 - ``\digit'' out of range.
  * 7 REG_EBRACK   [ ] inbalance         49 - [ ] imbalance.
  * 8 REG_EPAREN   ( ) inbalance         42 - \(~\) imbalance.
  * 9 REG_EBRACE   \{ \} inbalance       45 - } expected after \.
  * 10 REG_ERANGE  bad range endpoint    11 - Range endpoint too large.

@@ -383,14 +379,11 @@
  * 11 REG_ESPACE  no memory for pattern 50 - Regular expression overflow.
  * 12 REG_BADRPT  invalid repetition    36 - Illegal or missing delimiter.
  * 13 REG_ECTYPE  invalid char-class    67 - illegal byte sequence
  * 14 REG_BADPAT  syntax error          50 - Regular expression overflow.
  * 15 REG_BADBR   \{ \} contents bad    46 - First number exceeds 2nd in \{~\}
- * 16 REG_EFATAL  internal error        50 - Regular expression overflow.
  * 17 REG_ECHAR   bad mulitbyte char    67 - illegal byte sequence
- * 18 REG_STACK   stack overflow        50 - Regular expression overflow.
- * 19 REG_ENOSYS  function not supported 50- Regular expression overflow.
  *
  *      For reference here's the compile/step errno's. We don't generate
  *      41 here - it's done earlier, nor 44 since we can't tell if from 46.
  *
  *      11 - Range endpoint too large.

@@ -415,16 +408,10 @@
                 regerrno = 67;
                 break;
         case REG_EESCAPE:
                 regerrno = 45;
                 break;
-        case REG_ENEWLINE:
-                regerrno = 36;
-                break;
-        case REG_ENSUB:
-                regerrno = 43;
-                break;
         case REG_ESUBREG:
                 regerrno = 25;
                 break;
         case REG_EBRACK:
                 regerrno = 49;

@@ -451,22 +438,13 @@
                 regerrno = 50;
                 break;
         case REG_BADBR:
                 regerrno = 46;
                 break;
-        case REG_EFATAL:
-                regerrno = 50;
-                break;
         case REG_ECHAR:
                 regerrno = 67;
                 break;
-        case REG_STACK:
-                regerrno = 50;
-                break;
-        case REG_ENOSYS:
-                regerrno = 50;
-                break;
         default:
                 regerrno = 50;
                 break;
         }
         return (regerrno);