mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:31:41 +03:00
tool_getparam: switch to an enum for every option
To make the big switch much easier to read/understand and to make it easier to add new options.
This commit is contained in:
parent
1f4433dad4
commit
9e4e527735
2 changed files with 878 additions and 680 deletions
1550
src/tool_getparam.c
1550
src/tool_getparam.c
File diff suppressed because it is too large
Load diff
|
|
@ -190,8 +190,8 @@ while(<$r>) {
|
|||
$list=1;
|
||||
}
|
||||
elsif($list) {
|
||||
if( /^ \{(\"[^,]*\").*((\"[^ ]*)\")/) {
|
||||
my ($l, $s)=($1, $2);
|
||||
if( /^ \{(\"[^,]*\").*\'(.)\', (.*)\}/) {
|
||||
my ($l, $s, $rd)=($1, $2, $3);
|
||||
my $sh;
|
||||
my $lo;
|
||||
my $title;
|
||||
|
|
@ -203,9 +203,9 @@ while(<$r>) {
|
|||
$lo = $1;
|
||||
$title="--$lo";
|
||||
}
|
||||
if($s =~ /\"(.)\"/) {
|
||||
if($s ne " ") {
|
||||
# a short option
|
||||
$sh = $1;
|
||||
$sh = $s;
|
||||
$title="-$sh, $title";
|
||||
}
|
||||
push @getparam, $title;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue