aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-07-26 11:10:54 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-07-26 11:10:54 +0000
commite6cef3534ecb54d4056c39f5162cfa755cdf333f (patch)
treee104fce7e361f958b73816a8227183e96d3ecb9d /lib/libfetch
parent1bba747548a8cf3cc62eb0ce8ff7a920d8319fc5 (diff)
Notes
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/fetch.h48
1 files changed, 28 insertions, 20 deletions
diff --git a/lib/libfetch/fetch.h b/lib/libfetch/fetch.h
index 3899ccac3cfe..1c627d34f8f4 100644
--- a/lib/libfetch/fetch.h
+++ b/lib/libfetch/fetch.h
@@ -38,25 +38,25 @@
#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;
+ 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;
};
struct url_stat {
- off_t size;
- time_t atime;
- time_t mtime;
+ off_t size;
+ time_t atime;
+ time_t mtime;
};
struct url_ent {
- char name[PATH_MAX];
- struct url_stat stat;
+ char name[PATH_MAX];
+ struct url_stat stat;
};
/* Recognized schemes */
@@ -86,6 +86,8 @@ struct url_ent {
#define FETCH_URL 18
#define FETCH_VERBOSE 19
+__BEGIN_DECLS
+
/* FILE-specific functions */
FILE *fetchXGetFile(struct url *, struct url_stat *, const char *);
FILE *fetchGetFile(struct url *, const char *);
@@ -121,22 +123,28 @@ struct url_ent *fetchList(struct url *, const char *);
/* URL parsing */
struct url *fetchMakeURL(const char *, const char *, int,
- const char *, const char *, const char *);
+ const char *, const char *, const char *);
struct url *fetchParseURL(const char *);
void fetchFreeURL(struct url *);
+__END_DECLS
+
/* Authentication */
typedef int (*auth_t)(struct url *);
-extern auth_t fetchAuthMethod;
+extern auth_t fetchAuthMethod;
/* Last error code */
-extern int fetchLastErrCode;
+extern int fetchLastErrCode;
#define MAXERRSTRING 256
-extern char fetchLastErrString[MAXERRSTRING];
-extern int fetchTimeout;
-extern int fetchRestartCalls;
+extern char fetchLastErrString[MAXERRSTRING];
+
+/* I/O timeout */
+extern int fetchTimeout;
+
+/* Restart interrupted syscalls */
+extern int fetchRestartCalls;
/* Extra verbosity */
-extern int fetchDebug;
+extern int fetchDebug;
#endif