added support for -b@[file name] and -b@- (for stdin) for consistency

This commit is contained in:
Daniel Stenberg 2000-02-14 23:17:59 +00:00
parent 158920cc34
commit a1db1e8a23
1 changed files with 7 additions and 5 deletions

View File

@ -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 */