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
24
#if defined(HAVE_STRINGS_H)
25
21
#include <strings.h>
27
#if defined(HAVE_STRING_H)
28
22
#include <string.h>
31
23
#include <stdlib.h>
32
24
#include <stddef.h>
34
26
#include <limits.h>
37
/* This is needed for the definitions of memcpy... on solaris */
38
#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
43
#include "drizzled/visibility.h"
29
#include <drizzled/visibility.h>
50
34
extern void bmove_upp(unsigned char *dst,const unsigned char *src,size_t len);
52
extern void bchange(unsigned char *dst,size_t old_len,const unsigned char *src,
53
size_t new_len,size_t tot_len);
54
extern char *strfield(char *src,int fields,int chars,int blanks,
56
extern char *strfill(char * s,size_t len,char fill);
57
extern char *strkey(char *dst,char *head,char *tail,char *flags);
58
extern char *strmake(char *dst,const char *src,size_t length);
60
extern char *strsuff(const char *src,const char *suffix);
61
extern char *strxcat(char *dst,const char *src, ...);
62
extern char *strxmov(char *dst,const char *src, ...);
63
extern char *strxcpy(char *dst,const char *src, ...);
64
extern char *strxncat(char *dst,size_t len, const char *src, ...);
65
extern char *strxncpy(char *dst,size_t len, const char *src, ...);
67
36
/* Conversion routines */
73
43
DRIZZLED_API double my_strtod(const char *str, char **end, int *error);
74
44
DRIZZLED_API double my_atof(const char *nptr);
75
45
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,
46
DRIZZLED_API size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to, bool *error);
79
48
#define NOT_FIXED_DEC (uint8_t)31
96
65
#define MAX_DECPT_FOR_F_FORMAT DBL_DIG
99
The maximum possible field width for my_gcvt() conversion.
100
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
101
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
103
#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + cmax(5, MAX_DECPT_FOR_F_FORMAT))
106
67
extern char *llstr(int64_t value,char *buff);
107
68
extern char *ullstr(int64_t value,char *buff);