From a1db1e8a2306769ac238cf90aa3e5d48920ae536 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 14 Feb 2000 23:17:59 +0000 Subject: added support for -b@[file name] and -b@- (for stdin) for consistency --- src/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 7b7dcdf02..3c33025ae 100644 --- a/src/main.c +++ b/src/main.c @@ -439,14 +439,16 @@ static int getparameter(char *flag, /* f or -long-flag */ GetStr(&config->useragent, nextarg); break; case 'b': /* cookie string coming up: */ - if(strchr(nextarg, '=')) { + if(nextarg[0] == '@') { + nextarg++; + } + else if(strchr(nextarg, '=')) { /* A cookie string must have a =-letter */ GetStr(&config->cookie, nextarg); + break; } - else { - /* We have a cookie file to read from! */ - GetStr(&config->cookiefile, nextarg); - } + /* We have a cookie file to read from! */ + GetStr(&config->cookiefile, nextarg); break; case 'B': /* use type ASCII when transfering ftp files */ -- cgit v1.2.3