=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.62 retrieving revision 1.63 diff -c -r1.62 -r1.63 *** src/usr.bin/ftp/main.c 2007/04/07 23:20:18 1.62 --- src/usr.bin/ftp/main.c 2007/06/13 13:52:26 1.63 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.62 2007/04/07 23:20:18 tedu Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.63 2007/06/13 13:52:26 pyr Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* *************** *** 66,72 **** #endif /* not lint */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: main.c,v 1.62 2007/04/07 23:20:18 tedu Exp $"; #endif /* not lint and not SMALL */ /* --- 66,72 ---- #endif /* not lint */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: main.c,v 1.63 2007/06/13 13:52:26 pyr Exp $"; #endif /* not lint and not SMALL */ /* *************** *** 120,125 **** --- 120,126 ---- editing = 0; el = NULL; hist = NULL; + cookiefile = NULL; #endif mark = HASHBYTES; marg_sl = sl_init(); *************** *** 176,182 **** if (isatty(fileno(ttyout)) && !dumb_terminal && foregroundproc()) progress = 1; /* progress bar on if tty is usable */ ! while ((ch = getopt(argc, argv, "46AadEegimno:pP:r:tvV")) != -1) { switch (ch) { case '4': family = PF_INET; --- 177,187 ---- if (isatty(fileno(ttyout)) && !dumb_terminal && foregroundproc()) progress = 1; /* progress bar on if tty is usable */ ! #ifndef SMALL ! cookiefile = getenv("http_cookies"); ! #endif ! ! while ((ch = getopt(argc, argv, "46Aac:dEegimno:pP:r:tvV")) != -1) { switch (ch) { case '4': family = PF_INET; *************** *** 193,198 **** --- 198,209 ---- anonftp = 1; break; + case 'c': + #ifndef SMALL + cookiefile = optarg; + #endif + break; + case 'd': options |= SO_DEBUG; debug++; *************** *** 264,269 **** --- 275,284 ---- } argc -= optind; argv += optind; + + #ifndef SMALL + cookie_load(); + #endif cpend = 0; /* no pending replies */ proxy = 0; /* proxy not active */