version 1.68, 2007/11/28 16:21:25 |
version 1.69, 2008/06/25 21:15:19 |
|
|
httpport = "http"; |
httpport = "http"; |
#ifndef SMALL |
#ifndef SMALL |
httpsport = "https"; |
httpsport = "https"; |
#endif |
#endif /* !SMALL */ |
gateport = getenv("FTPSERVERPORT"); |
gateport = getenv("FTPSERVERPORT"); |
if (gateport == NULL || *gateport == '\0') |
if (gateport == NULL || *gateport == '\0') |
gateport = "ftpgate"; |
gateport = "ftpgate"; |
|
|
hist = NULL; |
hist = NULL; |
cookiefile = NULL; |
cookiefile = NULL; |
resume = 0; |
resume = 0; |
#endif |
#endif /* !SMALL */ |
mark = HASHBYTES; |
mark = HASHBYTES; |
marg_sl = sl_init(); |
marg_sl = sl_init(); |
#ifdef INET6 |
#ifdef INET6 |
|
|
#ifndef SMALL |
#ifndef SMALL |
if (!dumb_terminal) |
if (!dumb_terminal) |
editing = 1; /* editing mode on if tty is usable */ |
editing = 1; /* editing mode on if tty is usable */ |
#endif |
#endif /* !SMALL */ |
} |
} |
|
|
ttyout = stdout; |
ttyout = stdout; |
|
|
|
|
#ifndef SMALL |
#ifndef SMALL |
cookiefile = getenv("http_cookies"); |
cookiefile = getenv("http_cookies"); |
#endif |
#endif /* !SMALL */ |
|
|
while ((ch = getopt(argc, argv, "46AaCc:dEegik:mno:pP:r:tvV")) != -1) { |
while ((ch = getopt(argc, argv, "46AaCc:dEegik:mno:pP:r:tvV")) != -1) { |
switch (ch) { |
switch (ch) { |
|
|
case 'C': |
case 'C': |
#ifndef SMALL |
#ifndef SMALL |
resume = 1; |
resume = 1; |
#endif |
#endif /* !SMALL */ |
break; |
break; |
|
|
case 'c': |
case 'c': |
#ifndef SMALL |
#ifndef SMALL |
cookiefile = optarg; |
cookiefile = optarg; |
#endif |
#endif /* !SMALL */ |
break; |
break; |
|
|
case 'd': |
case 'd': |
|
|
case 'e': |
case 'e': |
#ifndef SMALL |
#ifndef SMALL |
editing = 0; |
editing = 0; |
#endif |
#endif /* !SMALL */ |
break; |
break; |
|
|
case 'g': |
case 'g': |
|
|
|
|
#ifndef SMALL |
#ifndef SMALL |
cookie_load(); |
cookie_load(); |
#endif |
#endif /* !SMALL */ |
|
|
cpend = 0; /* no pending replies */ |
cpend = 0; /* no pending replies */ |
proxy = 0; /* proxy not active */ |
proxy = 0; /* proxy not active */ |
|
|
int num; |
int num; |
#ifndef SMALL |
#ifndef SMALL |
HistEvent hev; |
HistEvent hev; |
#endif |
#endif /* !SMALL */ |
|
|
if (!top |
if (!top |
#ifndef SMALL |
#ifndef SMALL |
|
|
|
|
#ifdef SMALL |
#ifdef SMALL |
#define INC_CHKCURSOR(x) (x)++ |
#define INC_CHKCURSOR(x) (x)++ |
#else /* !SMALL */ |
#else /* SMALL */ |
#define INC_CHKCURSOR(x) { (x)++ ; \ |
#define INC_CHKCURSOR(x) { (x)++ ; \ |
if (x == cursor_pos) { \ |
if (x == cursor_pos) { \ |
cursor_argc = margc; \ |
cursor_argc = margc; \ |
|
|
cursor_pos = NULL; \ |
cursor_pos = NULL; \ |
} } |
} } |
|
|
#endif /* !SMALL */ |
#endif /* SMALL */ |
|
|
/* |
/* |
* Parse string into argbuf; |
* Parse string into argbuf; |
|
|
#ifndef SMALL |
#ifndef SMALL |
" %s [-C] [-c cookie] [-o output] " |
" %s [-C] [-c cookie] [-o output] " |
"https://host[:port]/file\n" |
"https://host[:port]/file\n" |
#endif |
#endif /* !SMALL */ |
" %s [-C] [-o output] host:[/path/]file[/]\n", |
" %s [-C] [-o output] host:[/path/]file[/]\n", |
#ifndef SMALL |
#ifndef SMALL |
__progname, __progname, __progname, __progname, __progname); |
__progname, __progname, __progname, __progname, __progname); |
#else |
#else /* !SMALL */ |
__progname, __progname, __progname, __progname); |
__progname, __progname, __progname, __progname); |
#endif |
#endif /* !SMALL */ |
exit(1); |
exit(1); |
} |
} |