From 40ac28454ee32626294741e72bb64611a3589618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 15 May 2000 08:34:42 +0000 Subject: [PATCH] Document struct url. Document the default values for fetchStat*(). --- lib/libfetch/fetch.3 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3 index 0aa75e3f93d6..f63089c52ba6 100644 --- a/lib/libfetch/fetch.3 +++ b/lib/libfetch/fetch.3 @@ -120,6 +120,28 @@ all URL schemes. For instance, the file scheme only needs the and components. .Pp +.Fn fetchParseURL +returns a pointer to a +.Fa url +structure, which is defined as follows in +.Aq Pa fetch.h : +.Bd -literal +#define URL_SCHEMELEN 16 +#define URL_USERLEN 256 +#define URL_PWDLEN 256 + +struct url { + char scheme[URL_SCHEMELEN+1]; + char user[URL_USERLEN+1]; + char pwd[URL_PWDLEN+1]; + char host[MAXHOSTNAMELEN+1]; + int port; + char *doc; + off_t offset; + size_t length; +}; +.Ed +.Pp The pointer returned by .Fn fetchParseURL should be freed using @@ -156,6 +178,16 @@ struct url_stat { }; .Ed .Pp +If the size could not be obtained from the server, the +.Fa size +field is set to -1. +If the modification time could not be obtained from the server, the +.Fa mtime +field is set to the epoch. +If the access time could not be obtained from the server, the +.Fa atime +field is set to the modification time. +.Pp .Fn fetchListURL attempts to list the contents of the directory pointed to by the URL provided.