~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/strto.cc

  • Committer: Monty Taylor
  • Date: 2009-03-24 17:44:41 UTC
  • mto: (960.5.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 964.
  • Revision ID: mordred@inaugust.com-20090324174441-nmsq0gwjlgf7f0mt
Changed handlerton to StorageEngine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/*
17
17
  strtol,strtoul,strtoll,strtoull
18
 
  convert string to long, unsigned long, long long or unsigned long long.
 
18
  convert string to long, unsigned long, int64_t or uint64_t.
19
19
  strtoxx(char *src,char **ptr,int base)
20
20
  converts the string pointed to by src to an long of appropriate long and
21
21
  returnes it. It skips leading spaces and tabs (but not newlines, formfeeds,
40
40
   /* see 'strtoll.c' and 'strtoull.c' for the reasons */
41
41
#endif
42
42
 
43
 
#include "m_ctype.h"
44
 
#include "my_sys.h"                     /* defines errno */
45
 
#include <errno.h>
 
43
#include "mysys_priv.h"
46
44
 
47
45
#undef strtoull
48
46
#undef strtoll
114
112
  {
115
113
    ++s;
116
114
  }
117
 
    
 
115
 
118
116
 
119
117
  if (base == 16 && s[0] == '0' && my_toupper (&my_charset_utf8_general_ci, s[1]) == 'X')
120
118
    s += 2;
140
138
  save = s;
141
139
 
142
140
  cutoff = UINT64_MAX / (unsigned long int) base;
143
 
  cutlim = (uint) (UINT64_MAX % (unsigned long int) base);
 
141
  cutlim = (uint32_t) (UINT64_MAX % (unsigned long int) base);
144
142
 
145
143
  overflow = 0;
146
144
  i = 0;