diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-12-05 01:12:28 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2000-12-05 01:12:28 +0000 |
commit | b63830faa1cbb7c422e0eb7fe8416c51725ebf50 (patch) | |
tree | 300aa1327d8c372084d30c91c69a1eb1d546617a /encoding | |
parent | 4c2d777a149b47ef2fdd52b334d4893b10aa4514 (diff) | |
download | libapr-util-b63830faa1cbb7c422e0eb7fe8416c51725ebf50.tar.gz |
Get SHA1 and Base64 building as a part of apr-utils
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@57939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'encoding')
-rw-r--r-- | encoding/Makefile.in | 2 | ||||
-rw-r--r-- | encoding/ap_base64.c | 15 | ||||
-rw-r--r-- | encoding/apr_base64.c | 15 |
3 files changed, 16 insertions, 16 deletions
diff --git a/encoding/Makefile.in b/encoding/Makefile.in index 704d02c6..b65e91ae 100644 --- a/encoding/Makefile.in +++ b/encoding/Makefile.in @@ -1,3 +1,5 @@ +TARGETS=ap_base64.lo ap_sha1.lo + top_builddir = @top_builddir@ include $(top_builddir)/build/rules.mk diff --git a/encoding/ap_base64.c b/encoding/ap_base64.c index 7a8362fc..15bcba60 100644 --- a/encoding/ap_base64.c +++ b/encoding/ap_base64.c @@ -62,7 +62,6 @@ * ugly 'len' functions, which is quite a nasty cost. */ -#include "ap_config.h" #include "ap_base64.h" #ifdef CHARSET_EBCDIC #include "apr_xlate.h" @@ -114,7 +113,7 @@ static const unsigned char pr2six[256] = static apr_xlate_t *xlate_to_ebcdic; static unsigned char os_toascii[256]; -AP_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, +APR_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, apr_xlate_t *to_ebcdic) { int i; @@ -150,7 +149,7 @@ AP_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, } #endif /*CHARSET_EBCDIC*/ -AP_DECLARE(int) ap_base64decode_len(const char *bufcoded) +APR_DECLARE(int) ap_base64decode_len(const char *bufcoded) { int nbytesdecoded; register const unsigned char *bufin; @@ -165,7 +164,7 @@ AP_DECLARE(int) ap_base64decode_len(const char *bufcoded) return nbytesdecoded + 1; } -AP_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) +APR_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) { #ifdef CHARSET_EBCDIC apr_size_t inbytes_left, outbytes_left; @@ -185,7 +184,7 @@ AP_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) /* This is the same as ap_base64decode() except on EBCDIC machines, where * the conversion of the output to ebcdic is left out. */ -AP_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, +APR_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, const char *bufcoded) { int nbytesdecoded; @@ -233,12 +232,12 @@ AP_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, static const char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -AP_DECLARE(int) ap_base64encode_len(int len) +APR_DECLARE(int) ap_base64encode_len(int len) { return ((len + 2) / 3 * 4) + 1; } -AP_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) +APR_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) { #ifndef CHARSET_EBCDIC return ap_base64encode_binary(encoded, (const unsigned char *) string, len); @@ -277,7 +276,7 @@ AP_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) /* This is the same as ap_base64encode() except on EBCDIC machines, where * the conversion of the input to ascii is left out. */ -AP_DECLARE(int) ap_base64encode_binary(char *encoded, +APR_DECLARE(int) ap_base64encode_binary(char *encoded, const unsigned char *string, int len) { int i; diff --git a/encoding/apr_base64.c b/encoding/apr_base64.c index 7a8362fc..15bcba60 100644 --- a/encoding/apr_base64.c +++ b/encoding/apr_base64.c @@ -62,7 +62,6 @@ * ugly 'len' functions, which is quite a nasty cost. */ -#include "ap_config.h" #include "ap_base64.h" #ifdef CHARSET_EBCDIC #include "apr_xlate.h" @@ -114,7 +113,7 @@ static const unsigned char pr2six[256] = static apr_xlate_t *xlate_to_ebcdic; static unsigned char os_toascii[256]; -AP_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, +APR_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, apr_xlate_t *to_ebcdic) { int i; @@ -150,7 +149,7 @@ AP_DECLARE(apr_status_t) ap_base64init_ebcdic(apr_xlate_t *to_ascii, } #endif /*CHARSET_EBCDIC*/ -AP_DECLARE(int) ap_base64decode_len(const char *bufcoded) +APR_DECLARE(int) ap_base64decode_len(const char *bufcoded) { int nbytesdecoded; register const unsigned char *bufin; @@ -165,7 +164,7 @@ AP_DECLARE(int) ap_base64decode_len(const char *bufcoded) return nbytesdecoded + 1; } -AP_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) +APR_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) { #ifdef CHARSET_EBCDIC apr_size_t inbytes_left, outbytes_left; @@ -185,7 +184,7 @@ AP_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded) /* This is the same as ap_base64decode() except on EBCDIC machines, where * the conversion of the output to ebcdic is left out. */ -AP_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, +APR_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, const char *bufcoded) { int nbytesdecoded; @@ -233,12 +232,12 @@ AP_DECLARE(int) ap_base64decode_binary(unsigned char *bufplain, static const char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -AP_DECLARE(int) ap_base64encode_len(int len) +APR_DECLARE(int) ap_base64encode_len(int len) { return ((len + 2) / 3 * 4) + 1; } -AP_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) +APR_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) { #ifndef CHARSET_EBCDIC return ap_base64encode_binary(encoded, (const unsigned char *) string, len); @@ -277,7 +276,7 @@ AP_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len) /* This is the same as ap_base64encode() except on EBCDIC machines, where * the conversion of the input to ascii is left out. */ -AP_DECLARE(int) ap_base64encode_binary(char *encoded, +APR_DECLARE(int) ap_base64encode_binary(char *encoded, const unsigned char *string, int len) { int i; |