~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/m_string.h

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef DRIZZLED_INTERNAL_M_STRING_H
23
23
#define DRIZZLED_INTERNAL_M_STRING_H
24
24
 
25
 
#ifndef __USE_GNU
26
 
#define __USE_GNU                               /* We want to use my_stpcpy */
27
 
#endif
28
25
#if defined(HAVE_STRINGS_H)
29
26
#include <strings.h>
30
27
#endif
32
29
#include <string.h>
33
30
#endif
34
31
 
35
 
#include <stdint.h>
36
32
#include <stdlib.h>
37
33
#include <stddef.h>
38
 
#include <assert.h>
 
34
#include <cassert>
39
35
#include <limits.h>
40
36
#include <ctype.h>
41
37
 
44
40
#include <memory.h>
45
41
#endif
46
42
 
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)
 
43
namespace drizzled
 
44
{
 
45
namespace internal
 
46
{
53
47
 
54
48
extern void bmove_upp(unsigned char *dst,const unsigned char *src,size_t len);
55
49
 
60
54
extern  char *strfill(char * s,size_t len,char fill);
61
55
extern  char *strkey(char *dst,char *head,char *tail,char *flags);
62
56
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
66
57
 
67
58
extern  char *strsuff(const char *src,const char *suffix);
68
59
extern  char *strxcat(char *dst,const char *src, ...);
71
62
extern  char *strxncat(char *dst,size_t len, const char *src, ...);
72
63
extern  char *strxncpy(char *dst,size_t len, const char *src, ...);
73
64
 
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
65
/* Conversion routines */
84
66
typedef enum {
85
67
  MY_GCVT_ARG_FLOAT,
129
111
extern char *int64_t10_to_str(int64_t val,char *dst,int radix);
130
112
 
131
113
 
132
 
#if defined(__cplusplus)
133
 
}
134
 
#endif
135
 
 
136
 
 
137
114
/**
138
115
  Skip trailing space.
139
116
 
152
129
  return end+1;
153
130
}
154
131
 
 
132
} /* namespace internal */
 
133
} /* namespace drizzled */
 
134
 
155
135
#endif /* DRIZZLED_INTERNAL_M_STRING_H */