12
12
You should have received a copy of the GNU General Public License
13
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
16
/* There may be prolems include all of theese. Try to test in
17
17
configure with ones are needed? */
21
#ifndef DRIZZLED_INTERNAL_M_STRING_H
22
#define DRIZZLED_INTERNAL_M_STRING_H
19
/* This is needed for the definitions of strchr... on solaris */
25
#include <drizzled/global.h>
28
#define __USE_GNU /* We want to use my_stpcpy */
24
30
#if defined(HAVE_STRINGS_H)
25
31
#include <strings.h>
39
45
#include <memory.h>
43
#include "drizzled/visibility.h"
48
#if defined(__cplusplus)
52
#define strmov_overlapp(A,B) my_stpcpy(A,B)
53
#define strmake_overlapp(A,B,C) strmake(A,B,C)
50
55
extern void bmove_upp(unsigned char *dst,const unsigned char *src,size_t len);
56
61
extern char *strfill(char * s,size_t len,char fill);
57
62
extern char *strkey(char *dst,char *head,char *tail,char *flags);
58
63
extern char *strmake(char *dst,const char *src,size_t length);
64
#ifndef strmake_overlapp
65
extern char *strmake_overlapp(char *dst,const char *src, size_t length);
60
68
extern char *strsuff(const char *src,const char *suffix);
61
69
extern char *strxcat(char *dst,const char *src, ...);
64
72
extern char *strxncat(char *dst,size_t len, const char *src, ...);
65
73
extern char *strxncpy(char *dst,size_t len, const char *src, ...);
75
/* Prototypes of normal stringfunctions (with may ours) */
77
#ifdef WANT_STRING_PROTOTYPES
78
extern char *strcat(char *, const char *);
79
extern char *strchr(const char *, char);
80
extern char *strrchr(const char *, char);
81
extern char *strcpy(char *, const char *);
84
extern int is_prefix(const char *, const char *);
67
86
/* Conversion routines */
71
90
} my_gcvt_arg_type;
73
DRIZZLED_API double my_strtod(const char *str, char **end, int *error);
74
DRIZZLED_API double my_atof(const char *nptr);
75
DRIZZLED_API size_t my_fcvt(double x, int precision, char *to, bool *error);
76
DRIZZLED_API size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
92
double my_strtod(const char *str, char **end, int *error);
93
double my_atof(const char *nptr);
94
size_t my_fcvt(double x, int precision, char *to, bool *error);
95
size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
79
98
#define NOT_FIXED_DEC (uint8_t)31
109
128
extern char *int2str(int32_t val, char *dst, int radix, int upcase);
110
129
extern char *int10_to_str(int32_t val,char *dst,int radix);
111
DRIZZLED_API int64_t my_strtoll10(const char *nptr, char **endptr, int *error);
112
DRIZZLED_API char *int64_t2str(int64_t val,char *dst,int radix);
113
DRIZZLED_API char *int64_t10_to_str(int64_t val,char *dst,int radix);
130
int64_t my_strtoll10(const char *nptr, char **endptr, int *error);
131
extern char *int64_t2str(int64_t val,char *dst,int radix);
132
extern char *int64_t10_to_str(int64_t val,char *dst,int radix);
135
#if defined(__cplusplus)