~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/decimal.h

  • Committer: Brian Aker
  • Date: 2009-07-11 19:23:04 UTC
  • mfrom: (1089.1.14 merge)
  • Revision ID: brian@gaz-20090711192304-ootijyl5yf9jq9kd
Merge Brian

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
 
19
23
typedef enum
20
24
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
21
25
  decimal_round_mode;
39
43
int decimal2double(decimal_t *from, double *to);
40
44
int double2decimal(double from, decimal_t *to);
41
45
int decimal_actual_fraction(decimal_t *from);
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);
 
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);
44
48
 
45
49
int decimal_size(int precision, int scale);
46
50
int decimal_bin_size(int precision, int scale);
103
107
#define E_DEC_ERROR            31
104
108
#define E_DEC_FATAL_ERROR      30
105
109
 
 
110
#if defined(__cplusplus)
 
111
}
 
112
#endif
 
113
 
106
114
#endif
107
115