~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/strto.c

  • Committer: Monty Taylor
  • Date: 2008-08-22 04:52:07 UTC
  • mto: (365.1.2 drizzle)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: monty@inaugust.com-20080822045207-v5hswhr5jrmo5djl
Got rid of all instances of ~0

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#undef strtoul
50
50
#undef strtol
51
51
#ifdef USE_LONGLONG
52
 
#define UTYPE_MAX (~(uint64_t) 0)
53
52
#define TYPE_MIN LONGLONG_MIN
54
53
#define TYPE_MAX LONGLONG_MAX
55
54
#define longtype int64_t
60
59
#define function longtype strtoll
61
60
#endif
62
61
#else
63
 
#define UTYPE_MAX (ulong) ~0L
64
62
#define TYPE_MIN LONG_MIN
65
63
#define TYPE_MAX LONG_MAX
66
64
#define longtype long
141
139
  /* Save the pointer so we can check later if anything happened.  */
142
140
  save = s;
143
141
 
144
 
  cutoff = UTYPE_MAX / (unsigned long int) base;
145
 
  cutlim = (uint) (UTYPE_MAX % (unsigned long int) base);
 
142
  cutoff = UINT64_MAX / (unsigned long int) base;
 
143
  cutlim = (uint) (UINT64_MAX % (unsigned long int) base);
146
144
 
147
145
  overflow = 0;
148
146
  i = 0;
191
189
  {
192
190
    my_errno=ERANGE;
193
191
#ifdef USE_UNSIGNED
194
 
    return UTYPE_MAX;
 
192
    return UINT64_MAX;
195
193
#else
196
194
    return negative ? TYPE_MIN : TYPE_MAX;
197
195
#endif