[BACK]Return to engine.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / regex

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/regex/engine.c between version 1.16 and 1.17

version 1.16, 2004/03/12 22:34:09 version 1.17, 2004/03/26 22:42:17
Line 622  sopno lev;   /* PLUS nesting level */
Line 622  sopno lev;   /* PLUS nesting level */
                                 return(NULL);                                  return(NULL);
                         break;                          break;
                 case OBOW:                  case OBOW:
                         if (((sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||                          if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
                             (sp < m->endp && *(sp - 1) == '\n' &&                                          (sp < m->endp && *(sp-1) == '\n' &&
                             (m->g->cflags&REG_NEWLINE)) ||                                                  (m->g->cflags&REG_NEWLINE)) ||
                             (sp > m->beginp &&                                          (sp > m->beginp &&
                             !ISWORD(*(unsigned char *)(sp - 1)))) &&                                                          !ISWORD(*(sp-1))) ) &&
                             (sp < m->endp && ISWORD(*(unsigned char *)sp)))                                          (sp < m->endp && ISWORD(*sp)) )
                                 { /* yes */ }                                  { /* yes */ }
                         else                          else
                                 return(NULL);                                  return(NULL);
                         break;                          break;
                 case OEOW:                  case OEOW:
                         if (((sp == m->endp && !(m->eflags&REG_NOTEOL)) ||                          if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
                             (sp < m->endp && *sp == '\n' &&                                          (sp < m->endp && *sp == '\n' &&
                             (m->g->cflags&REG_NEWLINE)) ||                                                  (m->g->cflags&REG_NEWLINE)) ||
                             (sp < m->endp && !ISWORD(*(unsigned char *)sp))) &&                                          (sp < m->endp && !ISWORD(*sp)) ) &&
                             (sp > m->beginp &&                                          (sp > m->beginp && ISWORD(*(sp-1))) )
                             ISWORD(*(unsigned char *)(sp - 1))))  
                                 { /* yes */ }                                  { /* yes */ }
                         else                          else
                                 return(NULL);                                  return(NULL);
Line 779  sopno stopst;
Line 778  sopno stopst;
         states fresh = m->fresh;          states fresh = m->fresh;
         states tmp = m->tmp;          states tmp = m->tmp;
         char *p = start;          char *p = start;
         int c = (start == m->beginp) ? OUT : *(unsigned char *)(start - 1);          int c = (start == m->beginp) ? OUT : *(start-1);
         int lastc;      /* previous c */          int lastc;      /* previous c */
         int flagch;          int flagch;
         int i;          int i;
Line 798  sopno stopst;
Line 797  sopno stopst;
         for (;;) {          for (;;) {
                 /* next character */                  /* next character */
                 lastc = c;                  lastc = c;
                 c = (p == m->endp) ? OUT : *(unsigned char *)p;                  c = (p == m->endp) ? OUT : *p;
                 if (EQ(st, fresh))                  if (EQ(st, fresh))
                         coldp = p;                          coldp = p;
   
Line 874  sopno stopst;
Line 873  sopno stopst;
         states empty = m->empty;          states empty = m->empty;
         states tmp = m->tmp;          states tmp = m->tmp;
         char *p = start;          char *p = start;
         int c = (start == m->beginp) ? OUT : *(unsigned char *)(start - 1);          int c = (start == m->beginp) ? OUT : *(start-1);
         int lastc;      /* previous c */          int lastc;      /* previous c */
         int flagch;          int flagch;
         int i;          int i;
Line 893  sopno stopst;
Line 892  sopno stopst;
         for (;;) {          for (;;) {
                 /* next character */                  /* next character */
                 lastc = c;                  lastc = c;
                 c = (p == m->endp) ? OUT : *(unsigned char *)p;                  c = (p == m->endp) ? OUT : *p;
   
                 /* is there an EOL and/or BOL between lastc and c? */                  /* is there an EOL and/or BOL between lastc and c? */
                 flagch = '\0';                  flagch = '\0';

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

CVSweb <webmaster@jp.NetBSD.org>