diff options
Diffstat (limited to 'src/xine-utils/base64.c')
-rw-r--r-- | src/xine-utils/base64.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/xine-utils/base64.c b/src/xine-utils/base64.c index af6e2eadf..102f15256 100644 --- a/src/xine-utils/base64.c +++ b/src/xine-utils/base64.c @@ -15,11 +15,10 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * Base64 encoding modified for Musicbrainz * relicensed under the GNU General Public License for use in xine-lib - * */ /* -------------------------------------------------------------------------- @@ -39,9 +38,7 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id: base64.c,v 1.2 2004/05/05 18:44:19 mroi Exp $ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA ----------------------------------------------------------------------------*/ /* @@ -84,15 +81,18 @@ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <ctype.h> #include <stdio.h> #include <time.h> #include <stdlib.h> -#include "base64.h" +#include <xine/base64.h> /* NOTE: This is not true RFC822 anymore. The use of the characters @@ -107,11 +107,11 @@ * Returns: destination as BASE64 */ -unsigned char *rfc822_binary (void *src,unsigned long srcl,unsigned long *len) +unsigned char *xine_rfc822_binary (void *src,unsigned long srcl,unsigned long *len) { unsigned char *ret,*d; unsigned char *s = (unsigned char *) src; - char *v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; + static const char v[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; unsigned long i = ((srcl + 2) / 3) * 4; *len = i += 2 * ((i / 60) + 1); d = ret = (unsigned char *) malloc ((size_t) ++i); @@ -134,7 +134,7 @@ unsigned char *rfc822_binary (void *src,unsigned long srcl,unsigned long *len) return ret; /* return the resulting string */ } -char *base64_encode (const void *src, unsigned long srcl, unsigned long *len) +char *xine_base64_encode (const void *src, unsigned long srcl, unsigned long *len) { char *ret, *d; unsigned char *s = (unsigned char *) src; @@ -157,7 +157,7 @@ char *base64_encode (const void *src, unsigned long srcl, unsigned long *len) return ret; /* return the resulting string */ } -void *base64_decode (const char *src, unsigned long srcl, unsigned long *len) +void *xine_base64_decode (const char *src, unsigned long srcl, unsigned long *len) { void *ret; unsigned char *d; |