comparison modules/base64/base64.c @ 388:aabb7f5b1c81 r21-2-9

Import from CVS: tag r21-2-9
author cvs
date Mon, 13 Aug 2007 11:09:42 +0200
parents 8efd647ea9ca
children
comparison
equal deleted inserted replaced
387:f892a9d0bb8d 388:aabb7f5b1c81
1 /* base64 interface for XEmacs. 1 /* base64 interface for XEmacs.
2 Copyright (C) 1998 Free Software Foundation, Inc. 2 Copyright (C) 1998, 1999 Free Software Foundation, Inc.
3 3
4 This file is part of XEmacs. 4 This file is part of XEmacs.
5 5
6 XEmacs is free software; you can redistribute it and/or modify it 6 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the 7 under the terms of the GNU General Public License as published by the
20 20
21 /* Synched up with: Not in FSF. */ 21 /* Synched up with: Not in FSF. */
22 22
23 /* Author: William Perry <wmperry@aventail.com> */ 23 /* Author: William Perry <wmperry@aventail.com> */
24 24
25 #include <config.h> 25 #include <emodules.h>
26
27 #include "lisp.h"
28 #include "buffer.h"
29 #include "insdel.h"
30 #include "lstream.h"
31 #ifdef FILE_CODING
32 #include "file-coding.h"
33 #endif
34 26
35 unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 27 unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
36 28
37 DEFUN ("base64-encode", Fbase64_encode, 1, 5, 0, /* 29 DEFUN ("base64-encode", Fbase64_encode, 1, 5, 0, /*
38 Return the base64 encoding of an object. 30 Return the base64 encoding of an object.
414 406
415 return(make_string(Dynarr_atp(out_dynarr,0),Dynarr_length(out_dynarr))); 407 return(make_string(Dynarr_atp(out_dynarr,0),Dynarr_length(out_dynarr)));
416 } 408 }
417 409
418 void 410 void
419 syms_of (void) 411 syms_of_base64 (void)
420 { 412 {
421 DEFSUBR(Fbase64_encode); 413 DEFSUBR(Fbase64_encode);
422 DEFSUBR(Fbase64_decode); 414 DEFSUBR(Fbase64_decode);
423 } 415 }
424 416
425 void 417 void
426 vars_of (void) 418 vars_of_base64 (void)
427 { 419 {
428 Fprovide (intern ("base64")); 420 Fprovide (intern ("base64"));
429 } 421 }