version 1.49, 2004/02/28 20:08:38 |
version 1.50, 2004/07/20 03:50:25 |
|
|
* Returns -1 on failure, 0 on success |
* Returns -1 on failure, 0 on success |
*/ |
*/ |
static int |
static int |
url_get(origline, proxyenv, outfile) |
url_get(const char *origline, const char *proxyenv, const char *outfile) |
const char *origline; |
|
const char *proxyenv; |
|
const char *outfile; |
|
{ |
{ |
struct addrinfo hints, *res0, *res; |
struct addrinfo hints, *res0, *res; |
int error; |
int error; |
|
|
* Abort a http retrieval |
* Abort a http retrieval |
*/ |
*/ |
void |
void |
aborthttp(notused) |
aborthttp(int notused) |
int notused; |
|
{ |
{ |
|
|
alarmtimer(0); |
alarmtimer(0); |
|
|
* Abort a http retrieval |
* Abort a http retrieval |
*/ |
*/ |
void |
void |
abortfile(notused) |
abortfile(int notused) |
int notused; |
|
{ |
{ |
|
|
alarmtimer(0); |
alarmtimer(0); |
|
|
* Otherwise, 0 is returned if all files retrieved successfully. |
* Otherwise, 0 is returned if all files retrieved successfully. |
*/ |
*/ |
int |
int |
auto_fetch(argc, argv, outfile) |
auto_fetch(int argc, char *argv[], char *outfile) |
int argc; |
|
char *argv[]; |
|
char *outfile; |
|
{ |
{ |
char *xargv[5]; |
char *xargv[5]; |
char *cp, *line, *host, *dir, *file, *portnum; |
char *cp, *line, *host, *dir, *file, *portnum; |
|
|
} |
} |
|
|
char * |
char * |
urldecode(str) |
urldecode(const char *str) |
const char *str; |
|
{ |
{ |
char *ret; |
char *ret; |
char c; |
char c; |
|
|
} |
} |
|
|
char |
char |
hextochar(str) |
hextochar(const char *str) |
const char *str; |
|
{ |
{ |
char c, ret; |
char c, ret; |
|
|
|
|
} |
} |
|
|
int |
int |
isurl(p) |
isurl(const char *p) |
const char *p; |
|
{ |
{ |
|
|
if (strncasecmp(p, FTP_URL, sizeof(FTP_URL) - 1) == 0 || |
if (strncasecmp(p, FTP_URL, sizeof(FTP_URL) - 1) == 0 || |