GNU bug report logs - #5393
Patch for lookaround assertion in regexp

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Tomohiro MATSUYAMA <t.matsuyama.pub@HIDDEN>; Keywords: patch; Forwarded to http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00732.html; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 5393 <at> debbugs.gnu.org:


Received: (at 5393) by debbugs.gnu.org; 29 Feb 2016 02:30:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 28 21:30:41 2016
Received: from localhost ([127.0.0.1]:51144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aaDbc-0006zA-O3
	for submit <at> debbugs.gnu.org; Sun, 28 Feb 2016 21:30:41 -0500
Received: from hermes.netfonds.no ([80.91.224.195]:35343)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <larsi@HIDDEN>) id 1aaDba-0006w5-9M
 for 5393 <at> debbugs.gnu.org; Sun, 28 Feb 2016 21:30:39 -0500
Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161]
 helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <larsi@HIDDEN>)
 id 1aaDb9-0007zc-W0; Mon, 29 Feb 2016 03:30:13 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#5393: control message for bug 5393
References: <E1RpP6b-00077v-6Q@HIDDEN> <87twkts694.fsf@HIDDEN>
 <87h9gtdtci.fsf@HIDDEN>
Date: Mon, 29 Feb 2016 13:30:07 +1100
In-Reply-To: <87h9gtdtci.fsf@HIDDEN> (Stephen Berman's message of "Sun, 28
 Feb 2016 11:25:49 +0100")
Message-ID: <874mcs45ao.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable
X-MailScanner-ID: 1aaDb9-0007zc-W0
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1457317813.49214@/En6AOLUpmaNdPAh3MhUog
X-Spam-Status: No
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5393
Cc: Glenn Morris <rgm@HIDDEN>, 5393 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

> I think it's here:
>
> http://lists.gnu.org/archive/html/emacs-devel/2009-06/msg00094.html

I have included the patch below for easier reading.

Lookahead and lookbehind are useful, I guess, but the regex code in
Emacs is a mystery to me, so I can't really judge the patch.

Index: src/regex.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /sources/emacs/emacs/src/regex.c,v
retrieving revision 1.236
diff -u -r1.236 regex.c
--- src/regex.c	8 Jan 2009 03:15:54 -0000	1.236
+++ src/regex.c	3 Jun 2009 22:35:17 -0000
@@ -735,7 +735,14 @@
   syntaxspec,
=20
 	/* Matches any character whose syntax is not that specified.  */
-  notsyntaxspec
+  notsyntaxspec,
+
+  lookahead,
+  lookahead_not,
+  lookbehind,
+  lookbehind_not,
+  lookaround_succeed,
+  lookaround_fail
=20
 #ifdef emacs
   ,before_dot,	/* Succeeds if before point.  */
@@ -1033,6 +1040,36 @@
 	  fprintf (stderr, "/stop_memory/%d", *p++);
 	  break;
=20
+        case lookahead:
+          extract_number_and_incr (&mcnt, &p);
+          fprintf (stderr, "/lookahead/%d", mcnt);
+          break;
+
+        case lookahead_not:
+          extract_number_and_incr (&mcnt, &p);
+          fprintf (stderr, "/lookahead_not/%d", mcnt);
+          break;
+
+        case lookbehind:
+          extract_number_and_incr (&mcnt, &p);
+          extract_number_and_incr (&mcnt2, &p);
+          fprintf (stderr, "/lookbehind/%d/%d", mcnt, mcnt2);
+          break;
+
+        case lookbehind_not:
+          extract_number_and_incr (&mcnt, &p);
+          extract_number_and_incr (&mcnt2, &p);
+          fprintf (stderr, "/lookbehind_not/%d/%d", mcnt, mcnt2);
+          break;
+
+        case lookaround_succeed:
+	  fprintf (stderr, "/lookaround_succeed");
+          break;
+
+        case lookaround_fail:
+          fprintf (stderr, "/lookaround_fail");
+          break;
+=20=20=20=20=20=20=20=20=20=20=20=20
 	case duplicate:
 	  fprintf (stderr, "/duplicate/%d", *p++);
 	  break;
@@ -1600,11 +1637,17 @@
     }									\
   else									\
     {									\
-      regend[reg] =3D POP_FAILURE_POINTER ();				\
-      regstart[reg] =3D POP_FAILURE_POINTER ();				\
-      DEBUG_PRINT4 ("     Pop reg %d (spanning %p -> %p)\n",		\
-		    reg, regstart[reg], regend[reg]);			\
-    }									\
+      re_char *start, *end;                                             \
+      end =3D POP_FAILURE_POINTER ();                                     \
+      start =3D POP_FAILURE_POINTER ();                                   \
+      if (!discard_saved_regs)                                          \
+        {                                                               \
+          regstart[reg] =3D start;                                        \
+          regend[reg] =3D end;                                            \
+          DEBUG_PRINT4 ("     Pop reg %d (spanning %p -> %p)\n",        \
+                        reg, regstart[reg], regend[reg]);               \
+        }                                                               \
+    }                                                                   \
 } while (0)
=20
 /* Check that we are not stuck in an infinite loop.  */
@@ -1702,7 +1745,7 @@
   while (fail_stack.frame < fail_stack.avail)				\
     POP_FAILURE_REG_OR_COUNT ();					\
 									\
-  pat =3D POP_FAILURE_POINTER ();				\
+  pat =3D POP_FAILURE_POINTER ();                                         \
   DEBUG_PRINT2 ("  Popping pattern %p: ", pat);				\
   DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend);			\
 									\
@@ -1724,6 +1767,29 @@
 } while (0) /* POP_FAILURE_POINT */
=20
=20
+#define FINISH_LOOKAROUND()                                     \
+  do {                                                          \
+    re_char *str, *pat;                                         \
+    re_opcode_t op;                                             \
+    discard_saved_regs =3D 1;                                     \
+    while (!FAIL_STACK_EMPTY ())                                \
+      {                                                         \
+        POP_FAILURE_POINT (str, pat);                           \
+        op =3D (re_opcode_t) *pat;                                \
+        if (op =3D=3D lookahead                                     \
+            || op =3D=3D lookahead_not                              \
+            || op =3D=3D lookbehind                                 \
+            || op =3D=3D lookbehind_not)                            \
+          {                                                     \
+            d =3D str;                                            \
+            dend =3D ((d >=3D string1 && d <=3D end1)                 \
+                    ? end_match_1 : end_match_2);               \
+            break;                                              \
+          }                                                     \
+      }                                                         \
+    discard_saved_regs =3D 0;                                     \
+  } while (0);
+
 
 /* Registers are set to a sentinel when they haven't yet matched.  */
 #define REG_UNSET(e) ((e) =3D=3D NULL)
@@ -1922,6 +1988,7 @@
   pattern_offset_t fixup_alt_jump;
   pattern_offset_t laststart_offset;
   regnum_t regnum;
+  int lookaround;
 } compile_stack_elt_t;
=20
=20
@@ -2522,6 +2589,8 @@
 						 compile_stack,
 						 regnum_t regnum));
=20
+static int exact_chars_in_pattern_buffer _RE_ARGS ((struct re_pattern_buff=
er *bufp, re_char *p, re_char *pend));
+
 /* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
    Returns one of error codes defined in `regex.h', or zero for success.
=20
@@ -3261,6 +3330,7 @@
 	    handle_open:
 	      {
 		int shy =3D 0;
+                int lookaround =3D 0;
 		regnum_t regnum =3D 0;
 		if (p+1 < pend)
 		  {
@@ -3282,6 +3352,27 @@
 			      case '1': case '2': case '3': case '4':
 			      case '5': case '6': case '7': case '8': case '9':
 				regnum =3D 10*regnum + (c - '0'); break;
+                              case '=3D':
+                                /* Positive lookahead assertion.  */
+                                shy =3D lookaround =3D 1;
+                                break;
+                              case '!':
+                                /* Negative lookahead assertion.  */
+                                shy =3D lookaround =3D 2;
+                                break;
+                              case '<':
+                                {
+                                  PATFETCH (c);
+                                  if (c =3D=3D '=3D')
+                                    /* Positive lookbehind assertion.  */
+                                    shy =3D lookaround =3D -1;
+                                  else if (c =3D=3D '!')
+                                    /* Negative lookbehind assertion.  */
+                                    shy =3D lookaround =3D -2;
+                                  else
+                                    FREE_STACK_RETURN (REG_BADPAT);
+                                }
+                                break;
 			      default:
 				/* Only (?:...) is supported right now. */
 				FREE_STACK_RETURN (REG_BADPAT);
@@ -3328,6 +3419,7 @@
 		  =3D fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
 		COMPILE_STACK_TOP.laststart_offset =3D b - bufp->buffer;
 		COMPILE_STACK_TOP.regnum =3D regnum;
+                COMPILE_STACK_TOP.lookaround =3D lookaround;
=20
 		/* Do not push a start_memory for groups beyond the last one
 		   we can represent in the compiled pattern.  */
@@ -3377,6 +3469,7 @@
 		   later groups should continue to be numbered higher,
 		   as in `(ab)c(de)' -- the second group is #2.  */
 		regnum_t regnum;
+                int lookaround;
=20
 		compile_stack.avail--;
 		begalt =3D bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
@@ -3389,13 +3482,40 @@
 		/* If we've reached MAX_REGNUM groups, then this open
 		   won't actually generate any code, so we'll have to
 		   clear pending_exact explicitly.  */
+                lookaround =3D COMPILE_STACK_TOP.lookaround;
 		pending_exact =3D 0;
=20
 		/* We're at the end of the group, so now we know how many
 		   groups were inside this one.  */
 		if (regnum <=3D MAX_REGNUM && regnum > 0)
 		  BUF_PUSH_2 (stop_memory, regnum);
-	      }
+                else if (lookaround)
+                  {
+                    if (lookaround > 0)
+                      {
+                        /* Positive/negative lookahead assertion.  */
+                        GET_BUFFER_SPACE (3);
+                        INSERT_JUMP (lookaround =3D=3D 1 ? lookahead : loo=
kahead_not, laststart, b + 4);
+                        b +=3D 3;
+                      }
+                    else
+                      {
+                        /* Positive/negative lookbehind assertion.  */
+                        int count =3D exact_chars_in_pattern_buffer (bufp,=
 laststart, b);
+                        if (count =3D=3D -1) /* variable length */
+                          FREE_STACK_RETURN (REG_BADPAT);
+
+                        GET_BUFFER_SPACE (5);
+                        INSERT_JUMP2 (lookaround =3D=3D -1 ? lookbehind : =
lookbehind_not, laststart, b + 6, count);
+                        b +=3D 5;
+                      }
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+                    /* Negative form.  */
+                    if (lookaround > 1 || lookaround < -1)
+                      BUF_PUSH (lookaround_fail);
+                    BUF_PUSH (lookaround_succeed);
+                  }
+              }
 	      break;
=20
=20
@@ -3949,10 +4069,16 @@
        /* After an alternative?	 */
     || (*prev =3D=3D '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash=
))
        /* After a shy subexpression?  */
-    || ((syntax & RE_SHY_GROUPS) && prev - 2 >=3D pattern
-	&& prev[-1] =3D=3D '?' && prev[-2] =3D=3D '('
-	&& (syntax & RE_NO_BK_PARENS
-	    || (prev - 3 >=3D pattern && prev[-3] =3D=3D '\\')));
+    || ((syntax & RE_SHY_GROUPS)
+        && ((prev - 2 >=3D pattern
+             && prev[-1] =3D=3D '?' && prev[-2] =3D=3D '('
+             && (syntax & RE_NO_BK_PARENS
+                 || (prev - 3 >=3D pattern && prev[-3] =3D=3D '\\')))
+         || (prev - 3 >=3D pattern
+             && (*prev =3D=3D '=3D' || *prev =3D=3D '!')
+             && prev[-1] =3D=3D '<' && prev[-2] =3D=3D '?' && prev[-3] =3D=
=3D '('
+             && (syntax & RE_NO_BK_PARENS
+                 || (prev - 4 >=3D pattern && prev[-4] =3D=3D '\\')))));
 }
=20
=20
@@ -4198,6 +4324,13 @@
 	    }
 	  break;
=20
+        case lookahead:
+        case lookahead_not:
+        case lookbehind:
+        case lookbehind_not:
+          if (!fastmap) break;
+          return -1;
+=20=20=20=20=20=20=20=20=20=20
       /* All cases after this match the empty string.  These end with
 	 `continue'.  */
=20
@@ -4827,7 +4960,7 @@
 	{
 	case start_memory:
 	case stop_memory:
-	  p +=3D 2; break;
+          p +=3D 2; break;
 	case no_op:
 	  p +=3D 1; break;
 	case jump:
@@ -4843,6 +4976,93 @@
   return p;
 }
=20
+static int
+exact_chars_in_pattern_buffer (bufp, p, pend)
+     struct re_pattern_buffer *bufp;
+     re_char *p, *pend;
+{
+  int count =3D 0;
+  while (p < pend)
+    {
+      switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
+	{
+        case exactn:
+          {
+            int mcnt =3D *p++;
+            int buf_charlen;
+            while (mcnt > 0) {
+              STRING_CHAR_AND_LENGTH (p, p - pend, buf_charlen);
+              p +=3D buf_charlen;
+              mcnt -=3D buf_charlen;
+              count++;
+            }
+          }
+          break;
+        case start_memory:
+        case stop_memory:
+          p++;
+          break;
+#ifdef emacs
+        case categoryspec:
+        case notcategoryspec:
+#endif /* emacs */
+        case syntaxspec:
+        case notsyntaxspec:
+          p++;
+        case anychar:
+          count++;
+          break;
+
+        case charset:
+        case charset_not:
+          if (CHARSET_RANGE_TABLE_EXISTS_P (p - 1))
+            {
+              int mcnt;
+              p =3D CHARSET_RANGE_TABLE (p - 1);
+              EXTRACT_NUMBER_AND_INCR (mcnt, p);
+              p =3D CHARSET_RANGE_TABLE_END (p, mcnt);
+            }
+          else
+            p +=3D 1 + CHARSET_BITMAP_SIZE (p - 1);
+          count++;
+          break;
+
+#ifdef emacs
+	case before_dot:
+	case at_dot:
+	case after_dot:
+#endif /* emacs */
+	case no_op:
+	case begline:
+	case endline:
+	case begbuf:
+	case endbuf:
+	case wordbound:
+	case notwordbound:
+	case wordbeg:
+	case wordend:
+	case symbeg:
+	case symend:
+          /* Zero width.  */
+          continue;
+        case lookahead:
+        case lookahead_not:
+        case lookbehind:
+        case lookbehind_not:
+          /* Skip to lookaround_success.  */
+          while (p < pend)
+            {
+              if ((re_opcode_t) *p++ =3D=3D lookaround_succeed)
+                break;
+            }
+          break;
+        default:
+          return -1;
+        }
+    }
+  return count;
+}
+
 /* Non-zero if "p1 matches something" implies "p2 fails".  */
 static int
 mutually_exclusive_p (bufp, p1, p2)
@@ -5200,6 +5420,9 @@
   re_char **best_regstart, **best_regend;
 #endif
=20
+  /* Discard a saved register from the stack.  */
+  boolean discard_saved_regs =3D 0;
+
   /* Logically, this is `best_regend[0]'.  But we don't want to have to
      allocate space for that if we're not allocating space for anything
      else (see below).  Also, we never need info about register 0 for
@@ -5772,6 +5995,77 @@
 	  p +=3D 1;
 	  break;
=20
+        case lookahead:
+        case lookahead_not:
+          DEBUG_PRINT1 ((re_opcode_t) *(p - 1) =3D=3D lookahead ? "EXECUTI=
NG lookahead.\n" : "EXECUTING lookahead_not.\n");
+
+          p +=3D 2;
+          PUSH_FAILURE_POINT (p - 3, d);
+          break;
+
+        case lookbehind:
+        case lookbehind_not:
+          {
+            int mcnt, count;
+            boolean not =3D (re_opcode_t) *(p - 1) !=3D lookbehind;
+
+            EXTRACT_NUMBER_AND_INCR (mcnt, p);
+            EXTRACT_NUMBER_AND_INCR (count, p);
+
+            DEBUG_PRINT2 (not
+                          ? "EXECUTING lookbehind_not %d.\n"
+                          : "EXECUTING lookbehind %d.\n", count);
+=20=20=20=20=20=20=20=20=20=20=20=20
+            dfail =3D d;
+            while (d !=3D string1 && count > 0)
+              {
+                if (d =3D=3D string2)
+                  {
+                    if (!string1)
+                      break;
+                    d =3D end1;
+                    dend =3D end_match_1;
+                  }
+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
+                if (target_multibyte)
+                  {
+                    re_char *dhead =3D (d >=3D string1 && d <=3D end1) ? s=
tring1 : string2;
+                    PREV_CHAR_BOUNDARY (d, dhead);
+                  }
+                else
+                  d--;
+                count--;
+              }
+
+            if (count > 0)
+              {
+                if (not)
+                  {
+                    /* There is no enough string to match.
+                       So just make it succeeded here. */
+                    d =3D dfail;
+                    p =3D p - 2 + mcnt;
+                    break;
+                  }
+                else
+                  goto fail;
+              }
+
+            PUSH_FAILURE_POINT (p - 5, dfail);
+          }
+          break;
+
+        case lookaround_succeed:
+          DEBUG_PRINT1 ("EXECUTING lookaround_succeed.\n");
+=20=20=20=20=20=20=20=20=20=20
+          FINISH_LOOKAROUND();
+          break;
+
+        case lookaround_fail:
+          DEBUG_PRINT1 ("EXECUTING lookaround_fail.\n");
+=20=20=20=20=20=20=20=20=20=20
+          FINISH_LOOKAROUND();
+          goto fail;
=20
 	/* \<digit> has been turned into a `duplicate' command which is
 	   followed by the numeric value of <digit> as the register number.  */
@@ -6413,12 +6707,16 @@
 	    case on_failure_jump_loop:
 	    case on_failure_jump:
 	    case succeed_n:
+            case lookahead_not:
+            case lookbehind_not:
 	      d =3D str;
 	    continue_failure_jump:
 	      EXTRACT_NUMBER_AND_INCR (mcnt, pat);
 	      p =3D pat + mcnt;
 	      break;
=20
+            case lookahead:
+            case lookbehind:
 	    case no_op:
 	      /* A special frame used for nastyloops. */
 	      goto fail;


Test cases:

;; -*-coding:utf-8-*-

(defvar test-counter 0)

(defmacro test (&rest form)
  `(princ-list (format "%d ... " (setq test-counter (1+ test-counter)))
               (condition-case nil
                   (if (progn ,@form) 'ok 'fail)
                 (error 'invalid))))

(defun expect-invalid (regexp)
  (test (condition-case nil
            (prog1 nil (string-match regexp ""))
          (error t))))

(defun expect-match (regexp string &optional group-number group-string)
  (test (and (string-match regexp string)
             (if group-number
                 (equal (match-string group-number string) group-string)
               t))))

(defun expect-not-match (regexp string)
  (test (not (string-match regexp string))))

(expect-match "\\(?=3D\\)" "")
(expect-not-match "\\(?=3Da\\)" "")
(expect-match "a\\(?=3Db\\)b" "ab")
(expect-not-match "a\\(?=3Db\\)c" "ab")
(expect-match "\\(?=3Da\\)a" "a")
(expect-not-match "\\(?=3Db\\)a" "a")
(expect-match "\\(?=3D^\\)a" "a")
(expect-match "a\\(?=3D$\\)$" "a")
(expect-match "a\\(?=3D\\)$" "a")
(expect-match "a\\(?=3D.*c\\)b" "abc")
(expect-not-match "a\\(?=3D.*d\\)b" "abc")
(expect-match "a\\(?=3Db\\|c\\|d\\|e\\)" "ae")
(expect-not-match "a\\(?=3Db\\|c\\|d\\|e\\)" "af")
(expect-match "a\\(?=3D\\(b\\)\\)b" "ab" 1 "b")
(expect-match "a\\(\\(?=3Db\\)\\)" "ab" 1 "")
(expect-match "a\\(?=3D\\(b\\)\\)" "ab" 1 "b")
(expect-match "\\(a\\(?=3D\\(b\\)\\)\\2\\)\\1" "abab" 1 "ab")
(expect-not-match "\\(a\\)\\(?=3D\\(b\\)\\)\\1" "ab")
(expect-match "\\(a\\(?=3Db\\(?=3Dc\\)\\)\\)" "abc" 1 "a")
(expect-not-match "\\(a\\(?=3Db\\(?=3Dc\\)\\)\\)" "abd")
(expect-not-match "\\(?!\\)" "")
(expect-match "\\(?!a\\)" "")
(expect-not-match "a\\(?!b\\)b" "ab")
(expect-match "a\\(?!b\\)c" "ac")
(expect-not-match "\\(?!a\\)a" "a")
(expect-match "\\(?!b\\)a" "a")
(expect-match "\\(?!^\\)a" "ba")
(expect-not-match "\\(?!^\\)a" "a")
(expect-not-match "a\\(?!$\\)$" "a")
(expect-not-match "a\\(?!\\)$" "a")
(expect-not-match "a\\(?!.*c\\)b" "abc")
(expect-match "a\\(?!.*d\\)b" "abc")
(expect-not-match "a\\(?!b\\|c\\|d\\|e\\)" "ae")
(expect-match "a\\(?!b\\|c\\|d\\|e\\)" "af")
(expect-match "a\\(?!\\(b\\)\\)c" "ac")
(expect-match "a\\(\\(?!b\\)\\)" "ac")
(expect-match "a\\(?!b\\(?!c\\)\\)" "abc")
(expect-not-match "a\\(?!b\\(?=3D\\(c\\)\\)\\)" "abc")
(expect-not-match "a\\(?!b\\(?!c\\)\\)" "abd")
(expect-match "\\(?<=3D\\)" "")
(expect-not-match "\\(?<=3Da\\)" "")
(expect-match "\\(?<=3Da\\)" "a")
(expect-not-match "\\(?<=3Db\\)" "a")
(expect-match "\\(?<=3D^\\)" "")
(expect-not-match "a\\(?<=3D^\\)" "")
(expect-match "\\(?<=3D$\\)" "")
(expect-not-match "\\(?<=3D$\\)a" "")
(expect-match "\\(?<=3Da\\)b" "ab")
(expect-not-match "\\(?<=3Dc\\)b" "ab")
(expect-match "\\(?<=3D\\(?<=3Da\\)\\)b" "ab")
(expect-not-match "\\(?<=3D\\(?<=3Db\\)\\)b" "ab")
(expect-match "\\(?<=3D\\(?=3Da\\).\\)b" "ab")
(expect-match "\\(?<=3D\\(a\\)\\)b\\1" "aba" 1 "a")
(expect-match "\\(?<=3D.\\)a" "aa")
(expect-match "\\(?<=3D\\(.\\)\\)a" "aa")
(expect-match "\\(?<=3D\\w\\)a" "aa")
(expect-not-match "\\(?<=3D\\w\\)a" "!a")
(expect-match "\\(?<=3D\\sw\\)a" "aa")
(expect-not-match "\\(?<=3D\\sw\\)a" "!a")
(expect-match "\\(?<=3D\\cg\\)a" "=A6=CBa")
(expect-not-match "\\(?<=3D\\Cg\\)a" "=A6=CBa")
(expect-match "\\(?<=3D[a-z]\\)" "aa")
(expect-not-match "\\(?<=3D[a-z]\\)a" "1a")
(expect-match "\\(?<=3D[^a-z]\\)" "1a")
(expect-not-match "\\(?<=3D[^a-z]\\)" "aa")
(expect-match "\\(?<=3D[:ascii:]\\)a" "aa")
(expect-match "\\(?<=3D\\`\\)" "")
(expect-not-match "a\\(?<=3D\\`\\)" "a")
(expect-match "\\(?<=3D\\'\\)" "")
(expect-not-match "\\(?<=3D\\'\\)a" "a")
(expect-not-match "\\(?<=3D\\=3D\\)" "")
(expect-match "\\(?<=3D\\b\\)a" "a")
(expect-not-match "a\\(?<=3D\\b\\)b" "ab")
(expect-match "\\(?<=3D\\B\\)a" "aa")
(expect-not-match "\\(?<=3D\\B\\)a" " a")
(expect-match "\\(?<=3D\\<\\)a" "a")
(expect-not-match "a\\(?<=3D\\<\\)b" "ab")
(expect-match "a\\(?<=3D\\>\\)" "a")
(expect-not-match "a\\(?<=3D\\>\\)b" "ab")
(expect-match "\\(?<=3D\\_<\\)a" "a")
(expect-not-match "a\\(?<=3D\\_<\\)b" "ab")
(expect-match "a\\(?<=3D\\_>\\)" "a")
(expect-not-match "a\\(?<=3D\\_>\\)b" "ab")
(expect-invalid "\\(?<=3D\\(.\\)\\1\\)")  ; duplicate
(expect-invalid "\\(?<=3Da*\\)")          ; variable width
(expect-invalid "\\(?<=3Da*?\\)")         ; variable width
(expect-invalid "\\(?<=3Da+\\)")          ; variable width
(expect-invalid "\\(?<=3Da+?\\)")         ; variable width
(expect-invalid "\\(?<=3Da?\\)")          ; variable width
(expect-invalid "\\(?<=3Da??\\)")         ; variable width
(expect-invalid "\\(?<=3Da\\{1,4\\}\\)")  ; variable width
(expect-invalid "\\(?<=3Da\\|bb\\|ccc\\)") ; variable width
(expect-invalid "\\(?<=3Da\\{4\\}\\)")   ; fixed width but not supported yet
(expect-invalid "\\(?<=3Da\\|\\b\\c\\)")   ; fixed width but not supported =
yet
(expect-not-match "\\(?<!\\)" "")
(expect-match "\\(?<!a\\)" "")
(expect-match "\\(?<!a\\)" "a")
(expect-not-match "\\(?<!a\\)b" "ab")
(expect-match "\\(?<!b\\)" "a")
(expect-not-match "\\(?<!^\\)" "")
(expect-not-match "a\\(?<!^\\)" "")
(expect-not-match "\\(?<!$\\)" "")
(expect-match "\\(?<=3Da\\)b" "ab")
(expect-match "\\(?<!c\\)b" "ab")
(expect-match "\\(?<!\\(?<!a\\)\\)b" "ab")
(expect-not-match "\\(?<!\\(?<!b\\)\\)b" "ab")
(expect-match "\\(?<!\\(?!a\\).\\)b" "ab")
(expect-match "\\(?<!.\\)a" "aa")
(expect-not-match "\\(?<!.\\)b" "ab")
(expect-not-match "\\(?<!\\(.\\)\\)b" "ab")
(expect-not-match "\\(?<!\\w\\)b" "ab")
(expect-not-match "\\(?<!\\w\\)b" "ab")
(expect-not-match "\\(?<!\\sw\\)b" "ab")
(expect-match "\\(?<!\\sw\\)a" "!a")
(expect-not-match "\\(?<!\\cg\\)a" "=A6=CBa")
(expect-match "\\(?<!\\Cg\\)a" "=A6=CBa")
(expect-match "\\(?<![a-z]\\)" "aa")
(expect-match "\\(?<![a-z]\\)a" "1a")
(expect-not-match "\\(?<![^a-z]\\)a" "1a")
(expect-not-match "\\(?<![:ascii:]\\)b" "ab")
(expect-not-match "\\(?<!\\`\\)" "")
(expect-match "a\\(?<!\\`\\)" "a")
(expect-not-match "\\(?<!\\'\\)" "")
(expect-match "\\(?<!\\'\\)a" "a")
(expect-match "\\(?<!\\=3D\\)" "")
(expect-not-match "\\(?<!\\b\\)a" "a")
(expect-match "a\\(?<!\\b\\)b" "ab")
(expect-not-match "\\(?<!\\B\\)b" "ab")
(expect-match "\\(?<!\\B\\)a" " a")
(expect-not-match "\\(?<!\\<\\)a" "a")
(expect-match "a\\(?<!\\<\\)b" "ab")
(expect-not-match "a\\(?<!\\>\\)" "a")
(expect-match "a\\(?<!\\>\\)b" "ab")
(expect-not-match "\\(?<!\\_<\\)a" "a")
(expect-match "a\\(?<!\\_<\\)b" "ab")
(expect-not-match "a\\(?<!\\_>\\)" "a")
(expect-match "a\\(?<!\\_>\\)b" "ab")
(expect-invalid "\\(?<!\\(.\\)\\1\\)")  ; duplicate
(expect-invalid "\\(?<!a*\\)")          ; variable width
(expect-invalid "\\(?<!a*?\\)")         ; variable width
(expect-invalid "\\(?<!a+\\)")          ; variable width
(expect-invalid "\\(?<!a+?\\)")         ; variable width
(expect-invalid "\\(?<!a?\\)")          ; variable width
(expect-invalid "\\(?<!a??\\)")         ; variable width
(expect-invalid "\\(?<!a\\{1,4\\}\\)")  ; variable width
(expect-invalid "\\(?<!a\\|bb\\|ccc\\)") ; variable width
(expect-invalid "\\(?<!a\\{4\\}\\)")   ; fixed width but not supported yet
(expect-invalid "\\(?<!a\\|\\b\\c\\)")   ; fixed width but not supported yet

(expect-match "Hello, \\(?=3D=CA=C0=BD=E7\\)" "Hello, =CA=C0=BD=E7!")
(expect-not-match "Hello, \\(?=3D=A4=BB=A4=AB=A4=A4\\)" "Hello, =CA=C0=BD=
=E7!")
(expect-match "Hello, \\(?!=A4=BB=A4=AB=A4=A4\\)" "Hello, =CA=C0=BD=E7!")
(expect-not-match "Hello, \\(?!=CA=C0=BD=E7\\)" "Hello, =CA=C0=BD=E7!")
(expect-match "\\(?<=3D=A4=B3=A4=F3=A4=CB=A4=C1=A4=CF\\), World!" "=A4=B3=
=A4=F3=A4=CB=A4=C1=A4=CF, World!")
(expect-not-match "\\(?<=3D=A4=B3=A4=F3=A4=CB=A4=C1=A4=EF\\), World!" "=A4=
=B3=A4=F3=A4=CB=A4=C1=A4=CF, World!")
(expect-match "\\(?<!=A4=B3=A4=F3=A4=CB=A4=C1=A4=EF\\), World!" "=A4=B3=A4=
=F3=A4=CB=A4=C1=A4=CF, World!")
(expect-not-match "\\(?<!=A4=B3=A4=F3=A4=CB=A4=C1=A4=CF\\), World!" "=A4=B3=
=A4=F3=A4=CB=A4=C1=A4=CF, World!")

(require 'cl)

(with-temp-buffer
  (insert "abracadabra")
  (goto-char (point-min))
  (test (equal
         (loop while (re-search-forward "a\\(?=3Db\\)" nil t)
               collect (point))
         '(2 9))))

(with-temp-buffer
  (insert "abracadabra")
  (test (equal
         (loop while (re-search-backward "a\\(?=3Db\\)" nil t)
               collect (point))
         '(8 1))))

(with-temp-buffer
  (insert "abracadabra")
  (goto-char (point-min))
  (test (equal
         (loop while (re-search-forward "\\(?<=3Da\\)b" nil t)
               collect (point))
         '(3 10))))

(with-temp-buffer
  (insert "abracadabra")
  (test (equal
         (loop while (re-search-backward "\\(?<=3Da\\)b" nil t)
               collect (point))
         '(9 2))))

(with-temp-buffer
  (insert "abcdebc")
  (goto-char 3)
  (test (eq (re-search-forward "\\(?<=3Db\\)c" nil t) 4)))

(with-temp-buffer
  (insert "abcdebc")
  (goto-char 7)
  ;; search-backward with lookahead over bound is not supported yet
  (test (eq (re-search-backward "b\\(?=3Dc\\)" nil t) 2)))

(when (member "perf" argv)
  ;; generate big file
  (require 'find-func)
  (let ((file (concat (or find-function-C-source-directory "~/src/emacs") "=
/xdisp.c"))
        count)
    (with-temp-buffer
      (insert-file-contents file)
      (dolist (pair '((point-min . re-search-forward) (point-max . re-searc=
h-backward)))
        (dolist (regexp '("unsigned \\(?:char\\|int\\|long\\)" "unsigned \\=
(?=3Dchar\\|int\\|long\\)"
                          "\\(?:unsigned \\)int" "\\(?<=3Dunsigned \\)int"))
          (setq count 0)
          (princ-list regexp
                      ": "
                      (car
                       (benchmark-run
                        10
                        (progn
                          (goto-char (funcall (car pair)))
                          (while (funcall (cdr pair) regexp nil t)
                            (setq count (1+ count))))))
                      " elapsed (" count " found)"))))))


--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5393; Package emacs. Full text available.

Message received at 5393 <at> debbugs.gnu.org:


Received: (at 5393) by debbugs.gnu.org; 28 Feb 2016 18:23:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 28 13:23:06 2016
Received: from localhost ([127.0.0.1]:50997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aa5zm-0008BI-Kc
	for submit <at> debbugs.gnu.org; Sun, 28 Feb 2016 13:23:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:36869)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <rgm@HIDDEN>) id 1aa5zk-0008Ad-Ve
 for 5393 <at> debbugs.gnu.org; Sun, 28 Feb 2016 13:23:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1aa5zf-00023x-3j
 for 5393 <at> debbugs.gnu.org; Sun, 28 Feb 2016 13:22:59 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39904)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1aa5zX-0001xh-0X; Sun, 28 Feb 2016 13:22:51 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1aa5zS-0006Dh-RD; Sun, 28 Feb 2016 13:22:46 -0500
From: Glenn Morris <rgm@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: control message for bug 5393
References: <E1RpP6b-00077v-6Q@HIDDEN> <87twkts694.fsf@HIDDEN>
X-Spook: [Hello to all my friends and fans in domestic
X-Ran: ^Hxt39]r`B%aOO55?y]9w<K|<dpQ|HC/i1oTXeLz1t*fo4m"QH5@|+'y=Qcdb{.77cD>&:
X-Hue: yellow
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Sun, 28 Feb 2016 13:22:46 -0500
In-Reply-To: <87twkts694.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 28 Feb 2016 17:23:19 +1100")
Message-ID: <t0mvqkzocp.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 5393
Cc: 5393 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Lars Ingebrigtsen wrote:

> Glenn Morris <rgm@HIDDEN> writes:
>
>> forwarded 5393
>> http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00732.html
>
> I was unable to find the patch in question on that link...  Anybody?

I just use "forwarded" to link to a place with more recent discussion.
The patch is in the original bug report, the only message in the report.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5393; Package emacs. Full text available.

Message received at 5393 <at> debbugs.gnu.org:


Received: (at 5393) by debbugs.gnu.org; 28 Feb 2016 10:26:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 28 05:26:05 2016
Received: from localhost ([127.0.0.1]:49535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aZyY6-0004il-7z
	for submit <at> debbugs.gnu.org; Sun, 28 Feb 2016 05:26:05 -0500
Received: from mout.gmx.net ([212.227.15.19]:63719)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <stephen.berman@HIDDEN>) id 1aZyY0-0004i7-F6
 for 5393 <at> debbugs.gnu.org; Sun, 28 Feb 2016 05:26:00 -0500
Received: from rosalinde ([89.245.96.185]) by mail.gmx.com (mrgmx002) with
 ESMTPSA (Nemesis) id 0MYfre-1aMCui1WOg-00VTwd; Sun, 28 Feb 2016 11:25:50
 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#5393: control message for bug 5393
References: <E1RpP6b-00077v-6Q@HIDDEN> <87twkts694.fsf@HIDDEN>
Date: Sun, 28 Feb 2016 11:25:49 +0100
In-Reply-To: <87twkts694.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 28 Feb 2016 17:23:19 +1100")
Message-ID: <87h9gtdtci.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:bNOrsDbXGCVeoInvOQvjW5QGHzlJKH9ijVZu8HKlwP9KHAc7yBa
 lAv0a4XTmzCmjM4SUAPIhm3zRBhAys5AyYjaVdjkEnJYuhRey3WXp0T9j25PVax3v0f+3lj
 fd2nu8HhK0k6gvPS3B67zcVJbGlJsH+O0GXfbI6UC/XIiliURTer6ot7OFRJ5DHZv4Sipn9
 M70UOvbHhAUWsTXEa1++A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:X/iMI1Qyvu8=:RlVye19v2YRnzuJd6qyXiD
 3kgJ3HzLPGmAglmLxHMgzvZeUcpXRqR7lj66qKjmaPyVQNIOGeSnN0J4oiKC6ZJ1j2fXYG3bn
 YoH3CSpEVdKZCkndj/B0xXPz2uh58ad8rF8bZ9zaeSsJZwAyZLLQ6Nytbfy5ZAfQzMPrvswiC
 4GmAJFFgQK1iU3YAKlPeVn/Y9L8rTx5NsrWZUTL+V7qxn6DS3gdfXNihilxhrmK1yptB1TdQ7
 qqISVjHItargvrfszP5o9peuoKC/l2VDQB+f/zXd6w7syNFq4zKrnlF9Z0Alw+/FOEJz2nhhq
 QmVRZeqmZfk4kP52FRoQCs/tkBSdqxzWurKUVHIiycaPo0fD6jf2JGOBdEKyrp3NaU4W450/X
 oy/3Ajb9CD4YVqG1nsUWlWune31fd2L/6sLtR27cYk+DxCORtDXqCXa1WBAf/cr70MO7DXjY+
 Ak1isjxdIHZO8k63blx9v6FuBQ1JoRGO1qyaJRjtZc49fuGVpmSbOyNjNJvuVwp+9/rhQEafM
 ketjYLmnapYsub344IQwqUIE51VECf9ikVn28DM3lXR8ebN1Uv+Z1Feh7vIobmkWxjRp/dUaR
 QPXc/JDJ8+1CIO830RO+YPFhRDEKXeCbFbj2z9PcF8lCDb280YLEoCnxLm7rxqQKvCP91IKkK
 Qb2abe54rh8MXaQCQgAvi6f4BD0gXu627SIZmr6ubYklc0FhzDqx24rD0QdmsXLYG6vrl6JXi
 AWZkQRYnpC9uvJKQqlDG7T9NYUkb6RUiw/RSxELSHQHHBjl9cZWWPyzrk8FFTu1eCp/+vEVWD
 8G+skpQ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 5393
Cc: Glenn Morris <rgm@HIDDEN>, 5393 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Sun, 28 Feb 2016 17:23:19 +1100 Lars Ingebrigtsen <larsi@HIDDEN> wrote:

> Glenn Morris <rgm@HIDDEN> writes:
>
>> forwarded 5393 http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00732.html
>
> I was unable to find the patch in question on that link...  Anybody?

I think it's here:

http://lists.gnu.org/archive/html/emacs-devel/2009-06/msg00094.html

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5393; Package emacs. Full text available.

Message received at 5393 <at> debbugs.gnu.org:


Received: (at 5393) by debbugs.gnu.org; 28 Feb 2016 06:23:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 28 01:23:51 2016
Received: from localhost ([127.0.0.1]:49422 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aZulj-0003jD-90
	for submit <at> debbugs.gnu.org; Sun, 28 Feb 2016 01:23:51 -0500
Received: from hermes.netfonds.no ([80.91.224.195]:53449)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <larsi@HIDDEN>) id 1aZulh-0003j5-Ed
 for 5393 <at> debbugs.gnu.org; Sun, 28 Feb 2016 01:23:49 -0500
Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161]
 helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <larsi@HIDDEN>)
 id 1aZulI-0004Oj-MD; Sun, 28 Feb 2016 07:23:25 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: control message for bug 5393
References: <E1RpP6b-00077v-6Q@HIDDEN>
Date: Sun, 28 Feb 2016 17:23:19 +1100
In-Reply-To: <E1RpP6b-00077v-6Q@HIDDEN> (Glenn Morris's message of
 "Mon, 23 Jan 2012 13:59:01 -0500")
Message-ID: <87twkts694.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-MailScanner-ID: 1aZulI-0004Oj-MD
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1457245405.5496@ZWPyZ+eymvYXptiO/gJBBg
X-Spam-Status: No
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5393
Cc: 5393 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Glenn Morris <rgm@HIDDEN> writes:

> forwarded 5393 http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00732.html

I was unable to find the patch in question on that link...  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5393; Package emacs. Full text available.
Set bug forwarded-to-address to 'http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00732.html'. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at quiet <at> debbugs.gnu.org:


Received: (at quiet) by debbugs.gnu.org; 15 Jan 2010 18:45:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 15 13:45:36 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NVrAt-0007D7-JY
	for submit <at> debbugs.gnu.org; Fri, 15 Jan 2010 13:45:35 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rgm@HIDDEN>) id 1NVrAk-0007Cq-0k
	for quiet <at> debbugs.gnu.org; Fri, 15 Jan 2010 13:45:26 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.69)
	(envelope-from <rgm@HIDDEN>) id 1NVrAf-0007ha-Lm
	for quiet <at> debbugs.gnu.org; Fri, 15 Jan 2010 13:45:21 -0500
From: Tomohiro MATSUYAMA <t.matsuyama.pub@HIDDEN>
To: quiet <at> debbugs.gnu.org
Subject: Patch for lookaround assertion in regexp
Date: Thu, 4 Jun 2009 08:04:25 +0900
Lines: 509
X-From-Line: emacs-devel-bounces+rgm=gnu.org@HIDDEN Wed Jun 3 22:52:10 2009
Received: from mx10.gnu.org ([199.232.76.166]:50249)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1MC32z-0002av-5e for rgm@HIDDEN; Wed, 03 Jun 2009 22:52:10 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.60) (envelope-from <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1MC32v-00068s-6S for rgm@HIDDEN; Wed, 03 Jun 2009 22:51:14 -0400
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python
X-Spam-Level: 
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DNS_FROM_RFC_POST,
	UNPARSEABLE_RELAY autolearn=no version=3.1.0
Received: from lists.gnu.org ([199.232.76.165]:37880)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1MC32u-00068k-Qu for rgm@HIDDEN; Wed, 03 Jun 2009 22:51:12 -0400
Received: from localhost ([127.0.0.1]:41265 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MC32u-0005GY-OS
	for rgm@HIDDEN; Wed, 03 Jun 2009 22:51:12 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MBzVZ-00044a-Dt
	for emacs-devel@HIDDEN; Wed, 03 Jun 2009 19:04:33 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MBzVU-000433-3D
	for emacs-devel@HIDDEN; Wed, 03 Jun 2009 19:04:32 -0400
Received: from [199.232.76.173] (port=47210 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MBzVT-000430-VL
	for emacs-devel@HIDDEN; Wed, 03 Jun 2009 19:04:28 -0400
Received: from mail-qy0-f184.google.com ([209.85.221.184]:52994)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <t.matsuyama.pub@HIDDEN>) id 1MBzVT-0007ft-4Z
	for emacs-devel@HIDDEN; Wed, 03 Jun 2009 19:04:27 -0400
Received: by qyk14 with SMTP id 14so626713qyk.14
	for <emacs-devel@HIDDEN>; Wed, 03 Jun 2009 16:04:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:date:message-id:subject
	:from:to:content-type;
	bh=ycCIYX/dE/3KAd++YBMdxE3BnOi/V1F7JWLkT+j3Z4o=;
	b=PijZx4W2rQ7RhNmj1ptkHEftrtdvsJcqUaKjQqNFV02UGSHkmjPywKUzh4gSfx6kiT
	zQUXwKt/ilIW3dqkYnbkvli5HkOmYmdf5sjZvjeDr6TVCLqjW4Eqe7WSFkI55/sLmDyf
	9JphCA66hJa8WFEjc8FuaV2DUfL/5uAF4gHVg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=b5FKtc1ZIgUw29wF5joH59mHaUIO9r/ULcaDjgXxaqBitJbPhKad7cK+q66vRBWBcY
	wCrii7cSafc9/wQwsxyGQcR0EkfMXL2tcLvCZOQa0aiuT2Rf11jprAbeOyMr0fi0dLYH
	NlIoe6mEZI/r2D/xioCQSdIer41N5gtHuTIjk=
Received: by 10.220.46.20 with SMTP id h20mr1269423vcf.55.1244070265807; Wed, 
	03 Jun 2009 16:04:25 -0700 (PDT)
X-Debbugs-No-Ack: yes
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Wed, 03 Jun 2009 22:50:33 -0400
X-BeenThere: emacs-devel@HIDDEN
X-Mailman-Version: 2.1.5
Precedence: list
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
Message-ID: <lctyun2on2.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: quiet
X-Mailman-Approved-At: Fri, 15 Jan 2010 13:45:34 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

--=-=-=
Content-Type: text/plain; charset=iso-8859-1

Severity: wishlist
Tags: patch

[ resent from
  http://lists.gnu.org/archive/html/emacs-devel/2009-06/msg00094.html ]

Hi, all

I have attached a patch that enables you to
use lookaround assertion in regexp
with following syntax:

* Positive lookahead assertion
    \(?=...\)
* Negative lookahead assertion
    \(?!...\)
* Positive lookbehind assertion
    \(?<=...\)
* Negative lookbehind assertion
    \(?<!...\)

Basically, it works as same as Perl's one.

Spec:
* Any pattern is allowed in lookahead assertion.
* Nested looaround assertion is allowed.
* Capturing is allowed only in positive lookahead/lookbehind assertion.
* Duplication is allowed after such assertion.
* Variable length pattern is NOT yet allowed in lookbehind assertion.
  [x] \(?<=[0-9]+\)MB
  [o] \(?<=[0-9][0-9][0-9][0-9]\)MB
* Lookahead assertion over start bound is not allowed in re-search-backward.
  (re-search-backward "\(?<=a\)b") for buffer "abca_|_b"
  will seek to first "ab".

As of performace, I think there is no problem about lookahead assertion,
but lookbehind assertion is somewhat high cost.
You can check this patch works properly with a testcase I have attached
and also see performance:
    src/emacs --script regex-test.el perf

I saw that lookbehind assertion will spend 5 times than usual lookbehind alike
regexp. I think I have to improve its performance.

Anyway, please try it and review it.
And if like it, please merge it.
I believe that some people really want to use it.

Regards,
MATSUYAMA Tomohiro

--=-=-=
Content-Type: application/octet-stream; name=regex-test.el
Content-Disposition: attachment; filename=regex-test.el
Content-Transfer-Encoding: base64

OzsgLSotY29kaW5nOnV0Zi04LSotCgooZGVmdmFyIHRlc3QtY291bnRlciAwKQoKKGRlZm1hY3Jv
IHRlc3QgKCZyZXN0IGZvcm0pCiAgYChwcmluYy1saXN0IChmb3JtYXQgIiVkIC4uLiAiIChzZXRx
IHRlc3QtY291bnRlciAoMSsgdGVzdC1jb3VudGVyKSkpCiAgICAgICAgICAgICAgIChjb25kaXRp
b24tY2FzZSBuaWwKICAgICAgICAgICAgICAgICAgIChpZiAocHJvZ24gLEBmb3JtKSAnb2sgJ2Zh
aWwpCiAgICAgICAgICAgICAgICAgKGVycm9yICdpbnZhbGlkKSkpKQoKKGRlZnVuIGV4cGVjdC1p
bnZhbGlkIChyZWdleHApCiAgKHRlc3QgKGNvbmRpdGlvbi1jYXNlIG5pbAogICAgICAgICAgICAo
cHJvZzEgbmlsIChzdHJpbmctbWF0Y2ggcmVnZXhwICIiKSkKICAgICAgICAgIChlcnJvciB0KSkp
KQoKKGRlZnVuIGV4cGVjdC1tYXRjaCAocmVnZXhwIHN0cmluZyAmb3B0aW9uYWwgZ3JvdXAtbnVt
YmVyIGdyb3VwLXN0cmluZykKICAodGVzdCAoYW5kIChzdHJpbmctbWF0Y2ggcmVnZXhwIHN0cmlu
ZykKICAgICAgICAgICAgIChpZiBncm91cC1udW1iZXIKICAgICAgICAgICAgICAgICAoZXF1YWwg
KG1hdGNoLXN0cmluZyBncm91cC1udW1iZXIgc3RyaW5nKSBncm91cC1zdHJpbmcpCiAgICAgICAg
ICAgICAgIHQpKSkpCgooZGVmdW4gZXhwZWN0LW5vdC1tYXRjaCAocmVnZXhwIHN0cmluZykKICAo
dGVzdCAobm90IChzdHJpbmctbWF0Y2ggcmVnZXhwIHN0cmluZykpKSkKCihleHBlY3QtbWF0Y2gg
IlxcKD89XFwpIiAiIikKKGV4cGVjdC1ub3QtbWF0Y2gg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heCAuIHJlLXNlYXJjaC1iYWNrd2FyZCkpKQog
ICAgICAgIChkb2xpc3QgKHJlZ2V4cCAnKCJ1bnNpZ25lZCBcXCg/OmNoYXJcXHxpbnRcXHxsb25n
XFwpIiAidW5zaWduZWQgXFwoPz1jaGFyXFx8aW50XFx8bG9uZ1xcKSIKICAgICAgICAgICAgICAg
ICAgICAgICAgICAiXFwoPzp1bnNpZ25lZCBcXClpbnQiICJcXCg/PD11bnNpZ25lZCBcXClpbnQi
KSkKICAgICAgICAgIChzZXRxIGNvdW50IDApCiAgICAgICAgICAocHJpbmMtbGlzdCByZWdleHAK
ICAgICAgICAgICAgICAgICAgICAgICI6ICIKICAgICAgICAgICAgICAgICAgICAgIChjYXIKICAg
ICAgICAgICAgICAgICAgICAgICAoYmVuY2htYXJrLXJ1bgogICAgICAgICAgICAgICAgICAgICAg
ICAxMAogICAgICAgICAgICAgICAgICAgICAgICAocHJvZ24KICAgICAgICAgICAgICAgICAgICAg
ICAgICAoZ290by1jaGFyIChmdW5jYWxsIChjYXIgcGFpcikpKQogICAgICAgICAgICAgICAgICAg
ICAgICAgICh3aGlsZSAoZnVuY2FsbCAoY2RyIHBhaXIpIHJlZ2V4cCBuaWwgdCkKICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIChzZXRxIGNvdW50ICgxKyBjb3VudCkpKSkpKQogICAgICAgICAg
ICAgICAgICAgICAgIiBlbGFwc2VkICgiIGNvdW50ICIgZm91bmQpIikpKSkpKQo=
--=-=-=
Content-Type: application/octet-stream; name=emacs-regex.patch
Content-Disposition: attachment; filename=emacs-regex.patch
Content-Transfer-Encoding: base64

SW5kZXg6IHNyYy9yZWdleC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9zb3VyY2VzL2VtYWNzL2Vt
YWNzL3NyYy9yZWdleC5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjIzNgpka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iZWhpbmQ6CisgICAgICAgICAgZXh0cmFjdF9udW1iZXJfYW5kX2lu
Y3IgKCZtY250LCAmcCk7CisgICAgICAgICAgZXh0cmFjdF9udW1iZXJfYW5kX2luY3IgKCZtY250
MiwgJnApOworICAgICAgICAgIGZwcmludGYgKHN0ZGVyciwgIi9sb29rYmVoaW5kLyVkLyVkIiwg
bWNudCwgbWNudDIpOworICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgbG9va2JlaGlu
ZF9ub3Q6CisgICAgICAgICAgZXh0cmFjdF9udW1iZXJfYW5kX2luY3IgKCZtY250LCAmcCk7Cisg
ICAgICAgICAgZXh0cmFjdF9udW1iZXJfYW5kX2luY3IgKCZtY250MiwgJnApOworICAgICAgICAg
IGZwcmludGYgKHN0ZGVyciwgIi9sb29rYmVoaW5kX25vdC8lZC8lZCIsIG1jbnQsIG1jbnQyKTsK
KyAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlIGxvb2thcm91bmRfc3VjY2VlZDoKKwkg
IGZwcmludGYgKHN0ZGVyciwgIi9sb29rYXJvdW5kX3N1Y2NlZWQiKTsKKyAgICAgICAgICBicmVh
azsKKworICAgICAgICBjYXNlIGxvb2thcm91bmRfZmFpbDoKKyAgICAgICAgICBmcHJpbnRmIChz
dGRlcnIsICIvbG9va2Fyb3VuZF9mYWlsIik7CisgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg
ICAKIAljYXNlIGR1cGxpY2F0ZToKIAkgIGZwcmludGYgKHN0ZGVyciwgIi9kdXBsaWNhdGUvJWQi
LCAqcCsrKTsKIAkgIGJyZWFrOwpAQCAtMTYwMCwxMSArMTYzNywxNyBAQAogICAgIH0JCQkJCQkJ
CQlcCiAgIGVsc2UJCQkJCQkJCQlcCiAgICAgewkJCQkJCQkJCVwKLSAgICAgIHJlZ2VuZFtyZWdd
ID0gUE9QX0ZBSUxVUkVfUE9JTlRFUiAoKTsJCQkJXAotICAgICAgcmVnc3RhcnRbcmVnXSA9IFBP
UF9GQUlMVVJFX1BPSU5URVIgKCk7CQkJCVwKLSAgICAgIERFQlVHX1BSSU5UNCAoIiAgICAgUG9w
IHJlZyAlZCAoc3Bhbm5pbmcgJXAgLT4gJXApXG4iLAkJXAotCQkgICAgcmVnLCByZWdzdGFydFty
ZWddLCByZWdlbmRbcmVnXSk7CQkJXAotICAgIH0JCQkJCQkJCQlcCisgICAgICByZV9jaGFyICpz
dGFydCwgKmVuZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc
CisgICAgICBlbmQgPSBQT1BfRkFJTFVSRV9QT0lOVEVSICgpOyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBcCisgICAgICBzdGFydCA9IFBPUF9GQUlMVVJFX1BPSU5URVIgKCk7
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICBpZiAoIWRpc2NhcmRf
c2F2ZWRfcmVncykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisg
ICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBcCisgICAgICAgICAgcmVnc3RhcnRbcmVnXSA9IHN0YXJ0OyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgcmVnZW5kW3JlZ10g
PSBlbmQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAg
ICAgICAgREVCVUdfUFJJTlQ0ICgiICAgICBQb3AgcmVnICVkIChzcGFubmluZyAlcCAtPiAlcClc
biIsICAgICAgICBcCisgICAgICAgICAgICAgICAgICAgICAgICByZWcsIHJlZ3N0YXJ0W3JlZ10s
IHJlZ2VuZFtyZWddKTsgICAgICAgICAgICAgICBcCisgICAgICAgIH0gICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgfSAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICBcCiB9IHdoaWxlICgwKQogCiAvKiBDaGVjayB0aGF0IHdlIGFyZSBub3Qgc3R1Y2sg
aW4gYW4gaW5maW5pdGUgbG9vcC4gICovCkBAIC0xNzAyLDcgKzE3NDUsNyBAQAogICB3aGlsZSAo
ZmFpbF9zdGFjay5mcmFtZSA8IGZhaWxfc3RhY2suYXZhaWwpCQkJCVwKICAgICBQT1BfRkFJTFVS
RV9SRUdfT1JfQ09VTlQgKCk7CQkJCQlcCiAJCQkJCQkJCQlcCi0gIHBhdCA9IFBPUF9GQUlMVVJF
X1BPSU5URVIgKCk7CQkJCVwKKyAgcGF0ID0gUE9QX0ZBSUxVUkVfUE9JTlRFUiAoKTsgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgREVCVUdfUFJJTlQyICgiICBQ
b3BwaW5nIHBhdHRlcm4gJXA6ICIsIHBhdCk7CQkJCVwKICAgREVCVUdfUFJJTlRfQ09NUElMRURf
UEFUVEVSTiAoYnVmcCwgcGF0LCBwZW5kKTsJCQlcCiAJCQkJCQkJCQlcCkBAIC0xNzI0LDYgKzE3
NjcsMjkgQEAKIH0gd2hpbGUgKDApIC8qIFBPUF9GQUlMVVJFX1BPSU5UICovCiAKIAorI2RlZmlu
ZSBGSU5JU0hfTE9PS0FST1VORCgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IFwKKyAgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBcCisgICAgcmVfY2hhciAqc3RyLCAqcGF0OyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgXAorICAgIHJlX29wY29kZV90IG9wOyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBkaXNjYXJkX3NhdmVkX3JlZ3Mg
PSAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgd2hpbGUgKCFG
QUlMX1NUQUNLX0VNUFRZICgpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAg
ICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIFwKKyAgICAgICAgUE9QX0ZBSUxVUkVfUE9JTlQgKHN0ciwgcGF0KTsgICAgICAgICAgICAg
ICAgICAgICAgICAgICBcCisgICAgICAgIG9wID0gKHJlX29wY29kZV90KSAqcGF0OyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICBpZiAob3AgPT0gbG9va2FoZWFkICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgIHx8IG9wID09
IGxvb2thaGVhZF9ub3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAg
ICB8fCBvcCA9PSBsb29rYmVoaW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAor
ICAgICAgICAgICAgfHwgb3AgPT0gbG9va2JlaGluZF9ub3QpICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIFwKKyAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICBkID0gc3RyOyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgICAgZGVuZCA9ICgoZCA+PSBz
dHJpbmcxICYmIGQgPD0gZW5kMSkgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAg
ICAgPyBlbmRfbWF0Y2hfMSA6IGVuZF9tYXRjaF8yKTsgICAgICAgICAgICAgICBcCisgICAgICAg
ICAgICBicmVhazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
XAorICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIFwKKyAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBcCisgICAgZGlzY2FyZF9zYXZlZF9yZWdzID0gMDsgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICB9IHdoaWxlICgwKTsKKwogDAogLyog
UmVnaXN0ZXJzIGFyZSBzZXQgdG8gYSBzZW50aW5lbCB3aGVuIHRoZXkgaGF2ZW4ndCB5ZXQgbWF0
Y2hlZC4gICovCiAjZGVmaW5lIFJFR19VTlNFVChlKSAoKGUpID09IE5VTEwpCkBAIC0xOTIyLDYg
KzE5ODgsNyBAQAogICBwYXR0ZXJuX29mZnNldF90IGZpeHVwX2FsdF9qdW1wOwogICBwYXR0ZXJu
X29mZnNldF90IGxhc3RzdGFydF9vZmZzZXQ7CiAgIHJlZ251bV90IHJlZ251bTsKKyAgaW50IGxv
b2thcm91bmQ7CiB9IGNvbXBpbGVfc3RhY2tfZWx0X3Q7CiAKIApAQCAtMjUyMiw2ICsyNTg5LDgg
QEAKIAkJCQkJCSBjb21waWxlX3N0YWNrLAogCQkJCQkJIHJlZ251bV90IHJlZ251bSkpOwogCitz
dGF0aWMgaW50IGV4YWN0X2NoYXJzX2luX3BhdHRlcm5fYnVmZmVyIF9SRV9BUkdTICgoc3RydWN0
IHJlX3BhdHRlcm5fYnVmZmVyICpidWZwLCByZV9jaGFyICpwLCByZV9jaGFyICpwZW5kKSk7CisK
IC8qIGByZWdleF9jb21waWxlJyBjb21waWxlcyBQQVRURVJOIChvZiBsZW5ndGggU0laRSkgYWNj
b3JkaW5nIHRvIFNZTlRBWC4KICAgIFJldHVybnMgb25lIG9mIGVycm9yIGNvZGVzIGRlZmluZWQg
aW4gYHJlZ2V4LmgnLCBvciB6ZXJvIGZvciBzdWNjZXNzLgogCkBAIC0zMjYxLDYgKzMzMzAsNyBA
QAogCSAgICBoYW5kbGVfb3BlbjoKIAkgICAgICB7CiAJCWludCBzaHkgPSAwOworICAgICAgICAg
ICAgICAgIGludCBsb29rYXJvdW5kID0gMDsKIAkJcmVnbnVtX3QgcmVnbnVtID0gMDsKIAkJaWYg
KHArMSA8IHBlbmQpCiAJCSAgewpAQCAtMzI4Miw2ICszMzUyLDI3IEBACiAJCQkgICAgICBjYXNl
ICcxJzogY2FzZSAnMic6IGNhc2UgJzMnOiBjYXNlICc0JzoKIAkJCSAgICAgIGNhc2UgJzUnOiBj
YXNlICc2JzogY2FzZSAnNyc6IGNhc2UgJzgnOiBjYXNlICc5JzoKIAkJCQlyZWdudW0gPSAxMCpy
ZWdudW0gKyAoYyAtICcwJyk7IGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
Y2FzZSAnPSc6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFBvc2l0aXZlIGxv
b2thaGVhZCBhc3NlcnRpb24uICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz
aHkgPSBsb29rYXJvdW5kID0gMTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJl
YWs7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICchJzoKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgLyogTmVnYXRpdmUgbG9va2FoZWFkIGFzc2VydGlvbi4gICov
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoeSA9IGxvb2thcm91bmQgPSAyOwor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIGNhc2UgJzwnOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEFURkVUQ0ggKGMpOworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjID09ICc9JykKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIC8qIFBvc2l0aXZlIGxvb2tiZWhpbmQgYXNzZXJ0aW9uLiAg
Ki8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoeSA9IGxvb2thcm91bmQg
PSAtMTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChjID09ICch
JykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE5lZ2F0aXZlIGxvb2ti
ZWhpbmQgYXNzZXJ0aW9uLiAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IHNoeSA9IGxvb2thcm91bmQgPSAtMjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGUkVFX1NUQUNLX1JF
VFVSTiAoUkVHX0JBRFBBVCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAJCQkgICAgICBkZWZhdWx0Ogog
CQkJCS8qIE9ubHkgKD86Li4uKSBpcyBzdXBwb3J0ZWQgcmlnaHQgbm93LiAqLwogCQkJCUZSRUVf
U1RBQ0tfUkVUVVJOIChSRUdfQkFEUEFUKTsKQEAgLTMzMjgsNiArMzQxOSw3IEBACiAJCSAgPSBm
aXh1cF9hbHRfanVtcCA/IGZpeHVwX2FsdF9qdW1wIC0gYnVmcC0+YnVmZmVyICsgMSA6IDA7CiAJ
CUNPTVBJTEVfU1RBQ0tfVE9QLmxhc3RzdGFydF9vZmZzZXQgPSBiIC0gYnVmcC0+YnVmZmVyOwog
CQlDT01QSUxFX1NUQUNLX1RPUC5yZWdudW0gPSByZWdudW07CisgICAgICAgICAg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AgKi8K
IAkJaWYgKHJlZ251bSA8PSBNQVhfUkVHTlVNICYmIHJlZ251bSA+IDApCiAJCSAgQlVGX1BVU0hf
MiAoc3RvcF9tZW1vcnksIHJlZ251bSk7Ci0JICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2Ug
aWYgKGxvb2thcm91bmQpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg
IGlmIChsb29rYXJvdW5kID4gMCkKKyAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAg
ICAgICAgICAgICAgICAvKiBQb3NpdGl2ZS9uZWdhdGl2ZSBsb29rYWhlYWQgYXNzZXJ0aW9uLiAg
Ki8KKyAgICAgICAgICAgICAgICAgICAgICAgIEdFVF9CVUZGRVJfU1BBQ0UgKDMpOworICAgICAg
ICAgICAgICAgICAgICAgICAgSU5TRVJUX0pVTVAgKGxvb2thcm91bmQgPT0gMSA/IGxvb2thaGVh
ZCA6IGxvb2thaGVhZF9ub3QsIGxhc3RzdGFydCwgYiArIDQpOworICAgICAgICAgICAgICAgICAg
ICAgICAgYiArPSAzOworICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAg
ICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAg
IC8qIFBvc2l0aXZlL25lZ2F0aXZlIGxvb2tiZWhpbmQgYXNzZXJ0aW9uLiAgKi8KKyAgICAgICAg
ICAgICAgICAgICAgICAgIGludCBjb3VudCA9IGV4YWN0X2NoYXJzX2luX3BhdHRlcm5fYnVmZmVy
IChidWZwLCBsYXN0c3RhcnQsIGIpOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50
ID09IC0xKSAvKiB2YXJpYWJsZSBsZW5ndGggKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAg
RlJFRV9TVEFDS19SRVRVUk4gKFJFR19CQURQQVQpOworCisgICAgICAgICAgICAgICAgICAgICAg
ICBHRVRfQlVGRkVSX1NQQUNFICg1KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIElOU0VSVF9K
VU1QMiAobG9va2Fyb3VuZCA9PSAtMSA/IGxvb2tiZWhpbmQgOiBsb29rYmVoaW5kX25vdCwgbGFz
dHN0YXJ0LCBiICsgNiwgY291bnQpOworICAgICAgICAgICAgICAgICAgICAgICAgYiArPSA1Owor
ICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAg
ICAgICAgICAgIC8qIE5lZ2F0aXZlIGZvcm0uICAqLworICAgICAgICAgICAgICAgICAgICBpZiAo
bG9va2Fyb3VuZCA+IDEgfHwgbG9va2Fyb3VuZCA8IC0xKQorICAgICAgICAgICAgICAgICAgICAg
IEJVRl9QVVNIIChsb29rYXJvdW5kX2ZhaWwpOworICAgICAgICAgICAgICAgICAgICBCVUZfUFVT
SCAobG9va2Fyb3VuZF9zdWNjZWVkKTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg
ICAgfQogCSAgICAgIGJyZWFrOwogCiAKQEAgLTM5NDksMTAgKzQwNjksMTYgQEAKICAgICAgICAv
KiBBZnRlciBhbiBhbHRlcm5hdGl2ZT8JICovCiAgICAgfHwgKCpwcmV2ID09ICd8JyAmJiAoc3lu
dGF4ICYgUkVfTk9fQktfVkJBUiB8fCBwcmV2X3ByZXZfYmFja3NsYXNoKSkKICAgICAgICAvKiBB
ZnRlciBhIHNoeSBzdWJleHByZXNzaW9uPyAgKi8KLSAgICB8fCAoKHN5bnRheCAmIFJFX1NIWV9H
Uk9VUFMpICYmIHByZXYgLSAyID49IHBhdHRlcm4KLQkmJiBwcmV2Wy0xXSA9PSAnPycgJiYgcHJl
dlstMl0gPT0gJygnCi0JJiYgKHN5bnRheCAmIFJFX05PX0JLX1BBUkVOUwotCSAgICB8fCAocHJl
diAtIDMgPj0gcGF0dGVybiAmJiBwcmV2Wy0zXSA9PSAnXFwnKSkpOworICAgIHx8ICgoc3ludGF4
ICYgUkVfU0hZX0dST1VQUykKKyAgICAgICAgJiYgKChwcmV2IC0gMiA+PSBwYXR0ZXJuCisgICAg
ICAgICAgICAgJiYgcHJldlstMV0gPT0gJz8nICYmIHByZXZbLTJdID09ICcoJworICAgICAgICAg
ICAgICYmIChzeW50YXggJiBSRV9OT19CS19QQVJFTlMKKyAgICAgICAgICAgICAgICAgfHwgKHBy
ZXYgLSAzID49IHBhdHRlcm4gJiYgcHJldlstM10gPT0gJ1xcJykpKQorICAgICAgICAgfHwgKHBy
ZXYgLSAzID49IHBhdHRlcm4KKyAgICAgICAgICAgICAmJiAoKnByZXYgPT0gJz0nIHx8ICpwcmV2
ID09ICchJykKKyAgICAgICAgICAgICAmJiBwcmV2Wy0xXSA9PSAnPCcgJiYgcHJldlstMl0gPT0g
Jz8nICYmIHByZXZbLTNdID09ICcoJworICAgICAgICAgICAgICYmIChzeW50YXggJiBSRV9OT19C
S19QQVJFTlMKKyAgICAgICAgICAgICAgICAgfHwgKHByZXYgLSA0ID49IHBhdHRlcm4gJiYgcHJl
dlstNF0gPT0gJ1xcJykpKSkpOwogfQogCiAKQEAgLTQxOTgsNiArNDMyNCwxMyBAQAogCSAgICB9
CiAJICBicmVhazsKIAorICAgICAgICBjYXNlIGxvb2thaGVhZDoKKyAgICAgICAgY2FzZSBsb29r
YWhlYWRfbm90OgorICAgICAgICBjYXNlIGxvb2tiZWhpbmQ6CisgICAgICAgIGNhc2UgbG9va2Jl
aGluZF9ub3Q6CisgICAgICAgICAgaWYgKCFmYXN0bWFwKSBicmVhazsKKyAgICAgICAgICByZXR1
cm4gLTE7CisgICAgICAgICAgCiAgICAgICAvKiBBbGwgY2FzZXMgYWZ0ZXIgdGhpcyBtYXRjaCB0
aGUgZW1wdHkgc3RyaW5nLiAgVGhlc2UgZW5kIHdpdGgKIAkgYGNvbnRpbnVlJy4gICovCiAKQEAg
LTQ4MjcsNyArNDk2MCw3IEBACiAJewogCWNhc2Ugc3RhcnRfbWVtb3J5OgogCWNhc2Ugc3RvcF9t
ZW1vcnk6Ci0JICBwICs9IDI7IGJyZWFrOworICAgICAgICAgIHAgKz0gMjsgYnJlYWs7CiAJY2Fz
ZSBub19vcDoKIAkgIHAgKz0gMTsgYnJlYWs7CiAJY2FzZSBqdW1wOgpAQCAtNDg0Myw2ICs0OTc2
LDkzIEBACiAgIHJldHVybiBwOwogfQogCitzdGF0aWMgaW50CitleGFjdF9jaGFyc19pbl9wYXR0
ZXJuX2J1ZmZlciAoYnVmcCwgcCwgcGVuZCkKKyAgICAgc3RydWN0IHJlX3BhdHRlcm5fYnVmZmVy
ICpidWZwOworICAgICByZV9jaGFyICpwLCAqcGVuZDsKK3sKKyAgaW50IGNvdW50ID0gMDsKKyAg
d2hpbGUgKHAgPCBwZW5kKQorICAgIHsKKyAgICAgIHN3aXRjaCAoU1dJVENIX0VOVU1fQ0FTVCAo
KHJlX29wY29kZV90KSAqcCsrKSkKKwl7CisgICAgICAgIGNhc2UgZXhhY3RuOgorICAgICAgICAg
IHsKKyAgICAgICAgICAgIGludCBtY250ID0gKnArKzsKKyAgICAgICAgICAgIGludCBidWZfY2hh
cmxlbjsKKyAgICAgICAgICAgIHdoaWxlIChtY250ID4gMCkgeworICAgICAgICAgICAgICBTVFJJ
TkdfQ0hBUl9BTkRfTEVOR1RIIChwLCBwIC0gcGVuZCwgYnVmX2NoYXJsZW4pOworICAgICAgICAg
ICAgICBwICs9IGJ1Zl9jaGFybGVuOworICAgICAgICAgICAgICBtY250IC09IGJ1Zl9jaGFybGVu
OworICAgICAgICAgICAgICBjb3VudCsrOworICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAg
ICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBzdGFydF9tZW1vcnk6CisgICAgICAgIGNhc2Ug
c3RvcF9tZW1vcnk6CisgICAgICAgICAgcCsrOworICAgICAgICAgIGJyZWFrOworI2lmZGVmIGVt
YWNzCisgICAgICAgIGNhc2UgY2F0ZWdvcnlzcGVjOgorICAgICAgICBjYXNlIG5vdGNhdGVnb3J5
c3BlYzoKKyNlbmRpZiAvKiBlbWFjcyAqLworICAgICAgICBjYXNlIHN5bnRheHNwZWM6CisgICAg
ICAgIGNhc2Ugbm90c3ludGF4c3BlYzoKKyAgICAgICAgICBwKys7CisgICAgICAgIGNhc2UgYW55
Y2hhcjoKKyAgICAgICAgICBjb3VudCsrOworICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNh
c2UgY2hhcnNldDoKKyAgICAgICAgY2FzZSBjaGFyc2V0X25vdDoKKyAgICAgICAgICBpZiAoQ0hB
UlNFVF9SQU5HRV9UQUJMRV9FWElTVFNfUCAocCAtIDEpKQorICAgICAgICAgICAgeworICAgICAg
ICAgICAgICBpbnQgbWNudDsKKyAgICAgICAgICAgICAgcCA9IENIQVJTRVRfUkFOR0VfVEFCTEUg
KHAgLSAxKTsKKyAgICAgICAgICAgICAgRVhUUkFDVF9OVU1CRVJfQU5EX0lOQ1IgKG1jbnQsIHAp
OworICAgICAgICAgICAgICBwID0gQ0hBUlNFVF9SQU5HRV9UQUJMRV9FTkQgKHAsIG1jbnQpOwor
ICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHAgKz0gMSArIENIQVJT
RVRfQklUTUFQX1NJWkUgKHAgLSAxKTsKKyAgICAgICAgICBjb3VudCsrOworICAgICAgICAgIGJy
ZWFrOworCisjaWZkZWYgZW1hY3MKKwljYXNlIGJlZm9yZV9kb3Q6CisJY2FzZSBhdF9kb3Q6CisJ
Y2FzZSBhZnRlcl9kb3Q6CisjZW5kaWYgLyogZW1hY3MgKi8KKwljYXNlIG5vX29wOgorCWNhc2Ug
YmVnbGluZToKKwljYXNlIGVuZGxpbmU6CisJY2FzZSBiZWdidWY6CisJY2FzZSBlbmRidWY6CisJ
Y2FzZSB3b3JkYm91bmQ6CisJY2FzZSBub3R3b3JkYm91bmQ6CisJY2FzZSB3b3JkYmVnOgorCWNh
c2Ugd29yZGVuZDoKKwlj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YXRlIHNw
YWNlIGZvciB0aGF0IGlmIHdlJ3JlIG5vdCBhbGxvY2F0aW5nIHNwYWNlIGZvciBhbnl0aGluZwog
ICAgICBlbHNlIChzZWUgYmVsb3cpLiAgQWxzbywgd2UgbmV2ZXIgbmVlZCBpbmZvIGFib3V0IHJl
Z2lzdGVyIDAgZm9yCkBAIC01NzcyLDYgKzU5OTUsNzcgQEAKIAkgIHAgKz0gMTsKIAkgIGJyZWFr
OwogCisgICAgICAgIGNhc2UgbG9va2FoZWFkOgorICAgICAgICBjYXNlIGxvb2thaGVhZF9ub3Q6
CisgICAgICAgICAgREVCVUdfUFJJTlQxICgocmVfb3Bjb2RlX3QpICoocCAtIDEpID09IGxvb2th
aGVhZCA/ICJFWEVDVVRJTkcgbG9va2FoZWFkLlxuIiA6ICJFWEVDVVRJTkcgbG9va2FoZWFkX25v
dC5cbiIpOworCisgICAgICAgICAgcCArPSAyOworICAgICAgICAgIFBVU0hfRkFJTFVSRV9QT0lO
VCAocCAtIDMsIGQpOworICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgbG9va2JlaGlu
ZDoKKyAgICAgICAgY2FzZSBsb29rYmVoaW5kX25vdDoKKyAgICAgICAgICB7CisgICAgICAgICAg
ICBpbnQgbWNudCwgY291bnQ7CisgICAgICAgICAgICBib29sZWFuIG5vdCA9IChyZV9vcGNvZGVf
dCkgKihwIC0gMSkgIT0gbG9va2JlaGluZDsKKworICAgICAgICAgICAgRVhUUkFDVF9OVU1CRVJf
QU5EX0lOQ1IgKG1jbnQsIHApOworICAgICAgICAgICAgRVhUUkFDVF9OVU1CRVJfQU5EX0lOQ1Ig
KGNvdW50LCBwKTsKKworICAgICAgICAgICAgREVCVUdfUFJJTlQyIChub3QKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgPyAiRVhFQ1VUSU5HIGxvb2tiZWhpbmRfbm90ICVkLlxuIgorICAgICAg
ICAgICAgICAgICAgICAgICAgICA6ICJFWEVDVVRJTkcgbG9va2JlaGluZCAlZC5cbiIsIGNvdW50
KTsKKyAgICAgICAgICAgIAorICAgICAgICAgICAgZGZhaWwgPSBkOworICAgICAgICAgICAgd2hp
bGUgKGQgIT0gc3RyaW5nMSAmJiBjb3VudCA+IDApCisgICAgICAgICAgICAgIHsKKyAgICAgICAg
ICAgICAgICBpZiAoZCA9PSBzdHJpbmcyKQorICAgICAgICAgICAgICAgICAgeworICAgICAgICAg
ICAgICAgICAgICBpZiAoIXN0cmluZzEpCisgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Cisg
ICAgICAgICAgICAgICAgICAgIGQgPSBlbmQxOworICAgICAgICAgICAgICAgICAgICBkZW5kID0g
ZW5kX21hdGNoXzE7CisgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgCisgICAg
ICAgICAgICAgICAgaWYgKHRhcmdldF9tdWx0aWJ5dGUpCisgICAgICAgICAgICAgICAgICB7Cisg
ICAgICAgICAgICAgICAgICAgIHJlX2NoYXIgKmRoZWFkID0gKGQgPj0gc3RyaW5nMSAmJiBkIDw9
IGVuZDEpID8gc3RyaW5nMSA6IHN0cmluZzI7CisgICAgICAgICAgICAgICAgICAgIFBSRVZfQ0hB
Ul9CT1VOREFSWSAoZCwgZGhlYWQpOworICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg
ICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgIGQtLTsKKyAgICAgICAgICAgICAgICBjb3VudC0t
OworICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChjb3VudCA+IDApCisgICAgICAg
ICAgICAgIHsKKyAgICAgICAgICAgICAgICBpZiAobm90KQorICAgICAgICAgICAgICAgICAgewor
ICAgICAgICAgICAgICAgICAgICAvKiBUaGVyZSBpcyBubyBlbm91Z2ggc3RyaW5nIHRvIG1hdGNo
LgorICAgICAgICAgICAgICAgICAgICAgICBTbyBqdXN0IG1ha2UgaXQgc3VjY2VlZGVkIGhlcmUu
ICovCisgICAgICAgICAgICAgICAgICAgIGQgPSBkZmFpbDsKKyAgICAgICAgICAgICAgICAgICAg
cCA9IHAgLSAyICsgbWNudDsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAg
ICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgICAgICAgZ290byBm
YWlsOworICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIFBVU0hfRkFJTFVSRV9QT0lOVCAo
cCAtIDUsIGRmYWlsKTsKKyAgICAgICAgICB9CisgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAg
Y2FzZSBsb29rYXJvdW5kX3N1Y2NlZWQ6CisgICAgICAgICAgREVCVUdfUFJJTlQxICgiRVhFQ1VU
SU5HIGxvb2thcm91bmRfc3VjY2VlZC5cbiIpOworICAgICAgICAgIAorICAgICAgICAgIEZJTklT
SF9MT09LQVJPVU5EKCk7CisgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBsb29rYXJv
dW5kX2ZhaWw6CisgICAgICAgICAgREVCVUdfUFJJTlQxICgiRVhFQ1VUSU5HIGxvb2thcm91bmRf
ZmFpbC5cbiIpOworICAgICAgICAgIAorICAgICAgICAgIEZJTklTSF9MT09LQVJPVU5EKCk7Cisg
ICAgICAgICAgZ290byBmYWlsOwogCiAJLyogXDxkaWdpdD4gaGFzIGJlZW4gdHVybmVkIGludG8g
YSBgZHVwbGljYXRlJyBjb21tYW5kIHdoaWNoIGlzCiAJICAgZm9sbG93ZWQgYnkgdGhlIG51bWVy
aWMgdmFsdWUgb2YgPGRpZ2l0PiBhcyB0aGUgcmVnaXN0ZXIgbnVtYmVyLiAgKi8KQEAgLTY0MTMs
MTIgKzY3MDcsMTYgQEAKIAkgICAgY2FzZSBvbl9mYWlsdXJlX2p1bXBfbG9vcDoKIAkgICAgY2Fz
ZSBvbl9mYWlsdXJlX2p1bXA6CiAJICAgIGNhc2Ugc3VjY2VlZF9uOgorICAgICAgICAgICAgY2Fz
ZSBsb29rYWhlYWRfbm90OgorICAgICAgICAgICAgY2FzZSBsb29rYmVoaW5kX25vdDoKIAkgICAg
ICBkID0gc3RyOwogCSAgICBjb250aW51ZV9mYWlsdXJlX2p1bXA6CiAJICAgICAgRVhUUkFDVF9O
VU1CRVJfQU5EX0lOQ1IgKG1jbnQsIHBhdCk7CiAJICAgICAgcCA9IHBhdCArIG1jbnQ7CiAJICAg
ICAgYnJlYWs7CiAKKyAgICAgICAgICAgIGNhc2UgbG9va2FoZWFkOgorICAgICAgICAgICAgY2Fz
ZSBsb29rYmVoaW5kOgogCSAgICBjYXNlIG5vX29wOgogCSAgICAgIC8qIEEgc3BlY2lhbCBmcmFt
ZSB1c2VkIGZvciBuYXN0eWxvb3BzLiAqLwogCSAgICAgIGdvdG8gZmFpbDsK
--=-=-=--




Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 29 Feb 2016 02:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.