summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/fetch.h
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-05-11 13:31:02 +0000
committerdes <des@FreeBSD.org>2000-05-11 13:31:02 +0000
commita9ed660f51d2b2b40897b782d076227c7097ed87 (patch)
tree70e025aca6f28347e785da29894bb1396ca02883 /lib/libfetch/fetch.h
parent5c2106e7d4ea48dbde851e51ae9a14717355a402 (diff)
downloadFreeBSD-src-a9ed660f51d2b2b40897b782d076227c7097ed87.zip
FreeBSD-src-a9ed660f51d2b2b40897b782d076227c7097ed87.tar.gz
Reorganize some of the http code and split it into more functions.
Implement fetchStatHTTP(). Unbungle struct url, and add fetchFreeURL(). Document it.
Diffstat (limited to 'lib/libfetch/fetch.h')
-rw-r--r--lib/libfetch/fetch.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libfetch/fetch.h b/lib/libfetch/fetch.h
index e237515..02df28a 100644
--- a/lib/libfetch/fetch.h
+++ b/lib/libfetch/fetch.h
@@ -40,14 +40,14 @@
#define URL_PWDLEN 256
struct url {
- off_t offset;
- size_t length;
char scheme[URL_SCHEMELEN+1];
char user[URL_USERLEN+1];
char pwd[URL_PWDLEN+1];
char host[MAXHOSTNAMELEN+1];
int port;
- char doc[2];
+ char *doc;
+ off_t offset;
+ size_t length;
};
struct url_stat {
@@ -81,7 +81,6 @@ int fetchStatFTP(struct url *, struct url_stat *, char *);
struct url_ent *fetchListFTP(struct url *, char *);
/* Generic functions */
-struct url *fetchParseURL(char *);
FILE *fetchGetURL(char *, char *);
FILE *fetchPutURL(char *, char *);
int fetchStatURL(char *, struct url_stat *, char *);
@@ -91,6 +90,10 @@ FILE *fetchPut(struct url *, char *);
int fetchStat(struct url *, struct url_stat *, char *);
struct url_ent *fetchList(struct url *, char *);
+/* URL parsing */
+struct url *fetchParseURL(char *);
+void fetchFreeURL(struct url *);
+
/* Last error code */
extern int fetchLastErrCode;
extern int fetchTimeout;
OpenPOWER on IntegriCloud