emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/regex.c [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/regex.c [lexbind]
Date: Tue, 06 Jul 2004 04:55:40 -0400

Index: emacs/src/regex.c
diff -c emacs/src/regex.c:1.176.2.1 emacs/src/regex.c:1.176.2.2
*** emacs/src/regex.c:1.176.2.1 Fri Apr  4 06:21:03 2003
--- emacs/src/regex.c   Tue Jul  6 08:50:28 2004
***************
*** 975,983 ****
            int has_range_table = CHARSET_RANGE_TABLE_EXISTS_P (p - 1);
  
            fprintf (stderr, "/charset [%s",
!                   (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
  
!           assert (p + *p < pend);
  
            for (c = 0; c < 256; c++)
              if (c / 8 < length
--- 975,984 ----
            int has_range_table = CHARSET_RANGE_TABLE_EXISTS_P (p - 1);
  
            fprintf (stderr, "/charset [%s",
!                    (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
  
!           if (p + *p >= pend)
!             fprintf (stderr, " !extends past end of pattern! ");
  
            for (c = 0; c < 256; c++)
              if (c / 8 < length
***************
*** 1736,1743 ****
  
  
  /* This is not an arbitrary limit: the arguments which represent offsets
!    into the pattern are two bytes long.  So if 2^16 bytes turns out to
     be too small, many things would have to change.  */
  /* Any other compiler which, like MSC, has allocation limit below 2^16
     bytes will have to use approach similar to what was done below for
     MSC and drop MAX_BUF_SIZE a bit.  Otherwise you may end up
--- 1737,1747 ----
  
  
  /* This is not an arbitrary limit: the arguments which represent offsets
!    into the pattern are two bytes long.  So if 2^15 bytes turns out to
     be too small, many things would have to change.  */
+ # define MAX_BUF_SIZE (1L << 15)
+ 
+ #if 0  /* This is when we thought it could be 2^16 bytes.  */
  /* Any other compiler which, like MSC, has allocation limit below 2^16
     bytes will have to use approach similar to what was done below for
     MSC and drop MAX_BUF_SIZE a bit.  Otherwise you may end up
***************
*** 1749,1754 ****
--- 1753,1759 ----
  #else
  # define MAX_BUF_SIZE (1L << 16)
  #endif
+ #endif /* 0 */
  
  /* Extend the buffer by twice its current size via realloc and
     reset the pointers that pointed into the old block to point to the
***************
*** 3514,3521 ****
    if (syntax & RE_NO_POSIX_BACKTRACKING)
      BUF_PUSH (succeed);
  
-   free (compile_stack.stack);
- 
    /* We have succeeded; set the length of the buffer.  */
    bufp->used = b - bufp->buffer;
  
--- 3519,3524 ----
***************
*** 3555,3561 ****
    }
  #endif /* not MATCH_MAY_ALLOCATE */
  
!   return REG_NOERROR;
  } /* regex_compile */
  
  /* Subroutines for `regex_compile'.  */
--- 3558,3564 ----
    }
  #endif /* not MATCH_MAY_ALLOCATE */
  
!   FREE_STACK_RETURN (REG_NOERROR);
  } /* regex_compile */
  
  /* Subroutines for `regex_compile'.  */
***************
*** 4458,4466 ****
  
  
  /* Jump over non-matching operations.  */
! static unsigned char *
  skip_noops (p, pend)
!      unsigned char *p, *pend;
  {
    int mcnt;
    while (p < pend)
--- 4461,4469 ----
  
  
  /* Jump over non-matching operations.  */
! static re_char *
  skip_noops (p, pend)
!      re_char *p, *pend;
  {
    int mcnt;
    while (p < pend)
***************
*** 4489,4495 ****
  static int
  mutually_exclusive_p (bufp, p1, p2)
       struct re_pattern_buffer *bufp;
!      unsigned char *p1, *p2;
  {
    re_opcode_t op2;
    const boolean multibyte = RE_MULTIBYTE_P (bufp);
--- 4492,4498 ----
  static int
  mutually_exclusive_p (bufp, p1, p2)
       struct re_pattern_buffer *bufp;
!      re_char *p1, *p2;
  {
    re_opcode_t op2;
    const boolean multibyte = RE_MULTIBYTE_P (bufp);
***************
*** 6327,6329 ****
--- 6330,6335 ----
  WEAK_ALIAS (__regfree, regfree)
  
  #endif /* not emacs  */
+ 
+ /* arch-tag: 4ffd68ba-2a9e-435b-a21a-018990f9eeb2
+    (do not change this comment) */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]