~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzletest.cc

Removing deprecated functions from code and replacing them with C99 equivalents:
- replacing bcmp() calls with memcmp() calls
- replacing bfill() with memset()
- replacing bmove() and bcopy() with memcpy() or memmove()

The function memcpy_fixed() was apparantly introduced to fix a problem in gcc on
Alpha, but since it is not used consistently, it is likely not necessary any more.
It was replaced with memcpy().

Show diffs side-by-side

added added

removed removed

Lines of Context:
6910
6910
    for (i=1 ; i <= found_sets ; i++)
6911
6911
    {
6912
6912
      pos=from[found_set[i-1].table_offset];
6913
 
      rep_str[i].found= !bcmp((const uchar*) pos,
6914
 
            (const uchar*) "\\^", 3) ? 2 : 1;
 
6913
      rep_str[i].found= !memcmp((const uchar*) pos,
 
6914
                                (const uchar*) "\\^", 3) ? 2 : 1;
6915
6915
      rep_str[i].replace_string=to_array[found_set[i-1].table_offset];
6916
6916
      rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos);
6917
6917
      rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+
7038
7038
 
7039
7039
int cmp_bits(REP_SET *set1,REP_SET *set2)
7040
7040
{
7041
 
  return bcmp((uchar*) set1->bits,(uchar*) set2->bits,
7042
 
        sizeof(uint) * set1->size_of_bits);
 
7041
  return memcmp((uchar*) set1->bits,(uchar*) set2->bits,
 
7042
                sizeof(uint) * set1->size_of_bits);
7043
7043
}
7044
7044
 
7045
7045
 
7108
7108
 
7109
7109
uint start_at_word(char * pos)
7110
7110
{
7111
 
  return (((!bcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) ||
7112
 
           !bcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0);
 
7111
  return (((!memcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) ||
 
7112
           !memcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0);
7113
7113
}
7114
7114
 
7115
7115
uint end_of_word(char * pos)
7116
7116
{
7117
7117
  char * end=strend(pos);
7118
 
  return ((end > pos+2 && !bcmp((const uchar*) end-2,
7119
 
                                (const uchar*) "\\b", 2)) ||
7120
 
    (end >= pos+2 && !bcmp((const uchar*) end-2,
 
7118
  return ((end > pos+2 && !memcmp((const uchar*) end-2,
 
7119
                                  (const uchar*) "\\b", 2)) ||
 
7120
    (end >= pos+2 && !memcmp((const uchar*) end-2,
7121
7121
                                (const uchar*) "\\$",2))) ? 1 : 0;
7122
7122
}
7123
7123