~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to strings/longlong2str.c

  • Committer: Brian Aker
  • Date: 2008-07-13 22:45:08 UTC
  • Revision ID: brian@tangent.org-20080713224508-hb20z4okblotb39a
longlong replacement

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/*
17
 
  Defines: longlong2str();
 
17
  Defines: int64_t2str();
18
18
 
19
 
  longlong2str(dst, radix, val)
20
 
  converts the (longlong) integer "val" to character form and moves it to
 
19
  int64_t2str(dst, radix, val)
 
20
  converts the (int64_t) integer "val" to character form and moves it to
21
21
  the destination string "dst" followed by a terminating NUL.  The
22
22
  result is normally a pointer to this NUL character, but if the radix
23
23
  is dud the result will be NullS and nothing will be changed.
40
40
#include <my_global.h>
41
41
#include "m_string.h"
42
42
 
43
 
#if !defined(longlong2str) && !defined(HAVE_LONGLONG2STR)
 
43
#if !defined(int64_t2str) && !defined(HAVE_LONGLONG2STR)
44
44
 
45
45
/*
46
 
  This assumes that longlong multiplication is faster than longlong division.
 
46
  This assumes that int64_t multiplication is faster than int64_t division.
47
47
*/
48
48
 
49
 
char *longlong2str(longlong val,char *dst,int radix)
 
49
char *int64_t2str(int64_t val,char *dst,int radix)
50
50
{
51
51
  char buffer[65];
52
52
  register char *p;
96
96
 
97
97
#endif
98
98
 
99
 
#ifndef longlong10_to_str
100
 
char *longlong10_to_str(longlong val,char *dst,int radix)
 
99
#ifndef int64_t10_to_str
 
100
char *int64_t10_to_str(int64_t val,char *dst,int radix)
101
101
{
102
102
  char buffer[65];
103
103
  register char *p;