~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/longlong2str.cc

  • Committer: Monty Taylor
  • Date: 2011-03-10 18:09:05 UTC
  • mfrom: (2225.2.2 refactor)
  • mto: This revision was merged to the branch mainline in revision 2228.
  • Revision ID: mordred@inaugust.com-20110310180905-ttx05t7q7ff6nl7c
Merge Olad: Refactoring

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;
62
61
  long long_val;
63
62
  uint64_t uval= (uint64_t) val;
64
63
 
82
81
    *dst='\0';
83
82
    return dst;
84
83
  }
85
 
  p = &buffer[sizeof(buffer)-1];
 
84
  char* p = &buffer[sizeof(buffer)-1];
86
85
  *p = '\0';
87
86
 
88
87
  while (uval > (uint64_t) LONG_MAX)
109
108
char *int64_t10_to_str(int64_t val,char *dst,int radix)
110
109
{
111
110
  char buffer[65];
112
 
  register char *p;
113
111
  long long_val;
114
112
  uint64_t uval= (uint64_t) val;
115
113
 
129
127
    *dst='\0';
130
128
    return dst;
131
129
  }
132
 
  p = &buffer[sizeof(buffer)-1];
 
130
  char* p = &buffer[sizeof(buffer)-1];
133
131
  *p = '\0';
134
132
 
135
133
  while (uval > (uint64_t) LONG_MAX)