summaryrefslogtreecommitdiff
path: root/resolv/base64.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-18 05:10:37 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-18 05:10:37 +0000
commit6f9d8e68f6b1210af0a42c576687ad2fe7142100 (patch)
treeb68ecd7d113f855fa664d605d393b7fcd1a7b2ba /resolv/base64.c
parentb11816b2ae94adaf8417a8841eea4bf2edc96811 (diff)
Update.
2004-10-17 Ulrich Drepper <drepper@redhat.com> * include/libc-symbols.h: Define libresolv_hidden_proto and friends. * include/resolv.h: Add libresolv_hidden_proto for symbols defined, used, and exported in libresolv. * resolv/base64.c: Add libresolv_hidden_def. * resolv/gethnamaddr.c: Likewise. * resolv/ns_name.c: Likewise. * resolv/ns_netint.c: Likewise. * resolv/res_comp.c: Likewise. * resolv/res_data.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/res_mkquery.c: Likewise. * resolv/res_query.c: Likewise. * resolv/res_send.c: Likewise.
Diffstat (limited to 'resolv/base64.c')
-rw-r--r--resolv/base64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/resolv/base64.c b/resolv/base64.c
index b7c7d1c1b8..ea584ed357 100644
--- a/resolv/base64.c
+++ b/resolv/base64.c
@@ -112,9 +112,9 @@ static const char Pad64 = '=';
end of the data is performed using the '=' character.
Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
+ -------------------------------------------------
following cases can arise:
-
+
(1) the final quantum of encoding input is an integral
multiple of 24 bits; here, the final unit of encoded
output will be an integral multiple of 4 characters
@@ -156,14 +156,14 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
target[datalength++] = Base64[output[2]];
target[datalength++] = Base64[output[3]];
}
-
+
/* Now we worry about padding. */
if (0 != srclength) {
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
input[i] = *src++;
-
+
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
@@ -186,6 +186,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
target[datalength] = '\0'; /* Returned value doesn't count \0. */
return (datalength);
}
+libresolv_hidden_def (b64_ntop)
/* skips all whitespace anywhere.
converts characters, four at a time, starting at (or after)