~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_wcomp.c

  • Committer: Jay Pipes
  • Date: 2008-07-17 21:23:43 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080717212343-242tb1p1vd93fcp0
Phase 8 - Remove DBUG from mysys

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
                 bool str_is_pattern)
29
29
{
30
30
  char cmp;
31
 
  DBUG_ENTER("wild_compare");
32
31
 
33
32
  while (*wildstr)
34
33
  {
38
37
      {
39
38
        wildstr++;
40
39
        if (str_is_pattern && *str++ != wild_prefix)
41
 
          DBUG_RETURN(1);
 
40
          return(1);
42
41
      }
43
42
      if (*wildstr++ != *str++)
44
 
        DBUG_RETURN(1);
 
43
        return(1);
45
44
    }
46
45
    if (! *wildstr )
47
 
      DBUG_RETURN(*str != 0);
 
46
      return(*str != 0);
48
47
    if (*wildstr++ == wild_one)
49
48
    {
50
49
      if (! *str || (str_is_pattern && *str == wild_many))
51
 
        DBUG_RETURN(1);                     /* One char; skip */
 
50
        return(1);                     /* One char; skip */
52
51
      if (*str++ == wild_prefix && str_is_pattern && *str)
53
52
        str++;
54
53
    }
67
66
          if (str_is_pattern && *str == wild_prefix && str[1])
68
67
            str+=2;
69
68
          else if (! *str++)
70
 
            DBUG_RETURN (1);
 
69
            return (1);
71
70
        }
72
71
      if (!*wildstr)
73
 
        DBUG_RETURN(0);         /* '*' as last char: OK */
 
72
        return(0);              /* '*' as last char: OK */
74
73
      if ((cmp= *wildstr) == wild_prefix && wildstr[1] && !str_is_pattern)
75
74
        cmp=wildstr[1];
76
75
      for (;;str++)
78
77
        while (*str && *str != cmp)
79
78
          str++;
80
79
        if (!*str)
81
 
          DBUG_RETURN (1);
 
80
          return (1);
82
81
        if (wild_compare(str,wildstr,str_is_pattern) == 0)
83
 
          DBUG_RETURN (0);
 
82
          return (0);
84
83
      }
85
84
      /* We will never come here */
86
85
    }
87
86
  }
88
 
  DBUG_RETURN (*str != 0);
 
87
  return (*str != 0);
89
88
} /* wild_compare */