diff --git a/docs/libssh2_base64_decode.3 b/docs/libssh2_base64_decode.3 index e46db823..7a67202d 100644 --- a/docs/libssh2_base64_decode.3 +++ b/docs/libssh2_base64_decode.3 @@ -1,6 +1,6 @@ .\" Copyright (C) The libssh2 project and its contributors. .\" SPDX-License-Identifier: BSD-3-Clause -.TH libssh2_base64_decode 3 "23 Dec 2008" "libssh2 1.0" "libssh2" +.TH libssh2_base64_decode 3 "23 Dec 2008" "libssh2 0.1" "libssh2" .SH NAME libssh2_base64_decode - decode a base64 encoded string .SH SYNOPSIS @@ -13,8 +13,8 @@ libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, unsigned int src_len); .fi .SH DESCRIPTION -This function is deemed DEPRECATED and will be removed from libssh2 in a -future version. Do not use it! +This function is deemed DEPRECATED in 1.0 and will be removed from libssh2 +in a future version. Do not use it! Decode a base64 chunk and store it into a newly allocated buffer. 'dest_len' will be set to hold the length of the returned buffer that '*dest' will point diff --git a/include/libssh2.h b/include/libssh2.h index ecfa1a9d..78cc3122 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -1071,10 +1071,12 @@ LIBSSH2_API LIBSSH2_CHANNEL * libssh2_scp_send64(LIBSSH2_SESSION *session, const char *path, int mode, libssh2_int64_t size, time_t mtime, time_t atime); -/* DEPRECATED */ +#ifndef LIBSSH2_NO_DEPRECATED +LIBSSH2_DEPRECATED(1.0, "") LIBSSH2_API int libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, unsigned int *dest_len, const char *src, unsigned int src_len); +#endif LIBSSH2_API const char *libssh2_version(int req_version_num); diff --git a/os400/libssh2rpg/libssh2.rpgle.in b/os400/libssh2rpg/libssh2.rpgle.in index ea0c69fa..4ecc36fd 100644 --- a/os400/libssh2rpg/libssh2.rpgle.in +++ b/os400/libssh2rpg/libssh2.rpgle.in @@ -1429,7 +1429,7 @@ d mode value like(libssh2_Cint) d size value like(libssh2_int64_t) - * DEPRECATED + /if not defined(LIBSSH2_NO_DEPRECATED) d libssh2_base64_decode... d pr extproc('libssh2_base64_decode') d like(libssh2_Cint) @@ -1438,6 +1438,7 @@ d dest_len * value unsigned int * d src * value options(*string) const char * d src_len value like(libssh2_Cuint) + /endif * Procedure libssh2_version renamed to avoid upper/lower case name clash. d libssh2_get_version... diff --git a/src/misc.c b/src/misc.c index cd9971a5..ee798403 100644 --- a/src/misc.c +++ b/src/misc.c @@ -353,9 +353,10 @@ static const short base64_reverse_table[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -/* libssh2_base64_decode +#ifndef LIBSSH2_NO_DEPRECATED +/* libssh2_base64_decode (DEPRECATED, DO NOT USE!) * - * Legacy public function. DEPRECATED. + * Legacy public function. */ LIBSSH2_API int libssh2_base64_decode(LIBSSH2_SESSION *session, char **data, @@ -372,6 +373,7 @@ libssh2_base64_decode(LIBSSH2_SESSION *session, char **data, return rc; } +#endif /* _libssh2_base64_decode *