.TH ftp_url_parse 3 "January 2004" "Feep Networks" "C Library Calls" .SH NAME ftp_url_parse \- parse FTP URL .SH SYNOPSIS .B #include .BI "int ftp_url_parse(char *" url ", struct ftp_url *" ftpurl ");" .SH VERSION This man page documents version 1.3 of \fBlibfget\fP. .SH DESCRIPTION The \fBftp_url_parse\fP() function parses the URL string \fIurl\fP and fills in the fields of the structure pointed to by \fIftpurl\fP. The structure contains the following fields: .TP .B char fu_hostname[MAXHOSTNAMELEN]; The hostname. .TP .B char fu_login[MAXUSERNAMELEN]; The user name (if supplied). .TP .B char fu_passwd[MAXPASSLEN]; The password (if supplied). .TP .B char fu_path[MAXPATHLEN]; The path (if supplied). .TP .B char fu_type; The RFC-1738 typecode ('i' for binary, 'a' for ascii, or 'd' for directory), or '?' if no type was specified. .SH RETURN VALUES The \fBftp_url_parse\fP() function returns 0 on success or -1 on error (and sets \fIerrno\fP). .SH ERRORS The \fBftp_url_parse\fP() function fails if: .TP .B EINVAL The URL specified by \fIurl\fP is invalid. .TP .B ENAMETOOLONG One of the components of the URL is too long for the appropriate field in \fIftpurl\fP. .SH SEE ALSO .BR libfget (3)