~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/longlong2str.cc

  • Committer: Andrew Hutchings
  • Date: 2011-02-01 10:23:22 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110201102322-oxztcyrjzg3c7yta
Fix counters cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        itoa assumes that 10 -base numbers are allways signed and other arn't.
38
38
*/
39
39
 
40
 
#include <config.h>
 
40
#include "config.h"
41
41
 
42
42
#include "m_string.h"
43
43
 
58
58
char *int64_t2str(int64_t val,char *dst,int radix)
59
59
{
60
60
  char buffer[65];
 
61
  register char *p;
61
62
  long long_val;
62
63
  uint64_t uval= (uint64_t) val;
63
64
 
81
82
    *dst='\0';
82
83
    return dst;
83
84
  }
84
 
  char* p = &buffer[sizeof(buffer)-1];
 
85
  p = &buffer[sizeof(buffer)-1];
85
86
  *p = '\0';
86
87
 
87
88
  while (uval > (uint64_t) LONG_MAX)
108
109
char *int64_t10_to_str(int64_t val,char *dst,int radix)
109
110
{
110
111
  char buffer[65];
 
112
  register char *p;
111
113
  long long_val;
112
114
  uint64_t uval= (uint64_t) val;
113
115
 
127
129
    *dst='\0';
128
130
    return dst;
129
131
  }
130
 
  char* p = &buffer[sizeof(buffer)-1];
 
132
  p = &buffer[sizeof(buffer)-1];
131
133
  *p = '\0';
132
134
 
133
135
  while (uval > (uint64_t) LONG_MAX)