~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_decimal.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    @retval E_DEC_OOM
86
86
*/
87
87
 
88
 
int my_decimal2string(uint mask, const my_decimal *d,
89
 
                      uint fixed_prec, uint fixed_dec,
 
88
int my_decimal2string(uint32_t mask, const my_decimal *d,
 
89
                      uint32_t fixed_prec, uint32_t fixed_dec,
90
90
                      char filler, String *str)
91
91
{
92
92
  /*
135
135
    E_DEC_OVERFLOW
136
136
*/
137
137
 
138
 
int my_decimal2binary(uint mask, const my_decimal *d, unsigned char *bin, int prec,
 
138
int my_decimal2binary(uint32_t mask, const my_decimal *d, unsigned char *bin, int prec,
139
139
                      int scale)
140
140
{
141
141
  int err1= E_DEC_OK, err2;
174
174
    E_DEC_OOM
175
175
*/
176
176
 
177
 
int str2my_decimal(uint mask, const char *from, uint length,
 
177
int str2my_decimal(uint32_t mask, const char *from, uint32_t length,
178
178
                   const CHARSET_INFO * charset, my_decimal *decimal_value)
179
179
{
180
180
  char *end, *from_end;
183
183
  String tmp(buff, sizeof(buff), &my_charset_bin);
184
184
  if (charset->mbminlen > 1)
185
185
  {
186
 
    uint dummy_errors;
 
186
    uint32_t dummy_errors;
187
187
    tmp.copy(from, length, charset, &my_charset_utf8_general_ci, &dummy_errors);
188
188
    from= tmp.ptr();
189
189
    length=  tmp.length();
225
225
}
226
226
 
227
227
 
228
 
void my_decimal_trim(uint32_t *precision, uint *scale)
 
228
void my_decimal_trim(uint32_t *precision, uint32_t *scale)
229
229
{
230
230
  if (!(*precision) && !(*scale))
231
231
  {