~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_time.c

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
/* Position for YYYY-DD-MM HH-MM-DD.FFFFFF AM in default format */
32
32
 
33
 
static uchar internal_format_positions[]=
34
 
{0, 1, 2, 3, 4, 5, 6, (uchar) 255};
 
33
static unsigned char internal_format_positions[]=
 
34
{0, 1, 2, 3, 4, 5, 6, (unsigned char) 255};
35
35
 
36
36
static char time_separator=':';
37
37
 
38
38
static uint32_t const days_at_timestart=719528; /* daynr at 1970.01.01 */
39
 
uchar days_in_month[]= {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
 
39
unsigned char days_in_month[]= {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 0};
40
40
 
41
41
/*
42
42
  Offset of system time zone from UTC in seconds used to speed up 
166
166
  bool is_internal_format;
167
167
  const char *pos, *last_field_pos=NULL;
168
168
  const char *end=str+length;
169
 
  const uchar *format_position;
 
169
  const unsigned char *format_position;
170
170
  bool found_delimitier= 0, found_space= 0;
171
171
  uint frac_pos, frac_len;
172
172
 
256
256
       i++)
257
257
  {
258
258
    const char *start= str;
259
 
    uint32_t tmp_value= (uint) (uchar) (*str++ - '0');
 
259
    uint32_t tmp_value= (uint) (unsigned char) (*str++ - '0');
260
260
    while (str != end && my_isdigit(&my_charset_utf8_general_ci,str[0]) &&
261
261
           (!is_internal_format || --field_length))
262
262
    {
263
 
      tmp_value=tmp_value*10 + (uint32_t) (uchar) (*str - '0');
 
263
      tmp_value=tmp_value*10 + (uint32_t) (unsigned char) (*str - '0');
264
264
      str++;
265
265
    }
266
266
    date_len[i]= (uint) (str - start);
369
369
      date[frac_pos]*= (uint) log_10_int[6 - frac_len];
370
370
    l_time->second_part= date[frac_pos];
371
371
 
372
 
    if (format_position[7] != (uchar) 255)
 
372
    if (format_position[7] != (unsigned char) 255)
373
373
    {
374
374
      if (l_time->hour > 12)
375
375
      {
558
558
    /* Fix the date to assume that seconds was given */
559
559
    if (!found_hours && !found_days)
560
560
    {
561
 
      bmove_upp((uchar*) (date+4), (uchar*) (date+state),
 
561
      bmove_upp((unsigned char*) (date+4), (unsigned char*) (date+state),
562
562
                sizeof(long)*(state-1));
563
563
      memset(date, 0, sizeof(long)*(4-state));
564
564
    }
571
571
  if ((end-str) >= 2 && *str == '.' && my_isdigit(&my_charset_utf8_general_ci,str[1]))
572
572
  {
573
573
    int field_length= 5;
574
 
    str++; value=(uint) (uchar) (*str - '0');
 
574
    str++; value=(uint) (unsigned char) (*str - '0');
575
575
    while (++str != end && my_isdigit(&my_charset_utf8_general_ci, *str))
576
576
    {
577
577
      if (field_length-- > 0)
578
 
        value= value*10 + (uint) (uchar) (*str - '0');
 
578
        value= value*10 + (uint) (unsigned char) (*str - '0');
579
579
    }
580
580
    if (field_length > 0)
581
581
      value*= (long) log_10_int[field_length];