From 22406d98dcada3e438c6d4b3b707192f7fb71969 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 14 Nov 1996 06:59:41 +0000 Subject: For functions ftpGetURL, ftpPutURL, ftpLogin it was impossible to know FTP error return code because 1) They return NULL, it means that ftpErrno can't be used because it takes file pointer 2) They don't have FILE-type argument as f.e. ftpGet/ftpPut to use it for ftpErrno instead. For that functions I add yet one int* type argument to store FTP error return code. It is impossible to add some global variable for that reason, because user can have multiply FTP connections opened at the same time. So, interface changed, major number bumped. Userland changes will follows. Minor bugfixes, the code: Forget to close file in few places, when failure occurse Forget to NULL cached host name, multiply free is possible --- lib/libftpio/ftpio.3 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libftpio/ftpio.3') diff --git a/lib/libftpio/ftpio.3 b/lib/libftpio/ftpio.3 index 4304c1c..8476ec7 100644 --- a/lib/libftpio/ftpio.3 +++ b/lib/libftpio/ftpio.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id$ +.\" $Id: ftpio.3,v 1.11 1996/10/05 22:26:51 wosch Exp $ .\" .Dd June 17, 1996 .Dt ftpio 3 @@ -44,7 +44,7 @@ .Sh SYNOPSIS .Fd #include .Ft FILE * -.Fn ftpLogin "char *host" "char *user" "char *passwd" "int ftp_port" "int verbose" +.Fn ftpLogin "char *host" "char *user" "char *passwd" "int ftp_port" "int verbose" "int *retcode" .Ft int .Fn ftpChdir "FILE *stream, char *dirname" .Ft int @@ -68,9 +68,9 @@ .Ft void .Fn ftpVerbose "FILE *stream, int status" .Ft FILE * -.Fn ftpGetURL "char *url, char *user, char *passwd" +.Fn ftpGetURL "char *url, char *user, char *passwd, int *retcode" .Ft FILE * -.Fn ftpPutURL "char *url, char *user, char *passwd" +.Fn ftpPutURL "char *url, char *user, char *passwd, int *retcode" .Sh DESCRIPTION These functions implement a high-level library for managing FTP connections. @@ -87,8 +87,8 @@ defaults to the standard ftp port of 21) and fields. If it is successful, a standard stream descriptor is returned which should be passed to subsequent FTP operations. On failure, NULL is returned and -.Fn ftpErrno -will return the error code returned by the foreign server. +.Fa retcode +will have the error code returned by the foreign server. .Pp .Fn ftpChdir attempts to issue a server CD command to the directory named in -- cgit v1.1