Back to index

php5  5.3.10
base64.h
Go to the documentation of this file.
00001 /*
00002 
00003           Encode or decode file as MIME base64 (RFC 1341)
00004 
00005                          by John Walker
00006                      http://www.fourmilab.ch/
00007 
00008               This program is in the public domain.
00009 
00010 */
00011 
00012 
00013 struct buffer_st {
00014   char *data;
00015   int length;
00016   char *ptr;
00017   int offset;
00018 };
00019 
00020 void buffer_new(struct buffer_st *b);
00021 void buffer_add(struct buffer_st *b, char c);
00022 void buffer_delete(struct buffer_st *b);
00023 
00024 void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length);
00025 void base64_decode_xmlrpc(struct buffer_st *b, const char *source, int length);
00026 
00027 /*
00028 #define DEBUG_MALLOC
00029  */
00030 
00031 #ifdef DEBUG_MALLOC
00032 void *_malloc_real(size_t s, char *file, int line);
00033 void _free_real(void *p, char *file, int line);
00034 
00035 #define malloc(s)    _malloc_real(s,__FILE__,__LINE__)
00036 #define free(p)             _free_real(p, __FILE__,__LINE__)
00037 #endif
00038