[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.20 and 1.21

version 1.20, 2007/02/08 05:07:23 version 1.21, 2007/02/08 05:44:18
Line 173  static int nope = 0;
Line 173  static int nope = 0;
  ==     size_t nmatch, regmatch_t pmatch[], int eflags);   ==     size_t nmatch, regmatch_t pmatch[], int eflags);
  */   */
 static int                      /* 0 success, REG_NOMATCH failure */  static int                      /* 0 success, REG_NOMATCH failure */
 matcher(g, string, nmatch, pmatch, eflags)  matcher(
 struct re_guts *g;      struct re_guts *g,
 const char *string;      const char *string,
 size_t nmatch;      size_t nmatch,
 regmatch_t pmatch[];      regmatch_t pmatch[],
 int eflags;      int eflags)
 {  {
         const char *endp;          const char *endp;
         int i;          int i;
Line 350  done:
Line 350  done:
  ==     const char *stop, sopno startst, sopno stopst);   ==     const char *stop, sopno startst, sopno stopst);
  */   */
 static const char *                     /* == stop (success) always */  static const char *                     /* == stop (success) always */
 dissect(m, start, stop, startst, stopst)  dissect(
 struct match *m;      struct match *m,
 const char *start;      const char *start,
 const char *stop;      const char *stop,
 sopno startst;      sopno startst,
 sopno stopst;      sopno stopst)
 {  {
         int i;          int i;
         sopno ss;       /* start sop of current subRE */          sopno ss;       /* start sop of current subRE */
Line 559  sopno stopst;
Line 559  sopno stopst;
  ==     const char *stop, sopno startst, sopno stopst, sopno lev);   ==     const char *stop, sopno startst, sopno stopst, sopno lev);
  */   */
 static const char *             /* == stop (success) or NULL (failure) */  static const char *             /* == stop (success) or NULL (failure) */
 backref(m, start, stop, startst, stopst, lev)  backref(
 struct match *m;      struct match *m,
 const char *start;      const char *start,
 const char *stop;      const char *stop,
 sopno startst;      sopno startst,
 sopno stopst;      sopno stopst,
 sopno lev;                      /* PLUS nesting level */      sopno lev)                  /* PLUS nesting level */
 {  {
         int i;          int i;
         sopno ss;       /* start sop of current subRE */          sopno ss;       /* start sop of current subRE */
Line 769  sopno lev;   /* PLUS nesting level */
Line 769  sopno lev;   /* PLUS nesting level */
  ==     const char *stop, sopno startst, sopno stopst);   ==     const char *stop, sopno startst, sopno stopst);
  */   */
 static const char *             /* where tentative match ended, or NULL */  static const char *             /* where tentative match ended, or NULL */
 fast(m, start, stop, startst, stopst)  fast(
 struct match *m;      struct match *m,
 const char *start;      const char *start,
 const char *stop;      const char *stop,
 sopno startst;      sopno startst,
 sopno stopst;      sopno stopst)
 {  {
         states st = m->st;          states st = m->st;
         states fresh = m->fresh;          states fresh = m->fresh;
Line 864  sopno stopst;
Line 864  sopno stopst;
  ==     const char *stop, sopno startst, sopno stopst);   ==     const char *stop, sopno startst, sopno stopst);
  */   */
 static const char *                     /* where it ended */  static const char *                     /* where it ended */
 slow(m, start, stop, startst, stopst)  slow(
 struct match *m;      struct match *m,
 const char *start;      const char *start,
 const char *stop;      const char *stop,
 sopno startst;      sopno startst,
 sopno stopst;      sopno stopst)
 {  {
         states st = m->st;          states st = m->st;
         states empty = m->empty;          states empty = m->empty;
Line 964  sopno stopst;
Line 964  sopno stopst;
  == #define     NNONCHAR        (CODEMAX-CHAR_MAX)   == #define     NNONCHAR        (CODEMAX-CHAR_MAX)
  */   */
 static states  static states
 step(g, start, stop, bef, ch, aft)  step(
 struct re_guts *g;      struct re_guts *g,
 sopno start;                    /* start state within strip */      sopno start,                /* start state within strip */
 sopno stop;                     /* state after stop state within strip */      sopno stop,                 /* state after stop state within strip */
 states bef;             /* states reachable before */      states bef,                 /* states reachable before */
 int ch;                         /* character or NONCHAR code */      int ch,                     /* character or NONCHAR code */
 states aft;             /* states already known reachable after */      states aft)                 /* states already known reachable after */
 {  {
         cset *cs;          cset *cs;
         sop s;          sop s;
Line 1088  states aft;  /* states already known rea
Line 1088  states aft;  /* states already known rea
  == #endif   == #endif
  */   */
 static void  static void
 print(m, caption, st, ch, d)  print(
 struct match *m;      struct match *m,
 char *caption;      char *caption,
 states st;      states st,
 int ch;      int ch,
 FILE *d;      FILE *d)
 {  {
         struct re_guts *g = m->g;          struct re_guts *g = m->g;
         int i;          int i;
Line 1126  FILE *d;
Line 1126  FILE *d;
  == #endif   == #endif
  */   */
 static void  static void
 at(m, title, start, stop, startst, stopst)  at(
 struct match *m;      struct match *m,
 char *title;      char *title,
 char *start;      char *start,
 char *stop;      char *stop,
 sopno startst;      sopno startst,
 sopno stopst;      sopno stopst)
 {  {
   
         _DIAGASSERT(m != NULL);          _DIAGASSERT(m != NULL);
Line 1162  sopno stopst;
Line 1162  sopno stopst;
  * the non-debug compilation anyway, so it doesn't matter much.   * the non-debug compilation anyway, so it doesn't matter much.
  */   */
 static char *                   /* -> representation */  static char *                   /* -> representation */
 pchar(ch)  pchar(
 int ch;      int ch)
 {  {
         static char pbuf[10];          static char pbuf[10];
   

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

CVSweb <webmaster@jp.NetBSD.org>