~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/base64.cc

  • Committer: Brian Aker
  • Date: 2008-12-16 07:07:50 UTC
  • Revision ID: brian@tangent.org-20081216070750-o5ykltxxqvn2awrx
Fixed errors test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
 
16
#include <drizzled/global.h>
16
17
#include <mystrings/m_string.h>  /* strchr() */
17
18
#include <mystrings/m_ctype.h>  /* my_isspace() */
18
19
#include <mysys/base64.h>
 
20
#include <stdio.h>
 
21
#include CMATH_H
 
22
 
 
23
#if defined(CMATH_NAMESPACE)
 
24
using namespace CMATH_NAMESPACE;
 
25
#endif
19
26
 
20
27
#ifndef MAIN
21
28
 
40
47
int
41
48
base64_needed_decoded_length(int length_of_encoded_data)
42
49
{
43
 
  return (int) ceil(length_of_encoded_data * 3 / 4);
 
50
  return (int) ceil((double)(length_of_encoded_data * 3 / 4));
44
51
}
45
52
 
46
53
 
108
115
 
109
116
#define SKIP_SPACE(src, i, size)                                \
110
117
{                                                               \
111
 
  while (i < size && my_isspace(&my_charset_latin1, * src))     \
 
118
  while (i < size && my_isspace(&my_charset_utf8_general_ci, * src))     \
112
119
  {                                                             \
113
120
    i++;                                                        \
114
121
    src++;                                                      \