~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/decimal.h

Removed dead variable, sorted authors file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#ifndef _decimal_h
17
17
#define _decimal_h
18
18
 
19
 
#if defined(__cplusplus)
20
 
extern "C" {
21
 
#endif
22
 
 
23
19
typedef enum
24
20
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
25
21
  decimal_round_mode;
26
 
typedef int32_t decimal_digit_t;
 
22
typedef int32 decimal_digit_t;
27
23
 
28
24
typedef struct st_decimal_t {
29
25
  int    intg, frac, len;
30
 
  bool sign;
 
26
  my_bool sign;
31
27
  decimal_digit_t *buf;
32
28
} decimal_t;
33
29
 
34
 
int internal_str2dec(char *from, decimal_t *to, char **end,
35
 
                     bool fixed);
 
30
int internal_str2dec(const char *from, decimal_t *to, char **end,
 
31
                     my_bool fixed);
36
32
int decimal2string(decimal_t *from, char *to, int *to_len,
37
33
                   int fixed_precision, int fixed_decimals,
38
34
                   char filler);
43
39
int decimal2double(decimal_t *from, double *to);
44
40
int double2decimal(double from, decimal_t *to);
45
41
int decimal_actual_fraction(decimal_t *from);
46
 
int decimal2bin(decimal_t *from, unsigned char *to, int precision, int scale);
47
 
int bin2decimal(const unsigned char *from, decimal_t *to, int precision, int scale);
 
42
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
 
43
int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
48
44
 
49
45
int decimal_size(int precision, int scale);
50
46
int decimal_bin_size(int precision, int scale);
107
103
#define E_DEC_ERROR            31
108
104
#define E_DEC_FATAL_ERROR      30
109
105
 
110
 
#if defined(__cplusplus)
111
 
}
112
 
#endif
113
 
 
114
106
#endif
115
107