diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2008-07-08 21:07:58 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2008-07-08 21:07:58 +0000 |
commit | 66a9ee29034eff1ef97bd24b19f4535c46d34b39 (patch) | |
tree | 77b34a49e6173e9b4c9f16116a58c71b195c422f /usr.bin/ftp/main.c | |
parent | 7a3d395c69db3c8452efe68ea465fcf6112fd974 (diff) |
- add support for recursive transfers (but not for floppies), e.g.
'mget -cr 4.*' would recursively fetch (-r), and resume the previous
transfers (-c) of 4.X release directories
uses local matching (fnmatch), but only for recursive transfers.
current behavior is not changed in any way.
- while here, ifndef SMALL debugging stuff, this saves some space,
for floppies
- some debugging code was enabled for non-debugging mode, checks
assume debug is set to zero, but it's not initially set
- all "Confirm with" prompts are forced, remove redundant argument
- fix usage: -C and -c are not available for SMALL
discussed a year ago w/ pyr@
looks good to millert@
previous version looked good to pyr@
man page tweaks & ok jmc@
Diffstat (limited to 'usr.bin/ftp/main.c')
-rw-r--r-- | usr.bin/ftp/main.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 02b96f151fe..90e247f7e7a 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.69 2008/06/25 21:15:19 martynas Exp $ */ +/* $OpenBSD: main.c,v 1.70 2008/07/08 21:07:57 martynas Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -66,7 +66,7 @@ static const char copyright[] = #endif /* not lint */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: main.c,v 1.69 2008/06/25 21:15:19 martynas Exp $"; +static const char rcsid[] = "$OpenBSD: main.c,v 1.70 2008/07/08 21:07:57 martynas Exp $"; #endif /* not lint and not SMALL */ /* @@ -212,8 +212,10 @@ main(volatile int argc, char *argv[]) break; case 'd': +#ifndef SMALL options |= SO_DEBUG; debug++; +#endif /* !SMALL */ break; case 'E': @@ -764,17 +766,33 @@ void usage(void) { (void)fprintf(stderr, - "usage: %s [-46AadEegimnptVv] [-k seconds] " + "usage: %s [-46Aa" +#ifndef SMALL + "d" +#endif /* !SMALL */ + "EegimnptVv] [-k seconds] " "[-P port] [-r seconds] [host [port]]\n" - " %s [-C] [-o output] " + " %s " +#ifndef SMALL + "[-C] " +#endif /* !SMALL */ + "[-o output] " "ftp://[user:password@]host[:port]/file[/]\n" - " %s [-C] [-c cookie] [-o output] " + " %s " +#ifndef SMALL + "[-C] [-c cookie] " +#endif /* !SMALL */ + "[-o output] " "http://host[:port]/file\n" #ifndef SMALL " %s [-C] [-c cookie] [-o output] " "https://host[:port]/file\n" #endif /* !SMALL */ - " %s [-C] [-o output] host:[/path/]file[/]\n", + " %s " +#ifndef SMALL + "[-C] " +#endif /* !SMALL */ + "[-o output] host:[/path/]file[/]\n", #ifndef SMALL __progname, __progname, __progname, __progname, __progname); #else /* !SMALL */ |