~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.h

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
/* This file is originally from the mysql distribution. Coded by monty */
24
24
 
 
25
#ifdef USE_PRAGMA_INTERFACE
 
26
#pragma interface                       /* gcc class implementation */
 
27
#endif
25
28
 
26
29
#ifndef NOT_FIXED_DEC
27
30
#define NOT_FIXED_DEC                   31
28
31
#endif
29
32
 
30
 
#include <drizzled/common.h>
31
 
#include <mysys/iocache.h>
32
 
 
33
33
class String;
34
34
int sortcmp(const String *a,const String *b, const CHARSET_INFO * const cs);
35
35
String *copy_if_not_alloced(String *a,String *b,uint32_t arg_length);
36
36
uint32_t copy_and_convert(char *to, uint32_t to_length, const CHARSET_INFO * const to_cs,
37
37
                        const char *from, uint32_t from_length,
38
 
                        const CHARSET_INFO * const from_cs, uint32_t *errors);
 
38
                        const CHARSET_INFO * const from_cs, uint *errors);
39
39
uint32_t well_formed_copy_nchars(const CHARSET_INFO * const to_cs,
40
 
                               char *to, uint32_t to_length,
 
40
                               char *to, uint to_length,
41
41
                               const CHARSET_INFO * const from_cs,
42
 
                               const char *from, uint32_t from_length,
43
 
                               uint32_t nchars,
 
42
                               const char *from, uint from_length,
 
43
                               uint nchars,
44
44
                               const char **well_formed_error_pos,
45
45
                               const char **cannot_convert_error_pos,
46
46
                               const char **from_end_pos);
165
165
  { return set_int(num, false, cs); }
166
166
  bool set(uint64_t num, const CHARSET_INFO * const cs)
167
167
  { return set_int((int64_t)num, true, cs); }
168
 
  bool set_real(double num,uint32_t decimals, const CHARSET_INFO * const cs);
 
168
  bool set_real(double num,uint decimals, const CHARSET_INFO * const cs);
169
169
 
170
170
  /*
171
171
    PMG 2004.11.12
200
200
    {
201
201
      alloced=0;
202
202
      Alloced_length=0;
203
 
      ::free(Ptr);
 
203
      my_free(Ptr,MYF(0));
204
204
      Ptr=0;
205
205
      str_length=0;                             /* Safety */
206
206
    }
257
257
                    const CHARSET_INFO * const cs);
258
258
  bool set_or_copy_aligned(const char *s, uint32_t arg_length, const CHARSET_INFO * const cs);
259
259
  bool copy(const char*s,uint32_t arg_length, const CHARSET_INFO * const csfrom,
260
 
            const CHARSET_INFO * const csto, uint32_t *errors);
 
260
            const CHARSET_INFO * const csto, uint *errors);
261
261
  bool append(const String &s);
262
262
  bool append(const char *s);
263
263
  bool append(const char *s,uint32_t arg_length);
340
340
     str_length++;
341
341
  }
342
342
  void qs_append(int i);
343
 
  void qs_append(uint32_t i);
 
343
  void qs_append(uint i);
344
344
 
345
345
  /* Inline (general) functions used by the protocol functions */
346
346