~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/dtoa.cc

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
merge lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
 ***************************************************************/
37
37
 
38
 
#include "config.h"
 
38
#include <config.h>
39
39
 
40
 
#include "drizzled/internal/m_string.h"  /* for memcpy and NOT_FIXED_DEC */
 
40
#include <drizzled/internal/m_string.h>  /* for memcpy and NOT_FIXED_DEC */
41
41
 
42
42
#include <float.h>
43
43
 
622
622
 
623
623
static Bigint *Balloc(int k)
624
624
{
625
 
  Bigint *rv;
626
 
 
627
 
  /* TODO: some malloc failure checking */
628
 
 
629
625
  int x= 1 << k;
630
 
  rv= (Bigint*) malloc(sizeof(Bigint));
 
626
  Bigint* rv= (Bigint*) malloc(sizeof(Bigint));
631
627
 
632
628
  rv->p.x= (ULong*)malloc(x * sizeof(ULong));
633
629
 
720
716
}
721
717
 
722
718
 
723
 
static int hi0bits(register ULong x)
 
719
static int hi0bits(ULong x)
724
720
{
725
 
  register int k= 0;
 
721
  int k= 0;
726
722
 
727
723
  if (!(x & 0xffff0000))
728
724
  {
756
752
 
757
753
static int lo0bits(ULong *y)
758
754
{
759
 
  register int k;
760
 
  register ULong x= *y;
 
755
  int k;
 
756
  ULong x= *y;
761
757
 
762
758
  if (x & 7)
763
759
  {
1069
1065
 
1070
1066
static double ulp(double x)
1071
1067
{
1072
 
  register Long L;
 
1068
  Long L;
1073
1069
  double a;
1074
1070
 
1075
1071
  L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1;