~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/strto.c

  • Committer: Monty Taylor
  • Date: 2008-09-13 20:24:20 UTC
  • mfrom: (383.1.35 drizzle)
  • Revision ID: monty@inaugust.com-20080913202420-lkj76ewbabl8ljvp
MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
  s = nptr;
97
97
 
98
98
  /* Skip white space.  */
99
 
  while (my_isspace(&my_charset_latin1, *s))
 
99
  while (my_isspace(&my_charset_utf8_general_ci, *s))
100
100
    ++s;
101
101
  if (*s == '\0')
102
102
  {
116
116
  }
117
117
    
118
118
 
119
 
  if (base == 16 && s[0] == '0' && my_toupper (&my_charset_latin1, s[1]) == 'X')
 
119
  if (base == 16 && s[0] == '0' && my_toupper (&my_charset_utf8_general_ci, s[1]) == 'X')
120
120
    s += 2;
121
121
 
122
122
  /* If BASE is zero, figure it out ourselves.  */
124
124
  {
125
125
    if (*s == '0')
126
126
    {
127
 
      if (my_toupper (&my_charset_latin1, s[1]) == 'X')
 
127
      if (my_toupper (&my_charset_utf8_general_ci, s[1]) == 'X')
128
128
      {
129
129
        s += 2;
130
130
        base = 16;
146
146
  i = 0;
147
147
  for (c = *s; c != '\0'; c = *++s)
148
148
  {
149
 
    if (my_isdigit (&my_charset_latin1, c))
 
149
    if (my_isdigit (&my_charset_utf8_general_ci, c))
150
150
      c -= '0';
151
 
    else if (my_isalpha (&my_charset_latin1, c))
152
 
      c = my_toupper (&my_charset_latin1, c) - 'A' + 10;
 
151
    else if (my_isalpha (&my_charset_utf8_general_ci, c))
 
152
      c = my_toupper (&my_charset_utf8_general_ci, c) - 'A' + 10;
153
153
    else
154
154
      break;
155
155
    if (c >= base)