~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/m_string.h

Merge Stewart's dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
22
#ifndef MYSTRINGS_M_STRING_H
 
23
#define MYSTRINGS_M_STRING_H
24
24
 
 
25
#ifndef __USE_GNU
 
26
#define __USE_GNU                               /* We want to use my_stpcpy */
 
27
#endif
25
28
#if defined(HAVE_STRINGS_H)
26
29
#include <strings.h>
27
30
#endif
29
32
#include <string.h>
30
33
#endif
31
34
 
 
35
#include <stdint.h>
32
36
#include <stdlib.h>
33
37
#include <stddef.h>
34
 
#include <cassert>
 
38
#include <assert.h>
35
39
#include <limits.h>
36
40
#include <ctype.h>
37
41
 
40
44
#include <memory.h>
41
45
#endif
42
46
 
43
 
namespace drizzled
44
 
{
45
 
namespace internal
46
 
{
 
47
#if defined(__cplusplus)
 
48
extern "C" {
 
49
#endif
 
50
 
 
51
#define strmov_overlapp(A,B) my_stpcpy(A,B)
 
52
#define strmake_overlapp(A,B,C) strmake(A,B,C)
47
53
 
48
54
extern void bmove_upp(unsigned char *dst,const unsigned char *src,size_t len);
49
55
 
54
60
extern  char *strfill(char * s,size_t len,char fill);
55
61
extern  char *strkey(char *dst,char *head,char *tail,char *flags);
56
62
extern  char *strmake(char *dst,const char *src,size_t length);
 
63
#ifndef strmake_overlapp
 
64
extern  char *strmake_overlapp(char *dst,const char *src, size_t length);
 
65
#endif
57
66
 
58
67
extern  char *strsuff(const char *src,const char *suffix);
59
68
extern  char *strxcat(char *dst,const char *src, ...);
62
71
extern  char *strxncat(char *dst,size_t len, const char *src, ...);
63
72
extern  char *strxncpy(char *dst,size_t len, const char *src, ...);
64
73
 
 
74
/* Prototypes of normal stringfunctions (with may ours) */
 
75
 
 
76
#ifdef WANT_STRING_PROTOTYPES
 
77
extern char *strcat(char *, const char *);
 
78
extern char *strchr(const char *, char);
 
79
extern char *strrchr(const char *, char);
 
80
extern char *strcpy(char *, const char *);
 
81
#endif
 
82
 
 
83
extern int is_prefix(const char *, const char *);
 
84
 
65
85
/* Conversion routines */
66
86
typedef enum {
67
87
  MY_GCVT_ARG_FLOAT,
111
131
extern char *int64_t10_to_str(int64_t val,char *dst,int radix);
112
132
 
113
133
 
 
134
#if defined(__cplusplus)
 
135
}
 
136
#endif
 
137
 
 
138
 
114
139
/**
115
140
  Skip trailing space.
116
141
 
129
154
  return end+1;
130
155
}
131
156
 
132
 
} /* namespace internal */
133
 
} /* namespace drizzled */
134
 
 
135
 
#endif /* DRIZZLED_INTERNAL_M_STRING_H */
 
157
#endif /* MYSTRINGS_M_STRING_H */