~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/m_string.h

  • Committer: Patrick Galbraith
  • Date: 2009-10-08 22:42:05 UTC
  • mto: (1166.5.3 memcached_functions)
  • mto: This revision was merged to the branch mainline in revision 1189.
  • Revision ID: patg@patrick-galbraiths-macbook-pro.local-20091008224205-gq1pehjsivvx0qo9
Starting over with a fresh tree, moved in memcached functions.

Memcached Functions for Drizzle. 

All tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
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 */
15
15
 
16
16
/* There may be prolems include all of theese. Try to test in
17
17
   configure with ones are needed? */
19
19
/*  This is needed for the definitions of strchr... on solaris */
20
20
 
21
21
 
22
 
#ifndef DRIZZLED_INTERNAL_M_STRING_H
23
 
#define DRIZZLED_INTERNAL_M_STRING_H
24
 
 
 
22
#ifndef _m_string_h
 
23
#define _m_string_h
 
24
 
 
25
#include <drizzled/global.h>
 
26
 
 
27
#ifndef __USE_GNU
 
28
#define __USE_GNU                               /* We want to use my_stpcpy */
 
29
#endif
25
30
#if defined(HAVE_STRINGS_H)
26
31
#include <strings.h>
27
32
#endif
31
36
 
32
37
#include <stdlib.h>
33
38
#include <stddef.h>
34
 
#include <cassert>
 
39
#include <assert.h>
35
40
#include <limits.h>
36
41
#include <ctype.h>
37
42
 
40
45
#include <memory.h>
41
46
#endif
42
47
 
43
 
namespace drizzled
44
 
{
45
 
namespace internal
46
 
{
 
48
#if defined(__cplusplus)
 
49
extern "C" {
 
50
#endif
 
51
 
 
52
#define strmov_overlapp(A,B) my_stpcpy(A,B)
 
53
#define strmake_overlapp(A,B,C) strmake(A,B,C)
47
54
 
48
55
extern void bmove_upp(unsigned char *dst,const unsigned char *src,size_t len);
49
56
 
54
61
extern  char *strfill(char * s,size_t len,char fill);
55
62
extern  char *strkey(char *dst,char *head,char *tail,char *flags);
56
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);
 
66
#endif
57
67
 
58
68
extern  char *strsuff(const char *src,const char *suffix);
59
69
extern  char *strxcat(char *dst,const char *src, ...);
62
72
extern  char *strxncat(char *dst,size_t len, const char *src, ...);
63
73
extern  char *strxncpy(char *dst,size_t len, const char *src, ...);
64
74
 
 
75
/* Prototypes of normal stringfunctions (with may ours) */
 
76
 
 
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 *);
 
82
#endif
 
83
 
 
84
extern int is_prefix(const char *, const char *);
 
85
 
65
86
/* Conversion routines */
66
87
typedef enum {
67
88
  MY_GCVT_ARG_FLOAT,
111
132
extern char *int64_t10_to_str(int64_t val,char *dst,int radix);
112
133
 
113
134
 
 
135
#if defined(__cplusplus)
 
136
}
 
137
#endif
 
138
 
 
139
 
114
140
/**
115
141
  Skip trailing space.
116
142
 
129
155
  return end+1;
130
156
}
131
157
 
132
 
} /* namespace internal */
133
 
} /* namespace drizzled */
134
 
 
135
 
#endif /* DRIZZLED_INTERNAL_M_STRING_H */
 
158
#endif